is a GPU necessary?

I am trying to run lhrs_webui.py with the --cpu-only flag but am running into a CUDA issue. This is local on my macbook pro
(lhrs) yousof@yousof LHRS-Bot % python lhrs_webui.py -c Config/multi_modal_eval.yaml --cpu-only
[2024-08-07 09:33:54,229] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to mps (auto detect)
[2024-08-07 09:33:54,358] torch.distributed.elastic.multiprocessing.redirects: [WARNING] NOTE: Redirects are currently not supported in Windows or MacOs.
--------- error here --------
cpu
/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
Loading checkpoint shards:   0%|                                                                                | 0/2 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs_webui.py", line 918, in <module>
    model, tokenizer = _load_model_tokenizer(args)
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs_webui.py", line 80, in _load_model_tokenizer
    model = build_model(config, activate_modal=("rgb", "text"))
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs/models/build.py", line 23, in build_model
    model = build_vlm_model(config, activate_modal=activate_modal)
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs/models/build.py", line 14, in build_vlm_model
    model = UniBind(activate_modal, config)
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs/models/UniBind.py", line 44, in __init__
    self.add_module(modal, MODAL_MAPPING[modal](config))
  File "/Users/yousof/Desktop/projects/LHRS-Bot/lhrs/models/text_modal.py", line 115, in __init__
    self.text_encoder = CustomLlamaForCausalLM.from_pretrained(
  File "/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3694, in from_pretrained
    ) = cls._load_pretrained_model(
  File "/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4104, in _load_pretrained_model
    new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(
  File "/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/transformers/modeling_utils.py", line 778, in _load_state_dict_into_meta_model
    set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs)
  File "/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 317, in set_module_tensor_to_device
    new_value = value.to(device)
  File "/opt/anaconda3/envs/lhrs/lib/python3.10/site-packages/torch/cuda/__init__.py", line 289, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

The error looks like it's coming from build_vlm_model in build.py which calls UniBind. But shouldn't passing the --cpu-only arg in the command set the device to 'cpu'?
python lhrs_webui.py -c Config/multi_modal_eval.yaml --cpu-only

Hi~
We have't test for CPU of Apple Sillicon.
It's seems that the error happened when loading LLM. You can change this line into cpu for a try.


Typo fix: Plase select -> Please select

Fixes a typo in the Longhorn UI when salvaging a volume.
"Plase select at least one replica."
->
"Please select at least one replica."
Much better ;)

Thanks!


PC learns different graphs dependent on the ordering

Hi,
Thank you for your great work on this package!
I am testing the behaviour of the PC algorithm on simple simulated data. I found that the number of directed edges detected differs based on the ordering of the variables given to the algorithm.
I am running the following code:
import numpy as np
import matplotlib.pyplot as plt
from causallearn.search.ConstraintBased.PC import pc

def simulate_data(n_obs):
    '''
    Simulate data from the following graph

        A       B
         \     /
          v   v
            C
          /   \
         v     v
        D       E
    '''
    A = np.random.normal(size = n_obs)
    B = np.random.normal(size = n_obs)
    C = A + B + np.random.normal(size = n_obs)*0.25
    D = C + np.random.normal(size = n_obs)*0.25
    E = C + np.random.normal(size = n_obs)*0.25
    return np.stack((A,B,C,D,E), axis =1)

# generate data
n = 10000
data = simulate_data(n)

# test different permutations
permutations = [[0,1,2,3,4], [0,1,3,2,4]]

for permutation in permutations:
    graph = pc(data[:,permutation], 0.05, 'fisherz', node_names = np.array(["A","B", "C", "D", "E"])[permutation],  verbose = False)
    graph.draw_pydot_graph(labels=np.array(["A","B", "C", "D", "E"])[permutation])
    plt.show()

When the ordering of variables C and D is permuted, the PC algorithm returns the Graph with an undirected edge from C to D. However, when the ordering is unpermuted, the PC algorithm correctly directs the edge from C to D. This happens, even though the p-values in the CI tests are unchanged for the two permutations.
Is this expected behaviour or can you help me fix this?

Thanks for reporting!
We had fixed this bug. Please try to use the latest version. If there is any problem, please let us know. Thanks again!

@chenweiDelight Which PR fixed this bug? Could you link it here?
cc @MarkDana

Sure. The link is https://github.com/cmu-phil/causal-learn/pull/68/commits/3cfd99ed132ef671654df7ed2b1806aca469da6e.

@chenweiDelight  hmm, this commit is not pushed yet, right? So the latest version doesn't have this bug fixed?
@MarkDana Any idea why our PC tests didn't capture this bug?

Yes. I mistakenly thought it had already been pushed.

Hi again,
Sorry for the long reaction time. I just pulled the latest version (1.3.0) and I am still experiencing the same issue.
Do you experience the same problem when running my code or is it working?

Hi @theabrusch , sorry for the late reply. Could you please try the latest version (1.3.3) to see if the issue remains?

Sorry for the late reply. This is studied problem--see this paper (available as PDF in Google Scholar):
Colombo, D., & Maathuis, M. H. (2014). Order-independent constraint-based causal structure learning. J. Mach. Learn. Res., 15(1), 3741-3782.

I just installed this and I'm having the same issue with the FCI algorithm... Totally different results based on the ordering.

Hi, as @jdramsey mentioned, this is a studied problem for constraint-based methods including FCI. Please let me know if I misunderstood anything.


The description field is empty when posting device profile using /api/v1/deviceprofile

OS version: ubuntu 18.04
EdgeX version: 1.0.0
Environment details: Docker container
Steps to reproduce:

Startup EdgeX
Post /api/v1/deviceprofile with the following body.

Method: POST
URL: http://localhost:48081/api/v1/deviceprofile
{
"origin":1471806386919,
"name":"TestProfileToPostUniqe",
"description":"BACnet Honeywell thermostats",
"manufacturer":"Honeywell",
"model":"ABC123",
"labels":["bacnet","thermostat","Honeywell"],
"coreCommands":[
{
"origin":1471806386919,
"name":"cooling point1",
"get":
{
"path":"/cooling",
"response":{
"code":"200",
"errorDescription":"not a float",
"expectedValues":"temperature"
}
},
"put":{
"path":"/cooling",
"response":{
"code":"200",
"errorDescription":"not a float",
"expectedValues":"temperature"
},
"parameters":[
{
"name":"coolingpoint",
"value":"float",
"uom":"string"
}
]
}
}
],
"deviceCommands":[{
"get":[
{
"parameter":"CurrentHumidity",
"property":"presentValue",
"operation":"get",
"object":"AnalogValue_22"
}
]
}]
}

Actual results: Request sent successful, but the description field is empty on Database.
Expected results: Value of the description field is the same as posting body.

The root cause is in go-mod-core-contracts. Closing this issue, replacing with https://github.com/edgexfoundry/go-mod-core-contracts/issues/93


Marathon api update app doesn't work

marathon Version 1.3.0-RC4 in dc/os 1.8
Using the RestAPI PUT /v2/apps/{appId} does not update the application.
Currently, I'm deleting and creating the application as a workaround but that means downtime.

Hi @jacob-koren,
can you give me an example app definition and an example update request?
Thanks
Johannes

/cc @colin-msphere

I have encountered this problem as well. I can use the same payload as a POST and the application is created and launched. Using a PUT (update) returns a 422 and ValidationError stack trace.
App Definition:
{
  "id": "testapp",
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "<valid docker image name>",
      "network": "BRIDGE",
      "portMappings": [
        {
          "containerPort": 4000,
          "hostPort": 0
        }
      ]
    }
  },
  "acceptedResourceRoles": [
    "slave_public"
  ],
  "instances": 1,
  "cpus": 0.1,
  "mem": 128
}

Attaching stack trace. This was generated using the app definition in my previous comment.
app-update-422.txt

Attaching HTTP/curl exchange.
curl.txt

That's odd, when I tried to reproduce this I also got success on POST and error on PUT, but my error was different:
{
  "message": "Invalid JSON",
  "details": [
    {
      "path": "",
      "errors": [
        "error.expected.jsarray"
      ]
    }
  ]
}

This is working correctly for me in Marathon v1.3.0-RC3 on DC/OS 1.8, so I guess the issue is specific to RC4.

My testing was against 1.3.0-RC4.

Hi @colin-msphere, @philipnrmn
is it possible to re-test this behavior on RC6? RC6 was merged recently to DC/OS.
Thanks
Johannes

Hi @colin-msphere, @philipnrmn, @jacob-koren,
Is it possible that https://github.com/mesosphere/marathon/pull/4269 describes your problem?
Kind regards
Johannes

Hi @colin-msphere, @philipnrmn, @jacob-koren,
Is it possible that #4269 describes your problem?
Kind regards
Johannes

With RC4 I get the following validation error:
HTTP/1.1 422
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Date: Thu, 01 Sep 2016 11:30:18 GMT
Expires: 0
Pragma: no-cache
Server: Jetty(9.3.6.v20151106)
Transfer-Encoding: chunked
X-Marathon-Leader: http://wrk-2.local:8080

{
    "details": [
        {
            "errors": [
                "AppDefinition must either contain one of 'cmd' or 'args', and/or a non-Mesos 'container'."
            ],
            "path": "/"
        }
    ],
    "message": "Object is not valid"
}

Which has be fixed in RC6 where I get:
HTTP/1.1 201 Created
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json; qs=2
Date: Thu, 01 Sep 2016 11:31:36 GMT
Expires: 0
Location: http://localhost:8080/v2/apps/fo/fo
Pragma: no-cache
Server: Jetty(9.3.6.v20151106)
Transfer-Encoding: chunked
X-Marathon-Leader: http://wrk-2.local:8080

{
    "deploymentId": "6af22783-3e92-48dc-8e3c-b8386dbf254f",
    "version": "2016-09-01T11:31:36.318Z"
}


New target: LPC 824

As there's a new pull request for LPC 824 MAX board, https://github.com/mbedmicro/CMSIS-DAP/pull/72
pyOCD should contain this target to be able to test mbed CMSIS-DAP implementation.

Done in #225


Solar Evaporators producing Orphaned TEs

See screenshot below, using <IP_ADDRESS>

Ah, I think I actually know the issue here- I'm holding onto references of all tank blocks with my current algorithm. This is luckily a very easy fix, I'll just change the references to use my hashable coordinate wrappers.

Fixed!

I built the dev version from the source and tried it with your fixed commits, I still saw the orphaned TEs in Opis.


Add validation checking code for pre-images being revealed

In current implementation of managing enrollments and pre-images, there is no code checking validity of pre-images. The validator set(ValidatorSet) must check validity of pre-images being received from several validators.
Definition of Done:

[x] The validator set checks incoming pre-images with enrollment data

How to implement:

The validator set hashes a random seed of an enrollment by the difference in the height between the random seed and the incoming pre-image, and compares the hash value and one of the pre-image.
The Enrollment structure must have the height of its random seed for checking the validity.

Fixed by https://github.com/bpfkorea/agora/pull/851


Angular2 migration

Any plans on migrating this wonderful filemanager to Angular2?

Hi @Vingtoft
Migration to angular2 is not yet planned


yt-dlp not detecting subtitles from an MPD

Checklist

[ ] I'm reporting a broken site support issue
[x] I've verified that I'm running yt-dlp version 2021.08.02
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar bug reports including closed ones
[x] I've read bugs section in FAQ

Verbose log

[debug] Command-line config: ['-v', '--allow-unplayable-formats', '--list-subs', 'https://cdxaws-ak.akamaized.net/out/v1/f10734629e3b4e8c8864c2b56b0821ba/c96d37fedb44465f8a19c65563004303/2702b4dd304c43e88bcfa4f04f464736/manifest.mpd?aws.manifestfilter=video_height:144-1080']
[debug] Encodings: locale cp1256, fs utf-8, out utf-8, pref cp1256
[debug] yt-dlp version 2021.08.02 (exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[debug] [generic] Extracting URL: https://cdxaws-ak.akamaized.net/out/v1/f10734629e3b4e8c8864c2b56b0821ba/c96d37fedb44465f8a19c65563004303/2702b4dd304c43e88bcfa4f04f464736/manifest.mpd?aws.manifestfilter=video_height:144-1080
[generic] manifest.mpd?aws: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] manifest.mpd?aws: Downloading webpage
[generic] manifest.mpd?aws: Extracting information
WARNING: [generic] Unknown MIME type application/mp4 in DASH manifest
WARNING: [generic] Unknown MIME type application/mp4 in DASH manifest
WARNING: [generic] Unknown MIME type application/mp4 in DASH manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
manifest.mpd?aws has no subtitles

Description

yt-dlp works nicely with the video & audio of this MPD (taken from Shahid-VIP show): https://cdxaws-ak.akamaized.net/out/v1/f10734629e3b4e8c8864c2b56b0821ba/c96d37fedb44465f8a19c65563004303/2702b4dd304c43e88bcfa4f04f464736/manifest.mpd?aws.manifestfilter=video_height:144-1080, but as for subtitles, it doesn't seem to detect them and always throws this error manifest.mpd?aws has no subtitles, I tried everything but I couldn't really grab them using this tool (or any other tool), I scoured the web and looked everywhere to automatically (and reliably) download the segmented subtitles but couldn't find a single way other than downloading each segment with a hacky python script and merging them (which is really unreliable and I'm not really that good with coding, also veryy slow) so this is my last hope to rip the subtitle, any help is appreciated & let me know if you need more info
BTW, I looked for the other open & locked issues but found non that are similar to this problem

The URL you have given is DRM protected
But even that aside, I don't think it is possible to detect the AdaptationSet as a subtitle
    <AdaptationSet mimeType="application/mp4" codecs="stpp" segmentAlignment="true" startWithSAP="1" bitstreamSwitching="true" lang="fr">
      fr
      <Representation id="12" bandwidth="0">
        <SegmentTemplate timescale="90000" media="../b7de9dd3b6ec4869a4bbf06b3e6b64f2/4c04893927dd4a5693635b46b6558c3d/index_subtitles_12_0_$Number$.mp4" initialization="../b7de9dd3b6ec4869a4bbf06b3e6b64f2/4c04893927dd4a5693635b46b6558c3d/index_subtitles_12_0_init.mp4" startNumber="1" presentationTimeOffset="0">
          <SegmentTimeline>
            <S t="3000" d="540000" r="229"/>
            <S t="124203000" d="140400"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
    </AdaptationSet>

application/mp4 does not have to be subtitle according to rfc4337.2 and as such I an wary of treating it as such without more information - especially if this happens only inside DRM encumbered manifests. If you can provide a non-DRM example where this happens, then we can consider it.
@fstirlitz, what so u think?

The URL you have given is DRM protected
But even that aside, I don't think it is possible to detect the AdaptationSet as a subtitle
    <AdaptationSet mimeType="application/mp4" codecs="stpp" segmentAlignment="true" startWithSAP="1" bitstreamSwitching="true" lang="fr">
      fr
      <Representation id="12" bandwidth="0">
        <SegmentTemplate timescale="90000" media="../b7de9dd3b6ec4869a4bbf06b3e6b64f2/4c04893927dd4a5693635b46b6558c3d/index_subtitles_12_0_$Number$.mp4" initialization="../b7de9dd3b6ec4869a4bbf06b3e6b64f2/4c04893927dd4a5693635b46b6558c3d/index_subtitles_12_0_init.mp4" startNumber="1" presentationTimeOffset="0">
          <SegmentTimeline>
            <S t="3000" d="540000" r="229"/>
            <S t="124203000" d="140400"/>
          </SegmentTimeline>
        </SegmentTemplate>
      </Representation>
    </AdaptationSet>

application/mp4 does not have to be subtitle according to rfc4337.2 and so I an wary of treating it as one without more information - especially if this happens only inside DRM encumbered manifests. If you can provide a non-DRM example where this happens, then we can consider it.
@fstirlitz, what so u think?

Only place where I had this issue is on Shahid sadly, I've downloaded the subtitle and merged it (through a hacky way which was painful) but couldn't figure out what format it even is, MediaInfo shows codec = stpp which I think is related to this doc from apple : https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices section 5.10,
Anyways since it's maybe TTML I thought about using ttml2srt tools but they are crash saying the XML isn't well formed or something, I already spent days looking (waking up and sleeping on it) and trying everything, even making sure if there is a URL from shahid which gives the a full .vtt subtitle file, but to no avail
is it okay if I attach my downloaded subtitle file? so you see what's going on their since it's maybe corrupt due to the downloading method
Maybe fstirlitz could help identify the issue, looking forward to this ❤

The subs inside dash is ttml, but packed in mp4. See https://github.com/yt-dlp/yt-dlp/issues/631#issuecomment-893329480

The subs inside dash is ttml, but packed in mp4. See #631 (comment), #247, be6202f

but with that being said, why won't any converter accept the file? they either crash or reject it
Also in that case, can I force yt-dlp to download the subs even tho it's thinking they are mp4? perhaps that way I can make sure it's downloaded correctly (which is why I opened the issue)

See https://github.com/yt-dlp/yt-dlp/commit/be6202f12b97858b9d716e608394b51065d0419f
* The fragmented TTML subtitles extracted from DASH/ISM are valid, but are unsupported by `ffmpeg` and most video players
    * Their XML fragments can be dumped using `ffmpeg -i in.mp4 -f data -map 0 -c copy out.ttml`.
        Once the unnecessary headers are stripped out of this, it becomes a valid self-contained ttml file
    * The ttml subs downloaded from DASH manifests can also be directly opened with <@SubtitleEdit>

See be6202f
* The fragmented TTML subtitles extracted from DASH/ISM are valid, but are unsupported by `ffmpeg` and most video players
    * Their XML fragments can be dumped using `ffmpeg -i in.mp4 -f data -map 0 -c copy out.ttml`.
        Once the unnecessary headers are stripped out of this, it becomes a valid self-contained ttml file
    * The ttml subs downloaded from DASH manifests can also be directly opened with <@SubtitleEdit>

I see, I will look into that & understand the command parameters so I can play with it and get a better idea, hopefully it works, thanks for the help so far

I tried and searched around using ffmpeg but it seems it can only see actual video streams, it doesn't see any of the subtitles streams so I can't dump the subtitles (maybe I'm missing something?)

codecs="stpp" pretty unambiguously indicates a subtitle. Although IIRC stpp is not exactly a codec in itself, just an MP4 box type in which subtitle codec metadata is to be found. Compare:
https://github.com/yt-dlp/yt-dlp/blob/b6a35ad83bbe2cbb9cda17052fd68e2dff16e99b/yt_dlp/downloader/ism.py#L175-L180
I guess stpp means XML-based subtitles; I think knowing that it’s specifically TTML requires looking at the namespace in the stpp box. Is there a spec somewhere that explains what codecs= is supposed to contain?

I tried and searched around using ffmpeg but it seems it can only see actual video streams, it doesn't see any of the subtitles streams so I can't dump the subtitles (maybe I'm missing something?)

You need to download all the fragments and concatenate them into a standalone file first (like the downloader ordinarily would). And FFmpeg doesn’t support TTML decoding anyway, it will only indicate the presence of a ‘data’ stream from which you can extract XML segments and then combine them into a stand-alone .ttml file, manually or with another tool. Alternatively, you can try opening the concatenated MP4 file with SubtitleEdit, but #631 indicates the timestamps will be likely misread.

Okay, the link to the DASH spec in our source code is dead now. (Fuck ISO.)
The closest thing to an authoritative reference I found is https://dvb.org/wp-content/uploads/2019/10/a168_DVB_MPEG-DASH_Nov_2017.pdf, page 42:

The @codecs attribute shall begin with 'stpp' to indicate the use of XML subtitles. The attribute should indicate the profile according to the W3C TTML profile registry [i.4]. If 'stpp' alone is used, with no profile specified, 'stpp.ttml.etd1' shall be assumed, for backwards compatibility.

This describes a profile of DASH for IPTV by the DVB forum, but I doubt it outright contradicts the main specification. It pretty much confirms my guess above.

Thanks, I wasn't able to find any specs explaining sttp and so though it would be ambigious as well.
Does this mean we should relax the subtitle detection to include sttp and assume it is ttml unless specified otherwise?

As a quick-and-dirty hack,
codecs = representation_attrib.get('codecs')
if codecs == 'stpp' or codecs.startswith('stpp.'):
    content_type = 'text'

in _parse_mpd_formats_and_subtitles should be enough. More long-term, the codecs= attribute is later parsed with parse_codecs from utils, so we may just move this earlier, infer media stream type from the result as a fallback, and generalise it to cover subtitle codecs too.

@VXsz https://pastebin.com/kheWNHqC

Okay, the link to the DASH spec in our source code is dead now. (Fuck ISO.)
...

The standard was updated: https://standards.iso.org/ittf/PubliclyAvailableStandards/c079329_ISO_IEC_23009-1_2019(E).zip
For the latest version of any of the PAS, search at https://standards.iso.org/ittf/PubliclyAvailableStandards/


No AppImage for the new Alpha 2 Release

Hi David,
First, I'm so happy with your work to bring an easy way to use The Prusa Slicer on, for me, a separate system, where I can really play with the new stuff in complete isolation from my usual Windows box. Thanks very much. It works very well.
This latest Alpha 2 release has no AppImage in it's assets, do I need to build it, or am I too quick off the mark and the AppImage itself is on it's way, or maybe I'm looking in the wrong place.
Thanks again,
Cheers,
Eric

Hi Eric,
This was an oversight on my part. In my haste I did not verify that the AppImage was uploaded, so it was missing in the release assets. You'll find it there now: https://github.com/davidk/PrusaSlicer-ARM.AppImage/releases/tag/2.3.0-alpha2
Thanks for bringing this to my attention!


document the full list of AWS permissions required for a deployment

fixes #280
I think it's invaluable to keep this info in the README. At least where I work, full admin access to AWS isn't given out to everybody and I had to come up with a more granular list listed here.

This is awesome @lone-cloud ! It may be even better to provide a yaml policy users can just copy and use, what do you think?

I'm not primarily a dev-ops engineer, so I don't know the most popular way to configure things. All I can say is that I put JSON (array) here because that's the way the IAM in AWS console accepts it. Also the dev-ops guys at my current gig are defining the user policies in terraform which also works with JSON.


Migrate codebase to support py36 and above

Description
This PR attempts to update the wasabi codebase so that it's compatible to Python 3.6 and above.
Major changes include:

Added type hints to all modules
Removed Python27 from the CI
Ran isort -m 9 and black to format the codebase
Added mypy to requirements.txt, and included it in the CI.

A note on typing and mypy
There are areas in the codebase where I prioritized readability than mypy's checks, By doing so, there are some lines of code where I added type: ignore or casted some variables to the appropriate types. Let me know if there's a better way to approach these. Here are some examples:

Ignored type when using **kwargs: https://github.com/ines/wasabi/pull/22/commits/f8f3c595afad55e2fa39366f88541ae88d21f8d1. Here, I prioritized neatness (I prefer the original **settings approach) rather than passing the variables one by one.
Fix dictionary getters by casting: https://github.com/ines/wasabi/pull/22/commits/534311653f2f6b0b73b1a6d363cb5f9190d0d8ed. Here, I opted to cast the variables instead of writing overloads.

Also, note that I'm not as familiar with typing and mypy best practices, so let me know if there are things I missed! Would appreciate some pointers!

Yay ready for review! Can't seem to tag reviewers so sorry for the message tag cc: @ines

Does the CI run mypy in the test suite?

Please fix CI steps first and address the mypy errors (which are currently printed in the CI but don't cause the step to fail).

Oh my mistake @adrianeboyd , I re-requested the review but  forgot to push the changes! I have pushed them now and will wait for the CI to finish. Once everything passes, I will request the review again. :) I apologize for that.

You need to merge in master and resolve the conflicts for the CI to run again.

Ah, the CI hasn't been updated since it got moved to explosion so it's not working. Let me try to fix it...

Ok! I reran mypy locally and encountered two errors:
λ: python3 -m mypy wasabi
wasabi/util.py:210: error: Module has no attribute "WinDLL"
wasabi/util.py:230: error: Module has no attribute "get_osfhandle"
Found 2 errors in 1 file (checked 13 source files)

I will solve these first in the meantime 🙇

That code should have been removed in the merge? It doesn't matter to me if this PR gets rebased, so it might be easier to revert back to before the merge and rebase on master instead?

I noticed that closing and opening the PR re-triggers the CI. Earlier when I made a commit, the CI didn't trigger.

Hi @adrianeboyd , I think for the change from Iterable to List, I had a few mypy errors that say something like:
wasabi/markdown.py:45: error: Argument 1 to "len" has incompatible type "Iterable[str]"; expected "Sized"
wasabi/markdown.py:46: error: Argument 1 to "len" has incompatible type "Iterable[Literal['r', 'c', 'l']]"; expected "Sized"
wasabi/markdown.py:46: error: Argument 1 to "len" has incompatible type "Iterable[str]"; expected "Sized"
wasabi/markdown.py:47: error: Argument 1 to "len" has incompatible type "Iterable[str]"; expected "Sized"
wasabi/markdown.py:52: error: Value of type "Iterable[Literal['r', 'c', 'l']]" is not indexable
wasabi/markdown.py:52: error: Argument 1 to "len" has incompatible type "Iterable[str]"; expected "Sized"

I am not sure what the best type for that is. I searched a bit (cf. this SO post), and it mentions that a List, Collection or Sequence should work. I opted to use List because we're passing a list internally.

Noted on the docstrings, will double check them again.

Converting this to draft again to just double-check all docstrings.

Hi @adrianeboyd ! I'm not sure if I have pending changes for the PR. I tried re-opening some resolved threads, perhaps a comment was buried or deleted somewhere? Let me know if there are things I need to update or if I should click the "request re-review" button! 🙇

Ah, with Optional[] I do like the Union version better. Maybe Union everywhere would just be simpler/clearer?

Ah sure. I think Union everywhere is clearer. Will revert this commit: https://github.com/explosion/wasabi/pull/22/commits/fb2c728aa5d095f7b0d4a89cceb55adaf3926fc7

An additional change would be to add python_version=">=3.6" to the setup.

Sure I can add that

Looks good!


try-catching is expensive, use string/char stuff instead

Try-Catching is only expensive if it throws an exception

Try-Catching is only expensive if it throws an exception

aka, it's expensive when people who never looked at how the method works in trident use it willy-nilly

Even if it catches, its still only expensive when it generates a stack trace, which this method doesn't

Indeed, yes. While handling an exception is still added through the exception table in bytecode to be handled in the method call, the most overhead occurs inside printStackTrace, which does 3 iterations IIRC over the trace, line formatting, and if the trace happens to be very long (In essence, with netty), it will have a significant iteration time. However, because it isn't handled, it's not a problem.


Minor improvements to the documentation

Thanks for all your commits <3
Help a lot for many stuff required for me to up hex to 1.0 :3


Regarding nist-data-mirror and dependency-check

I have build nist-data-mirror docker container. All nvdcve*.json and nvdcve*.xml files downloaded in container under /tmp/nvd
Now question is : How can use this data  with OWASP Dependency Check?
In which config file i need to mentioned below settings? is it on my nist-data-mirror container or client side?
cveUrl12Modified=http://hostname/mirror/nvd/nvdcve-modified.xml.gz
cveUrl20Modified=http://hostname/mirror/nvd/nvdcve-2.0-modified.xml.gz
cveUrl12Base=http://hostname/mirror/nvd/nvdcve-%d.xml.gz
cveUrl20Base=http://hostname/mirror/nvd/nvdcve-2.0-%d.xml.gz

Configuration will vary depending on which DC implementation you're using. For the CLI, the docs are here: https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html

Hello Steve,
Need Small help...
Could you please help me to mirror *.meta files with NVD-mirror.
I am able to mirror nvdcve-modified.xml.gz, nvdcve-2.0-modified.xml.gz
and nvdcve-1.0-modified.json.gz however application still is facing problem
while Dependency Check. They need *.meta files as well.
How to add these files with json and xml ?
Regards,
Dipesh Bendugade
On Thu, Jul 4, 2019 at 9:03 PM Steve Springett<EMAIL_ADDRESS>wrote:

Configuration will vary depending on which DC implementation you're using.
For the CLI, the docs are here:
https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stevespringett/nist-data-mirror/issues/24?email_source=notifications&email_token=AMQZJCCG4JAWE3INW23X2YTP5YJ33A5CNFSM4H5YGT3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZHWR4Q#issuecomment-508520690,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMQZJCHHSIEOTRA2F5OOQSDP5YJ33ANCNFSM4H5YGT3A
.

--
Dipesh Bendugade.
+91<PHONE_NUMBER>

meta and json files are supported in v1.3.0.

I am using v.1.3.0 only but i can see json and xml files only under
/tmp/nvd.
Regards,
Dipesh Bendugade
On Mon, Jul 15, 2019 at 8:10 PM Steve Springett<EMAIL_ADDRESS>wrote:

meta and json files are supported in v1.3.0.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stevespringett/nist-data-mirror/issues/24?email_source=notifications&email_token=AMQZJCG3FW3TYPDXQAUEOCLP7SD6HA5CNFSM4H5YGT3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ55BZY#issuecomment-511430887,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMQZJCCPYI766U66XR6M7ZDP7SD6HANCNFSM4H5YGT3A
.

--
Dipesh Bendugade.
+91<PHONE_NUMBER>

Not sure.
wget https://repo1.maven.org/maven2/us/springett/nist-data-mirror/1.3.0/nist-data-mirror-1.3.0.jar
java -jar nist-data-mirror-1.3.0.jar ./mirror json

This will produce three files per year (.json, .json.gz, and .meta) along with the modified.json/gz/meta
Not sure about the Docker container. It was contributed, but I have never tested it. YMMV

Thanks Steve.. issue got resolved 😀
On Mon, Jul 15, 2019, 9:07 PM Steve Springett<EMAIL_ADDRESS>wrote:

Not sure.
wget https://repo1.maven.org/maven2/us/springett/nist-data-mirror/1.3.0/nist-data-mirror-1.3.0.jar
java -jar nist-data-mirror-1.3.0.jar ./mirror json
This will produce three files per year (.json, .json.gz, and .meta) along
with the modified.json/gz/meta
Not sure about the Docker container. It was contributed, but I have never
tested it. YMMV
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/stevespringett/nist-data-mirror/issues/24?email_source=notifications&email_token=AMQZJCCFH5H6YPUQIXJ4LULP7SKUHA5CNFSM4H5YGT3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ6CVLI#issuecomment-511453869,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMQZJCFSX4H4TWXNDMHBV6LP7SKUHANCNFSM4H5YGT3A
.

Hi @stevespringett,
I'm struggling to understand how to get Dependency check to work with my data mirror. For CLI config Do I just add the two addtional cveURL arguements to the end (as shown below)
dependency-check.sh --project "example-project" --scan $libDir --format XML --out $workspace --proxyserver ${MYPROXY_SERVER_HOST} --proxyport ${MYPROXY_SERVER_PORT} --cveUrlModified http://example_repo.com:8081/nexus/content/sites/nist-data-mirror/nvdcve-1.0-modified.json.gz --cveUrlBase http://example_repo.com:8081:8081/nexus/content/sites/nist-data-mirror/nvdcve-1.0-%d.json.gz
The problem I'm having is that it is asking for .meta files in the log but I don't see where to specific the location of the .meta files like i can with the json.gz files.
And I missing another cveURL argument?

@BrownieX You'll need to ask dependency-check usage questions on the dependency-check mailing list or github issue repo. I no longer use dependency-check in this context and have not used version 5  with a mirror at all.

@stevespringett the binaries  posted here https://github.com/stevespringett/nist-data-mirror/releases - need to be updated - the changes you are looking for are post 1.2.0.  @BrownieX - pull down the sources and build out the jar

i spent the best part of a day banging my head of the same wall - until i realised  https://github.com/stevespringett/nist-data-mirror/issues/24?_pjax=%23js-repo-pjax-container#issuecomment-513697753

Not sure why 1.3.0 didn't get published to GitHub releases. I'll have to investigate the next time I do a release. In the mean time, I've manually added the 1.3.0 release to it.


[Enhancement] auto-reload-on-feed-selection

Right now auto-reload seems to be global (from the docs).  It would be useful to have an option to reload a feed when the feed is selected and items are about to be displayed.  This is the way a lot of newsreader applications work and is a convenience.
An option auto-reload-on-feed-selection would change the behavior of auto-reload to only update on feed selection.  If you can keep the meta-data, you can use the reload-timer, if set to a value greater than 0 to only update each feed every N minutes since last time selected when this new option is set.  Another approach is to make auto-reload have options of "yes/no/feed"

This is the way a lot of newsreader applications work and is a convenience.

Can you give specific examples?
Before implementing this, we need to fix akrennmair/newsbeuter#445.

An option auto-reload-on-feed-selection would change the behavior of auto-reload to only update on feed selection.

I don't think it's necessary to tie this with auto-reload. Let it be a freestanding option. This way, your feeds can be updated in one of three cases:

you selected the feed and this option was set.
a timer for auto-update fired;
you reloaded the feed manually.

We should also remember to be polite and thus make sure that we don't make network requests too often. The lower limit for reload-time is one minute, I think this options should use that, too.

Well, the tt-rss app on Android is an example.  Lots of the Android apps work this way to save network traffic - they only load/reload a feed when you select it.
Agree, a seaparet option is likely best.


DLS-7230 Update Play to 5.25.0 and Logger Config

Ticket

Is there supposed to be a change in the application-json-logger.xml included in this PR?

Yes, I forgot, added now, thank you for reminding me.

No problem :)


How about adding an option for changing the titlebar's color?

It would be great if a MacVim specific option can be added to control the titlebar's color. I know that many Mac app already have fancy customized titlebar colors, like Word or Excel. Adding this function could help improve the look-and-feel greatly with matching color themes, especially when using OS X's dark mode.
This repo already provides very mature code for doing this.

I'm not _particularly _enthusiastic about the idea, personally, but I wouldn't necessarily refuse a well-implemented PR for it. How do you expect this to look, interface-wise (as in, how does one manipulate this color and what special behavior does it have)? Are there separate settings for light and dark mode?
Is MacVim's window not respecting dark mode toggles as-is? That, at least, seems like it would be a bug we should address.

I think maybe just a simple option like set titlebarcolor=#1C1C1C. Of course, the tab bar underneath the title bar also needs the same background color.
I do not think we need to consider too much about dark mode toggle right now. Usually the title bar color would be chosen to match the color theme, rather than dark mode or not.

A new set option is something that would generally need to be added by core vim, not MacVim itself. That's why most of the MacVim-specific options we have (which fullscreen mode to use, ligature support, et cetera) are implemented as actual preference items in the MacVim GUI (generally via NSUserDefaults).
Modifying core vim's code, where all the set options are handled, seems to me like it would significantly increase the cost of merging in core vim's changes. I don't think that cost is worth paying for a feature like this. Perhaps @splhack can weigh in on what kind of impact that would have on our merge process, but my understanding is that it would be an annoyance.

I'd also love this, it is mionr but really does make the window look modern.
Atom just shipped this in 1.11 beta and they had a great discussion about it over on https://github.com/atom/atom/pull/11790.

An idean if this will be implemented sooner or later ?

I'd love this too.  I use a dark theme and also use iterm2 with a dark title bar and a dark background, and the light title bar on MacVim is a bit distracting.

I'm also interested in this feature as the titlebar is quite distracting when coding in the night with a dark theme.
I'm willing to help develop this functionality but would appreciate if someone can give me a few pointers to get started on the right track?

@robinmitra I've never gone about customizing the color of an NSWindow title bar, so I can't offer much guidance there other than to suggest plugging "custom NSWindow title bar" into a search engine. There's a few potentially promising hits on StackOverflow, such as this one.
In MacVim itself, MMWindow is a NSWindow subclass used by MacVim and would probably be a good place to start looking at how to handle the custom setup and drawing.
If you want to plug this into MacVim's preferences and GUI, this commit had some changes that added a new preference key and hooked it up, so you could wire the setting up that way.
I'm not sure of the best way to integrate the setting if you wanted to implement as a regular vim set option. This pending PR does something similar (in that it involves touching core vim source to add some options) but I'm not sure how helpful it would be as a guideline.
However you implement it, it should be possible to disable it (so users who want the window to look like a regular OS window don't have to guess at a "good color" to get that effect) and should not be enabled by default.

This should definitely not be a regular vim option, but should instead be something to set with defaults write (or the Preferences window).

Thanks, that gives me a good starting point. I'll come back with any questions.

Here are some more resources:

It looks like iTerm2 already has this implemented in PseudoTerminal.m
Looks like the Alacritty folks got it working with discussion: https://github.com/jwilm/alacritty/issues/686#issuecomment-318350775

A strong +1 to this, too. It might also satisfy the people having issues in https://github.com/macvim-dev/macvim/pull/111 as well.

#791 added "Mojave-style" tabs, where the colors and theming look similar to how native macOS tabs do (dirty detail: it's not the same as native tabs, because macOS doesn't expose a native tabs UI control for developers). This should make the tabs more pleasant to deal with as they would look similar to other native Apple apps and if you toggle dark mode, the tabs would turn to a dark gray color as well so it won't be blinding to you. It's only going to be active if you running it on Mojave or above.
I think this is probably the best move forward as it works out of the box and looks similar to other native Mac apps (the main goal of MacVim is to provide the Vim experience in an app that feels like a native macOS Cocoa app). Adding customization like this always comes with a maintenance cost moving forward so I'm a little hesitant to add this feature.
Leaving the issue open for now to see if there are any further discussions on this.

#888 is adding option to make titlebar transparent so the colorscheme background will be visible instead. Not a full substitution for what's being asked here, but should work for some people I hope.

How exactly do I set this @ychin ?

@nabsiddiqui  As per documentation, you write defaults variable in terminal.
defaults write org.vim.MacVim MMTitlebarAppearsTransparent true

Ah.  Thank you.  BTW, it looks awesome now.

I filed #912 to consider adding this option (and maybe a few other non-niche settings) in the Preferences UI so you don't need terminal to set it.


Ludusavi can't make backup to Final Fantasy IX - Steam version

So. I can't make the backup file for FF IX. I receive the following error:
"Backed up saves for FINAL FANTASY IX 0 b of 3.17 MiB, but some saves failed"
Ludusavi creates a folder with a huge name correctly, but can't backup the savefile itself
(C:\Users[USER]\Cloud\Saves\ludusavi\Final Fantasy IX\drive-C\Users[USER]\AppData\LocalLow\SquareEnix\FINAL FANTASY IX\Steam\EncryptedSavedData

Hmm, it's hard to say why this would happen. It looks like the path is well under the Windows 260 character limit, and I don't know why there would be a permissions issue with just the one file. I don't own the game, but if I get it at some point, I can try this on my system to see if I can reproduce it.

I was finally able to test this just now, but it's working fine on my end, both through Ludusavi itself and through the Playnite extension. I see that your backup path includes C:\Users[USER]\Cloud - perhaps the issue is related to your cloud storage. Some questions for you:

What cloud provider do you use?
Could you try using a regular local folder and see if it still happens?

I'm going to close this for now since it seems like a system- or cloud-specific issue, but I'm happy to reopen it if we can identify something defective/deficient in Ludusavi itself.


Add getrecentblocks RPC commands.

getercentblocks <detail> <count>
Retrives count blocks in descending height order and to each provides various information. Size of information is determined by details.
Detail levels 20<=x<100 and 120<=x may be slower, because they have to load the block data. Other levels use only index.
details:
 0 -> height: hash
 1 -> height: hash, diff, deltaT, flags
 2 -> height: hash, diff, deltaT, flags, cpid, research, interest
 20-> height: hash, diff, deltaT, flags, org, ver
 21-> height: hash, diff, deltaT, flags, org, ver, cpid, neural
 100: height: {json from index}
 120: height: {json from index and block}

Flags:
 [SC-][RUI]; 1: is*S*uperblock, is*C*ontract; 2: UserCPID and nonzero
 *R*esearch reward, *U*serCPID but no reward; *I*nvestor.

https://github.com/tomasbrod/Gridcoin-Research/issues/8


Undo History & The Journal of Irreproducible Results

VSCode Version: 1.10.2
OS Version: MacOS Sierra

Steps to Reproduce:
Haha. No way. I tried. It's completely random. Crazy making.
Here is the deal:
I looked at a couple open issues about Undo History in this repo. You guys assert that the history is infinite unless the file is written to by another process. My experience conflicts with that. On several very frustrating occasions, I lose all Undo history right after I save. I do have a process that watches the file and updates the build after each save but that process does not modify the file itself, at least not in any way that I can tell visually or content wise. But even if it turns out to be some crazy thing on my end (maybe one of the tools opens and saves the file as is instead of just reading from it) the fact that an editor loses its Undo history is enough for me and most developers (trust me, when enough run into this) to dump this otherwise great piece of software.
Would you consider being a normal editor like Sublime et al and preserve the Undo history in the same way those editors do? I've never had a single complaint in my whole adult life about something as trivial as this.
Please fix (something, not me)

I don't know the precise cases in which we decide to reload a file from disk (i.e. dispose models, i.e. losing undo history)

https://github.com/Microsoft/vscode/issues/2908

It happens when there hasn't been any visible change to the content of the file. In other words, I don't think #2908 captures all cases. For example, one case was when I had saved the file in XCode which kicked off some build process that in no way affect the file itself, the Undo history disappeared. I only have ESLint running as far as plugins go, but to be sure how do I get a list of all installed plugin so I may disable all?
@bpasero

@idibidiart are you able to give me a workspace that is fully setup for me to see how this behaves? there may still be whitespace changes to the file that would cause this from happening.


Adds eitsupi/devcontainer-features to the collection

Although jq is included in the debian common utils feature, I often also want to use yq, so I have released a simple feature that simply installs yq (and gojq).
I hope it will be useful for people like me.

Thanks for merging!


Exception during prune

Output of restic version
restic 0.7.1
compiled with go1.8.3 on windows/amd64
How did you run restic exactly?

X:\restic
λ x:\restic\restic -r x:\restic prune
counting files in repo
building new index for repo
[4:11:22] 100.00%  107641 / 107641 packs
repository contains 107641 packs (6187181 blobs) with 496.269 GiB bytes
processed 6187181 blobs: 85 duplicate blobs, 6.100 MiB duplicate
load all snapshots
find data that is still in use for 27 snapshots
[3:35:19] 100.00%  27 / 27 snapshots
found 3547102 of 6187181 data blobs still in use, removing 2640079 blobs
will remove 0 invalid files
will delete 18105 packs and rewrite 13385 packs, this frees 109.168 GiB
Exception 0xc0000006 0x8 0x8887b1 0x8887b1tten
PC=0x8887b1
main.glob..func14(0xc06560, 0xc042148f00, 0x0, 0x2, 0x0, 0x0)

What backend/server/service did you use?
x: is a windows samba mount
Expected behavior
No crash
Actual behavior
The call crashes unexpectedly
Steps to reproduce the behavior
calling prune on my large repository
Do you have any idea what may have caused this?
no
Do you have an idea how to solve the issue?
no

Thanks for reporting this, I have no idea what's going on. Maybe the SMB mount went away? I noticed that the restic binary is also on x:, can you retry with a local binary?

Maybe that was one cause. After updating and using a local binary it worked.
Thanks for your hints.

Thanks for the feedback. Let us know when this happens again.


Wont work with other gpio library to control neopixel

Hi, I'm trying to control a neopixle via node-rpi-ws281x-native without success. It seems to have some type of conflict.
Here's the issue node-rpi-ws281x-native side:
https://github.com/beyondscreen/node-rpi-ws281x-native/issues/55

Hi, from the issue linked to above  I can see that it was possible to get rpi-gpio to work. Given that rpi-gpio and onoff are actually quite similar I'd expect onoff to work also. Can you post an onoff program that doesn't work? If possible, the onoff equivalent of the program you posted here.

Sure, like in the other example I used a push button on GPIO24/ PIN 18 of my RPi and the strip of NeoPixles on

var ws281x = require('rpi-ws281x-native');

var NUM_LEDS = parseInt(process.argv[2], 10) || 10;
var pixelData = new Uint32Array(NUM_LEDS);

ws281x.init(NUM_LEDS);

var Gpio = require('onoff').Gpio;
var button = new Gpio(18, 'in', 'both');

button.watch(function(err, value) {
  if (err) throw err;
  console.log('button value is now ' + value);
  if (value) {
    newColor();
  }
});

// ---- trap the SIGINT and reset before exit
process.on('SIGINT', function () {
  ws281x.reset();
  button.unexport();
});

var offset = 0;
function newColor() {
  offset = Math.random()*1000;
  for (var i = 0; i < NUM_LEDS; i++) {
    pixelData[i] = colorwheel((offset + i) % 256);
  }

  offset = (offset + 1) % 256;
  ws281x.render(pixelData);
};

console.log('Press <ctrl>+C to exit.');

// rainbow-colors, taken from http://goo.gl/Cs3H0v
function colorwheel(pos) {
  pos = 255 - pos;
  if (pos < 85) { return rgb2Int(255 - pos * 3, 0, pos * 3); }
  else if (pos < 170) { pos -= 85; return rgb2Int(0, pos * 3, 255 - pos * 3); }
  else { pos -= 170; return rgb2Int(pos * 3, 255 - pos * 3, 0); }
}

function rgb2Int(r, g, b) {
  return ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff);
}

This is the output when I push down the button a number of times.
# node test2.js
Press <ctrl>+C to exit.
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0
button value is now 0

The value is never 1 and even if I

The gpio argument passed to the Gpio constructor is a GPIO number, not a pin number.
Try with:
var button = new Gpio(24, 'in', 'both');

rather than:
var button = new Gpio(18, 'in', 'both');

What I don't understand is why there was actually output on the terminal when the button was pressed. I wouldn't have expected any output as the incorrect argument was passed to the Gpio constructor.

I just gave this a try and the button state changes were detected:
$ sudo node t.js
Press <ctrl>+C to exit.
button value is now 1
button value is now 0
button value is now 1
button value is now 0
button value is now 1
button value is now 0
button value is now 1
button value is now 0

The button was connected to GPIO4 (pin 7) rather than GPIO24 (pin 18) but that shouldn't make a difference. See GPIO header.

Yeah you're right! Major oversight on my end... Thanks for taking the time and looking into it.


how to use jumpstep() method example

how to use jumpstep() method example

You can check this link. In step 2, if you click on Go to Step 1 it uses jumpToStep prop.


Updates on some of the repo files

@CoderBlee Thank you for your hard work documenting our processes. Can you fix the conflict please.

@CoderBlee -
I'm sorry but we need to close this issue. Here are the following reasons:

There is no single issue that this project resolves.
The templates have personal information in them.
The changes to policy and procedure were not approved by the council or leadership team.

Please reach out to us on our discord. We appreciate the effort that you put into this and we want to help you get a PR pushed. We hope you will continue working with us.


cyw43: add support for WPA3 and more extensive security options.

what it says on the tin.
cc @andrewdavidmackenzie can you give this a test? It can successfully join a mikrotik AP configured to do WPA3 only.

cyw43: use enum for ioctl instead of consts.
cyw43: log ioctls.
cyw43: add support for WPA3 and more extensive security options.

I'll need to swing by the office, where we have WPA3. Can do today or tomorrow. Is that soon enough?

ah it's a corp network. Is it using WPA3 Personal or Enterprise? Enterprise is totally different and will require quite a bit of work to support.

Hmmm... Seems to have changed from WPA3 to WPA2 Personal during my week of PTO! :-(
Not convinced this is not "Pilot error", so let me try a bit more....
#[non_exhaustive]
rror[E0639]: cannot create non-exhaustive struct using struct expression
   --> src/porky.rs:169:23
    |
169 |               "open" => JoinOptions {
    |  _______________________^
170 | |                 auth: JoinAuth::Open,
171 | |                 ..Default::default()
172 | |             },

Ouch...

No worries:
        let mut join_options = JoinOptions::new(ssid_pass.as_bytes());

        match SSID_SECURITY {
            "open" => join_options.auth = JoinAuth::Open,
            "wpa" => join_options.auth = JoinAuth::Wpa,
            "wpa2" => join_options.auth = JoinAuth::Wpa2,
            "wpa3" => join_options.auth = JoinAuth::Wpa3,
            _ => {
                error!("Security '{}' is not supported", SSID_SECURITY);
                return None;
            }
        };

I've just tested the same code (shown above) trying to connect to my Personal (Android) hotspot with WPA2-Personal and WPA3-Personal.
WPA2-Personal   --> OK
WPA3-Personal   --> No luck.

On the Corporate network (now using WPA2 Personal according to my Mac), I cannot connect at all. :-(

On my home WPA2 network - no issues, all OK.


Remove generic array

With this change generic-array is removed as an requirement for lorawan-device and for anyone not using default-crypto. This is an alternative to https://github.com/lora-rs/lora-rs/pull/290 and would fix
https://github.com/lora-rs/lora-rs/issues/126

My main concern currently is usage of [u8; 256] as common type for both lorawan-device and lorawan-encoding.
Just wondering wheter we should use type alias for that in a similar way I did in#290 by defining the DataPayloadArray.

I could do that. Taking it further, do we even need the length to be generic?

My main concern currently is usage of [u8; 256] as common type for both lorawan-device and lorawan-encoding.
Just wondering wheter we should use type alias for that in a similar way I did in#290 by defining the DataPayloadArray.

I could do that. Taking it further, do we even need the length to be generic?

I don't think so. We eventually need to "cut" it if it exceeds maximum allowed length though.

Actually looking at it now I only use [u8; 256] in the default-crypto new impl and that one is only used for tests. The creators uses an AsMut generic which is fine I think.
DataPayloadCreator however checks if the buffer is shorter than 255 which makes anything other than [u8;255] pretty useless. I guess the check should be for whatever the shortest message would be instead. Also adding checks when building the message with a payload.


KenLM based content detection

What's missing is a light kenlm model for integration testing OR mocking

Coverage is broken, we'll fix that on dev post merge.


[Proposal] Additional syntax for input -> output files, at the least when used via --compress-streams=

Right now we have to use this syntax:
qpdf --compress-streams=y --object-streams=generate input_file.pdf output_file.pdf

So, first input, then the output file.
No wait .... it first has to be output file, then input file, which regularly confuses me
as I expect the reverse order.
Would it be possible to add two more commandline flags to qpdf in general; or at
the least when using --compress-streams?
Those would be --input-file= # and --input= as alias
as well as --output-file= # and --output= as alias
The above command would then be rewritten as:
qpdf --compress-streams=y --object-streams=generate --input-file=input_file.pdf --output-file=output_file.pdf

Perhaps I am the only one who trips up over this; but, then again, perhaps I am not
and future folks may find this issue request here and agree or disagree on the suggestion made herein. :)
Thank you for reading this issue request.

Sorry for not replying, but I don't understand. The order already is input-file.pdf output-file.pdf.


Cross environment support?

The README was a little sparse on details on how to not write code for Windows.

Pretty sure I'm able to write no code on any OS and arch.
(Testing...)
Yep, it even works on Android.


Rate Component

Why use shortid? For-loop index not working as expected?

Why use shortid? For-loop index not working as expected?

@ssysm it's not the best practice of React to use index based keys

ok, understood.


View history for moving camera

Is your feature request related to a problem? Please describe.
It would be nice if one could visualize a moving camera easily with the viewer instead of having to modify the logging to achieve this. One possible solution is to show the history of the moving camera (with some stride #tbd). Right now it only shows the most recent pose, and overlays the image in the frustum.
Describe the solution you'd like
Showing the history for cameras should respect the history of transforms as well.

I suspect this is related to https://github.com/rerun-io/rerun/issues/723


Feature request: realtime output of actions

It would be useful, especially for long running tasks, to see action output as it occurs. At it's simplest, something similar to the output of st2 run, just as it occurs.

There may be a similar feature request out there, but I couldn't find it.

Thanks for the feature report.
You are correct, there is already an issue for that - https://github.com/StackStorm/st2/issues/2175
One of the workarounds you could do in the mean time (I know some users did that) is to use tee and also redirect action / command output to a file and then you can tail this file.
I will close this issue and let's continue the discussion in #2175.

:+1:


taker: eventually blind

Include blinded utxos when selecting inputs.
Blind the added outputs.
If the taker has only blinded utxos and uses confidential
addresses, the result transaction will have 1 input and 2 outputs
unblinded (the ones from the maker and the fee output) while the
remaining inputs and outputs will be blinded.

ack 8741ec544e7f5f9046e87c2dbb8301e7c5b5a832


OPNSense checksum does not match

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

[X ] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[ X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Describe the bug
OPNSense can be downloaded from https://opnsense.org/download/  where the page mentions that the appropriate checksum is ec08755245017cd449a8d174b6ea7c4e2038c454a8abecfad0d0378729d8b331
On this page https://docs.opnsense.org/manual/install.html#download-and-verification
there is a mention that from now on, the checksum is processed BEFORE zipping, so you need to unzip the archive before verifying the checksum.
The thing is, the checksum given by the download site is the one of the zipped file, not the one of the img file contained in it, which is a5e7e1c72b72a4e43d51da81706bae0205e340793219692e6f9ec4c03542d585
To Reproduce
Steps to reproduce the behavior:

Go to 'https://opnsense.org/download/'
See the advertised checksum value of ec08755245017cd449a8d174b6ea7c4e2038c454a8abecfad0d0378729d8b331
Go to 'https://docs.opnsense.org/manual/install.html#download-and-verification'
See the big orange warning saying to "Make sure to unpack the image using bunzip2 before verifying. Our signatures are generated before compressing them (as of OPNsense version 24.1)"
unzip the downloaded image
compute the SHA256 of the .img file
see the mismatch

Expected behavior
The advertised checksum should be the proper one.
Describe alternatives you considered
Easy enough to work around that and validate that the archive is still authentic but a proper documentation would be important.
Screenshots
Relevant log files
Additional context
Running proxmox here and it includes a built-in checksum validation for ISO files. It rejected the OPNSense image because of the bad checksum.
Environment
OPNsense 24.1 (amd64).

Checksum check is before unzip, signature verification after unzip. It’s pretty clear so maybe you’re just confusing the two methods.
Cheers,
Franco

Indeed...

indeed


Add SequenceOf/SetOf list-like slicing support

Codecov Report

Merging #168 into master will decrease coverage by 0.06%.
The diff coverage is 64.7%.

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
- Coverage   85.61%   85.54%   -0.07%
==========================================
  Files          29       29
  Lines        4199     4214      +15
==========================================
+ Hits         3595     3605      +10
- Misses        604      609       +5

Impacted Files
Coverage Δ

pyasn1/type/univ.py
83.46% <64.7%> (-0.21%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf9b3f5...279e57e. Read the comment docs.


System scope tasks seem to have problems when XDG_RUNTIME_DIR is set

I ran into some problems with synthesized host records in systemd-resolved, and was using this collection to inject dropins.
Using the latest version, I see consistent hangs at this point:
TASK [fedora.linux_system_roles.systemd : Reload systemd] ******************************************
task path: /home/mjackson/.ansible/collections/ansible_collections/fedora/linux_system_roles/roles/systemd/tasks/main.yml:106
<srv-f41-t3.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: None
<srv-f41-t3.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' srv-f41-t3.imladris.lan '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<srv-f41-t3.imladris.lan> (0, b'/home/mjackson\n', b'')
<srv-f41-t3.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: None
<srv-f41-t3.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' srv-f41-t3.imladris.lan '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/mjackson/.ansible/tmp `"&& mkdir "` echo /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742 `" && echo ansible-tmp-1733538959.9283075-90102-130389421889742="` echo /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742 `" ) && sleep 0'"'"''
<srv-f41-t3.imladris.lan> (0, b'ansible-tmp-1733538959.9283075-90102-130389421889742=/home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742\n', b'')
Using module file /usr/lib/python3.13/site-packages/ansible/modules/systemd.py
<srv-f41-t3.imladris.lan> PUT /home/mjackson/.ansible/tmp/ansible-local-898670xmituke/tmpjv3ozbn2 TO /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/AnsiballZ_systemd.py
<srv-f41-t3.imladris.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' '[srv-f41-t3.imladris.lan]'
<srv-f41-t3.imladris.lan> (0, b'sftp> put /home/mjackson/.ansible/tmp/ansible-local-898670xmituke/tmpjv3ozbn2 /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/AnsiballZ_systemd.py\n', b'')
<srv-f41-t3.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: None
<srv-f41-t3.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' srv-f41-t3.imladris.lan '/bin/sh -c '"'"'chmod u+x /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/ /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/AnsiballZ_systemd.py && sleep 0'"'"''
<srv-f41-t3.imladris.lan> (0, b'', b'')
<srv-f41-t3.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: None
<srv-f41-t3.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' -tt srv-f41-t3.imladris.lan '/bin/sh -c '"'"'/usr/bin/python3 /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/AnsiballZ_systemd.py && sleep 0'"'"''
<srv-f41-t3.imladris.lan> (1, b'\x1b[1;31m==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====\r\n\x1b[0mAuthentication is required to reload the systemd state.\r\nMultiple identities can be used for authentication:\r\n 1.  Local Admin (localadmin)\r\n 2.  Martin Jackson (mjackson)\r\nChoose identity to authenticate as (1-2): \r\n{"failed": true, "msg": "failure 1 during daemon-reload: Reload daemon failed: Method call timed out\\n", "invocation": {"module_args": {"daemon_reload": true, "scope": "system", "daemon_reexec": false, "no_block": false, "name": null, "state": null, "enabled": null, "force": null, "masked": null}}}\r\n', b'Shared connection to srv-f41-t3.imladris.lan closed.\r\n')
<srv-f41-t3.imladris.lan> Failed to connect to the host via ssh: Shared connection to srv-f41-t3.imladris.lan closed.
<srv-f41-t3.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: None
<srv-f41-t3.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/bcb77c72d4"' srv-f41-t3.imladris.lan '/bin/sh -c '"'"'rm -f -r /home/mjackson/.ansible/tmp/ansible-tmp-1733538959.9283075-90102-130389421889742/ > /dev/null 2>&1 && sleep 0'"'"''
<srv-f41-t3.imladris.lan> (0, b'', b'')
failed: [srv-f41-t3.imladris.lan] (item=root) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "daemon_reexec": false,
            "daemon_reload": true,
            "enabled": null,
            "force": null,
            "masked": null,
            "name": null,
            "no_block": false,
            "scope": "system",
            "state": null
        }
    },
    "item": "root",
    "msg": "failure 1 during daemon-reload: Reload daemon failed: Method call timed out\n"
}

PLAY RECAP *****************************************************************************************
srv-f41-t3.imladris.lan    : ok=18   changed=2    unreachable=0    failed=1    skipped=27   rescued=0    ignored=0

These things seem not to happen when XDG_RUNTIME_DIR is not set. (I'm not sure that's the problem, but it kind of looks like that).
Here are the playbook and template I was running: (the unit reload at the end works fine without the extra env var setting):
---
- name: Test playbook
  hosts: all
  gather_facts: true
  tasks:
    - name: Gather service facts
      ansible.builtin.service_facts:

    - name: Fix systemd-resolved if needed
      become: true
      when:
        - ansible_facts['services']['systemd-resolved.service']['status'] is defined
        - ansible_facts['services']['systemd-resolved.service']['status'] == "enabled"
      block:
        - name: Manage systemd for systemd-resolved
          ansible.builtin.include_role:
            name: fedora.linux_system_roles.systemd
          vars:
            systemd_dropins:
              - systemd-resolved.service.conf.j2

        - name: Bounce systemd-resolved
          ansible.builtin.systemd:
            daemon_reload: true
          when: dropin_stat is changed

        - name: Bounce systemd-resolved
          ansible.builtin.service:
            name: systemd-resolved
            state: restarted
          when: dropin_stat is changed

And the template:
[Service]
Environment=SYSTEMD_RESOLVED_SYNTHESIZE_HOSTNAME=0

I've done some more experimentation, removing the setting of XDG_RUNTIME_DIR from the lsr.systemd role. I'm a little surprised to see the polkit authentication; I don't see that in interactive sessions, so I don't understand what's happening. I suspect my IPA domain might have something to do with it too, but not certain there either.

I've done some more experimentation, removing the setting of XDG_RUNTIME_DIR from the lsr.systemd role. I'm a little surprised to see the polkit authentication; I don't see that in interactive sessions, so I don't understand what's happening. I suspect my IPA domain might have something to do with it too, but not certain there either.

What version of the role are you using?  What is the platform and version of the managed node?  What version of ansible are you using?

Thanks for responding!

1.91.0 of fedora.linux_system_roles from Galaxy
Primarily Fedora 41, but I also replicated the behavior on a current CentOS 9-stream node
Packaged Ansible 2.16 from Fedora 41

I tried again with a freshly installed system (i.e. without all my "local customizations", stock Fedora 41 netinst install, upgraded to the lastest as of today and no special auth configuration, with a similar result (localadmin is the starting user with the ability to sudo by virtue of being in the wheel group), got a similar result:
TASK [fedora.linux_system_roles.systemd : Reload systemd] ******************************************
task path: /home/mjackson/.ansible/collections/ansible_collections/fedora/linux_system_roles/roles/systemd/tasks/main.yml:106
<<IP_ADDRESS>> ESTABLISH SSH CONNECTION FOR USER: localadmin
<<IP_ADDRESS>> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' <IP_ADDRESS> '/bin/sh -c '"'"'echo ~localadmin && sleep 0'"'"''
<<IP_ADDRESS>> (0, b'/home/localadmin\n', b'')
<<IP_ADDRESS>> ESTABLISH SSH CONNECTION FOR USER: localadmin
<<IP_ADDRESS>> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' <IP_ADDRESS> '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/localadmin/.ansible/tmp `"&& mkdir "` echo /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491 `" && echo ansible-tmp-1733595418.2672923-140165-107891766592491="` echo /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491 `" ) && sleep 0'"'"''
<<IP_ADDRESS>> (0, b'ansible-tmp-1733595418.2672923-140165-107891766592491=/home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491\n', b'')
Using module file /usr/lib/python3.13/site-packages/ansible/modules/systemd.py
<<IP_ADDRESS>> PUT /home/mjackson/.ansible/tmp/ansible-local-1399466vjmnydi/tmpuc7qk8a8 TO /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/AnsiballZ_systemd.py
<<IP_ADDRESS>> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' '[<IP_ADDRESS>]'
<<IP_ADDRESS>> (0, b'sftp> put /home/mjackson/.ansible/tmp/ansible-local-1399466vjmnydi/tmpuc7qk8a8 /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/AnsiballZ_systemd.py\n', b'')
<<IP_ADDRESS>> ESTABLISH SSH CONNECTION FOR USER: localadmin
<<IP_ADDRESS>> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' <IP_ADDRESS> '/bin/sh -c '"'"'chmod u+x /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/ /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/AnsiballZ_systemd.py && sleep 0'"'"''
<<IP_ADDRESS>> (0, b'', b'')
<<IP_ADDRESS>> ESTABLISH SSH CONNECTION FOR USER: localadmin
<<IP_ADDRESS>> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' -tt <IP_ADDRESS> '/bin/sh -c '"'"'XDG_RUNTIME_DIR=/run/user/0 /usr/bin/python3 /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/AnsiballZ_systemd.py && sleep 0'"'"''
<<IP_ADDRESS>> (1, b'\x1b[1;31m==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ====\r\n\x1b[0mAuthentication is required to reload the systemd state.\r\nAuthenticating as: Local Admin (localadmin)\r\nPassword: \r\n{"failed": true, "msg": "failure 1 during daemon-reload: Reload daemon failed: Method call timed out\\n", "invocation": {"module_args": {"daemon_reload": true, "scope": "system", "daemon_reexec": false, "no_block": false, "name": null, "state": null, "enabled": null, "force": null, "masked": null}}}\r\n', b'Shared connection to <IP_ADDRESS> closed.\r\n')
<<IP_ADDRESS>> Failed to connect to the host via ssh: Shared connection to <IP_ADDRESS> closed.
<<IP_ADDRESS>> ESTABLISH SSH CONNECTION FOR USER: localadmin
<<IP_ADDRESS>> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="localadmin"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/2e23c0c65c"' <IP_ADDRESS> '/bin/sh -c '"'"'rm -f -r /home/localadmin/.ansible/tmp/ansible-tmp-1733595418.2672923-140165-107891766592491/ > /dev/null 2>&1 && sleep 0'"'"''
<<IP_ADDRESS>> (0, b'', b'')
failed: [<IP_ADDRESS>] (item=root) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "daemon_reexec": false,
            "daemon_reload": true,
            "enabled": null,
            "force": null,
            "masked": null,
            "name": null,
            "no_block": false,
            "scope": "system",
            "state": null
        }
    },
    "item": "root",
    "msg": "failure 1 during daemon-reload: Reload daemon failed: Method call timed out\n"
}

I was able to run this successfully (against an f41 node and a centos-10 stream node) with ansible_user=root (as opposed to going in as another user and elevating), using an entry in authorized_keys. Here's the output for the reload task at -vvv:
task path: /home/mjackson/.ansible/collections/ansible_collections/fedora/linux_system_roles/roles/systemd/tasks/main.yml:106
<srv-kea-t.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: root
<srv-kea-t.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' srv-kea-t.imladris.lan '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<srv-kea-t.imladris.lan> (0, b'/root\n', b'')
<srv-kea-t.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: root
<srv-kea-t.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' srv-kea-t.imladris.lan '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310 `" && echo ansible-tmp-1733606172.0344079-162252-52835113562310="` echo /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310 `" ) && sleep 0'"'"''
<srv-kea-t.imladris.lan> (0, b'ansible-tmp-1733606172.0344079-162252-52835113562310=/root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310\n', b'')
Using module file /usr/lib/python3.13/site-packages/ansible/modules/systemd.py
<srv-kea-t.imladris.lan> PUT /home/mjackson/.ansible/tmp/ansible-local-162039sjqi5lfs/tmpzls1ro2f TO /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/AnsiballZ_systemd.py
<srv-kea-t.imladris.lan> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' '[srv-kea-t.imladris.lan]'
<srv-kea-t.imladris.lan> (0, b'sftp> put /home/mjackson/.ansible/tmp/ansible-local-162039sjqi5lfs/tmpzls1ro2f /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/AnsiballZ_systemd.py\n', b'')
<srv-kea-t.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: root
<srv-kea-t.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' srv-kea-t.imladris.lan '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/ /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/AnsiballZ_systemd.py && sleep 0'"'"''
<srv-kea-t.imladris.lan> (0, b'', b'')
<srv-kea-t.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: root
<srv-kea-t.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' -tt srv-kea-t.imladris.lan '/bin/sh -c '"'"'XDG_RUNTIME_DIR=/run/user/0 /usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/AnsiballZ_systemd.py && sleep 0'"'"''
<srv-kea-t.imladris.lan> (0, b'\r\n{"name": null, "changed": false, "status": {}, "invocation": {"module_args": {"daemon_reload": true, "scope": "system", "daemon_reexec": false, "no_block": false, "name": null, "state": null, "enabled": null, "force": null, "masked": null}}}\r\n', b'Shared connection to srv-kea-t.imladris.lan closed.\r\n')
<srv-kea-t.imladris.lan> ESTABLISH SSH CONNECTION FOR USER: root
<srv-kea-t.imladris.lan> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/mjackson/.ansible/cp/fd3a0fc429"' srv-kea-t.imladris.lan '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1733606172.0344079-162252-52835113562310/ > /dev/null 2>&1 && sleep 0'"'"''
<srv-kea-t.imladris.lan> (0, b'', b'')
ok: [srv-kea-t.imladris.lan] => (item=root) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "daemon_reexec": false,
            "daemon_reload": true,
            "enabled": null,
            "force": null,
            "masked": null,
            "name": null,
            "no_block": false,
            "scope": "system",
            "state": null
        }
    },
    "item": "root",
    "name": null,
    "status": {}
}

I have spent some more time with this, and I see that the current galaxy linux-system-roles seems to lag the latest version of this repo by a bit. I have gotten the things I want to get working, working, by making the following changes (to the lsr version, but I think the same things will apply here):

Add user_id to the fact subset.
Set become: true regardless of user. (For some reason even when ansible_user_id is root, when I initially connected as a nonprivlieged user, I got the command timeout).
become_user -> become_user: "{{ item if item != ansible_user_id else omit }}"

My reasoning for this is that it is conceivable that you would connect as a non-root user, and want to manage both non-root units and root units in the same play. By checking user_id you can see what you've connected as. (Though I think there might be a problem here if you're connected as a non-privleged user, expect to escalate to root to manage system units, but become comes out as "false" because the user in the dict is root but you're not necessarily connected as root). I wonder if it would be OK to always set become_user; it would be a proper error I think if the ansible user is unable to become any of the users that want to manage and in general I think users can become themselves.
I will work on submitting a proper PR. My hope is that this doesn't screw anything up for older versions of RHEL that we have to support.

I have spent some more time with this, and I see that the current galaxy linux-system-roles seems to lag the latest version of this repo by a bit.

It should not, at least for "real" fixes and features.  There are a lot of commits related to testing, ci, etc. that might not be in the published role or collection, but all fixes and features in the Galaxy published code should be up-to-date.

I have gotten the things I want to get working, working, by making the following changes (to the lsr version, but I think the same things will apply here):
1. Add `user_id` to the fact subset.

2. Set `become: true` regardless of user. (For some reason even when ansible_user_id is root, when I initially connected as a nonprivlieged user, I got the command timeout).

3. become_user -> `become_user: "{{ item if item != ansible_user_id else omit }}"`

My reasoning for this is that it is conceivable that you would connect as a non-root user, and want to manage both non-root units and root units in the same play. By checking user_id you can see what you've connected as. (Though I think there might be a problem here if you're connected as a non-privleged user, expect to escalate to root to manage system units, but become comes out as "false" because the user in the dict is root but you're not necessarily connected as root). I wonder if it would be OK to always set become_user; it would be a proper error I think if the ansible user is unable to become any of the users that want to manage and in general I think users can become themselves.
I will work on submitting a proper PR. My hope is that this doesn't screw anything up for older versions of RHEL that we have to support.

Thanks for looking at this!
Yeah, the differences were not enormous. Mostly formatting and a couple of things like that. The comments I made here predate the PR.
As an update: the PR sets become: true unconditionally, and likewise sets the become_user to the target user for the unit or dropin unconditionally.
I was able to test this on F41, on CentOS 9-stream, and on a fresh almalinux 8 in my homelab. I am unaware of other potential pitfalls. I think generally:

becoming a user you already are should work in most situations
It should be safe to become another unprivileged user. If you cannot in fact do that, the role will fail, as I think it should

There seem to be a number of potential gotchas here, though, so I completely understand caution. :)

The design philosophy for the system roles is:

the user should be able to control the default become behavior - hard-coding become: true defeats that
almost everything a system role does requires root - installing packages, managing system services, managing system config files in /etc[1] - so it is expected that users will typically run ansible with the root user on the manage nodes, or otherwise run ansible in such a way that the result is if all tasks had been run with become: true and become_user: root.

The proposed PR goes against that, but from what you have reported, it seems like the right thing to do.
Note that I borrowed this implementation from the podman system role quadlet support, and that has been used extensively to manage user quadlets, so I'm surprised we haven't seen this issue there.
[1] I realize that there are ways around that for determined/savvy users, but that is far from typical


Build as a shared library

Checklist

[x] Used a fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Also adding myself as a maintainer, but I can revert this specific change if someone is against it.

I think the previous package should be moved to broken.

@dschreij Sorry I messed up with yesterday's release. It should be fine now.

Thanks!


Kataw and Concrete Syntax Tree (CST)

Kataw have have moved forward and are now using a CST instead of AST to make it easier to print, lint and minify, and the parser are no longer using the "old concept" of tokens. In fact. There is no more tokens in the parser - the CST / AST kind have been merged into one.
SyntaxKind.Identifier is both the SyntaxKind and what is known from other parsers as token.
"kind": 122, is the  SyntaxKind.Identifier.
{
    "kind": 122,
    "statements": [
        {
            "kind": 120,
            "expression": {
                "kind": 81921,
                "value": "foo",
                "raw": "foo",
                "flags": 768,
                "start": 0,
                "end": 3
            },
            "flags": 128,
            "start": 0,
            "end": 3
        }
    ],
    "isModule": false,
    "text": "foo",
    "fileName": "__root__",
    "flags": 0,
    "diagnostics": [],
    "start": 0,
    "end": 3
}

If we need to extract some CST info, it can for example be done like this node.flags & NodeFlags.IsStatement.
This is how it looks like if we parse if (x) {} else { while(y) { z = 1; } }. As we can see, the keywords are part of the CST.
{
    "kind": 122,
    "statements": [
        {
            "kind": 164,
            "ifKeyword": {
                "kind": 37757019,
                "flags": 768,
                "start": 0,
                "end": 2
            },
            "expression": {
                "kind": 81921,
                "value": "x",
                "raw": "x",
                "flags": 768,
                "start": 4,
                "end": 5
            },
            "consequent": {
                "kind": 249,
                "block": {
                    "kind": 124,
                    "statements": [],
                    "multiLine": false,
                    "flags": 128,
                    "start": 8,
                    "end": 8
                },
                "flags": 128,
                "start": 6,
                "end": 9
            },
            "elseKeyword": {
                "kind": 4194389,
                "flags": 768,
                "start": 9,
                "end": 14
            },
            "alternate": {
                "kind": 249,
                "block": {
                    "kind": 124,
                    "statements": [
                        {
                            "kind": 154,
                            "whileKeyword": {
                                "kind": 37757028,
                                "flags": 768,
                                "start": 16,
                                "end": 22
                            },
                            "expression": {
                                "kind": 81921,
                                "value": "y",
                                "raw": "y",
                                "flags": 768,
                                "start": 23,
                                "end": 24
                            },
                            "statement": {
                                "kind": 249,
                                "block": {
                                    "kind": 124,
                                    "statements": [
                                        {
                                            "kind": 120,
                                            "expression": {
                                                "kind": 125,
                                                "left": {
                                                    "kind": 81921,
                                                    "value": "z",
                                                    "raw": "z",
                                                    "flags": 768,
                                                    "start": 27,
                                                    "end": 29
                                                },
                                                "operatorToken": {
                                                    "kind": 67174402,
                                                    "flags": 768,
                                                    "start": 27,
                                                    "end": 31
                                                },
                                                "right": {
                                                    "kind": 81921,
                                                    "value": 1,
                                                    "raw": "1",
                                                    "flags": 768,
                                                    "start": 31,
                                                    "end": 33
                                                },
                                                "flags": 256,
                                                "start": 27,
                                                "end": 33
                                            },
                                            "flags": 128,
                                            "start": 27,
                                            "end": 34
                                        }
                                    ],
                                    "multiLine": false,
                                    "flags": 128,
                                    "start": 27,
                                    "end": 34
                                },
                                "flags": 128,
                                "start": 25,
                                "end": 36
                            },
                            "flags": 128,
                            "start": 16,
                            "end": 36
                        }
                    ],
                    "multiLine": false,
                    "flags": 128,
                    "start": 16,
                    "end": 36
                },
                "flags": 128,
                "start": 14,
                "end": 38
            },
            "flags": 128,
            "start": 0,
            "end": 38
        }
    ],
    "isModule": false,
    "text": "if (x) {} else { while(y) { z = 1; } }",
    "fileName": "__root__",
    "flags": 0,
    "diagnostics": [],
    "start": 0,
    "end": 38
}

Punctuators  are not part of the CST too keep the CST small.  Instead the concept 'lists' has been used and it conforms to the ECMA specs.
For example a(). Here we are using 5.1.5 Grammar Notation - ArgumentList, so we know the exact start and end values for this empty list.
LineBreak and trailingComma is it's own property on some of the nodes.
Number and string literal and identifiers got their own raw property .

@aladdin-add Do I need to add more info into this AST / CST?

Simple parameter list information can be extracted from the formal param AST nodes like this
node.flags & NodeFlags.NoneSimpleParamList

Public API methods has been added and can be used to extract info from the CST nodes. It will be documented later on.


Remove this package -- added to text/template in go 1.6

See: https://golang.org/doc/go1.6#template
https://golang.org/pkg/text/template/#hdr-Text_and_spaces
The {{- and -}} template delimiters are similar to the fork usage in this package.

Yes I’m aware that it’s been folded in, but it’s still in use.


Build for master is broken

See, for example here: https://github.com/microsoft/vscode/runs/378090027

We're aware of this, thanks

@connor4312 So, what will happen with PRs? How are you going to check them? Or are they suspended until you fix the master?


Using sessions in 0http?

Just asking if it's possible to use sessions (similar to express-session) in 0http?
Or if there is any known implementation of such

I think you should be able to use express-session normally, as far as I can recall it's not really reliant on express. Otherwise, you can check restana which is heavily based on 0http (and where I think I had a positive experience running express-session)


Open applicationHost.config with code, the file appears to be empty, even if it is not

VSCode Version: 1.1.1
OS Version: Windows 8.1

Steps to Reproduce:

Navigate to path C:\Windows\System32\inetsrv\config
opening config folder will ask for your permission, give it
open applicationHost.config
in Code, the file looks to be empty, event if it is not. opening it with Notepad++ works.
Running code as administrator + drag & drop the file gives and error "the path ... does not seem to exist anymore on disk"
I tried using Visual Studio 2015 Update 2 to open it, but I cannot. It does not appear in "Open File Dialog"

@npandrei can you try to read the file using node.js to see if that returns empty already?

A number of days has past without answer on the questions asked. I am thereby going to close this issue to clean up our backlog of issues. Once you can answer on the questions, the issue can be reopened again. Thanks for understanding this process!

Hey Guys.
Same for me:
VSCode: 1.9.1
OS: Windows 10 Enterprise N
Steps to reproduce file NOT opening:

GIve your username full control of  C:\Windows\System32\inetsrv\config, so that you can open the file. VSCode will advise you dont have permissions to save it otherwise.
Navigate to path C:\Windows\System32\inetsrv\config (Make sure IIS is installed using Add Feature)
opening config folder will ask for your permission, give it
open applicationHost.config in Code, the file looks to be empty.
Open it in Notepad and it does contain the xml in question.

VSCode Snippet:

Notepad Snippet:

Now if i copy the file to my desktop and open it, VSCode WILL open it.
applicationHost.txt
Included a version of the file here as well but renamed it .TXT for github to allow it.

Please see if you can find any logged output that could help us find the source of the issue:

run code --verbose from the command line and attach the output
in Code select Help | Toggle Developer Tools and select the Console
attach any output you see in the Console you can find

Thanks!

I just read about this: Windows SYSWOW32 redirection
https://forums.iis.net/t/1160210.aspx?missing+applicationhost+config
This may be why code can't see this file

ack, https://github.com/Microsoft/vscode/issues/7611