[Bug]: Small vertical line before powerline and box drawing characters in Nerd Fonts

Checklist

[X] I have read the appropriate section in the contributing guidelines
[X] I believe this issue is a problem with polybar itself and not a misconfiguration on my part
[X] I have searched for other open and closed issues that may have already reported this problem
[X] I have checked the known issues page for this problem.
[X] I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce
polybar -c config.ini main
Minimal config
[bar/main]
font-0 = "Literation Mono Nerd Font:size=22"
modules-left = mod1 mod2
background = #ffffff
foreground = #000000

width = 100

[module/mod1]
type = custom/text
label = " %{+u}█%{+u}█%{+u}█"

[module/mod2]
type = custom/text
label = █
label-foreground = #dddddd
label-background = #000000

Polybar log
notice: Parsing config file: config.ini
notice: Loading module 'mod1' of type 'custom/text'
notice: Loading module 'mod2' of type 'custom/text'
notice: Loaded 2 modules
notice: Loaded font "Literation Mono Nerd Font:size=22" (name=LiterationMono Nerd Font, offset=0, file=/usr/share/fonts/TTF/Literation Mono Nerd Font Complete.ttf)

Expected behavior
All the characters should be flush without a gap in between.
Actual behavior
There is a 1px red-ish gap before the box-drawing character with black foregound and a blue-ish gap before the box-drawing character with a gray foreground.
Window Manager and Version
HerbstluftWM 0.9.5
Linux Distribution
ArchLinux
Polybar version
polybar 3.6.3-80-g30e1cc25

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override  -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override

Additional Context / Screenshots

I initially thought this was the same issue as #2785, but the fix for that issue does nothing here.
This only happening when there is a tag in between is a strong indication of a similar underlying problem though.

I experience similar issues nearly every time the nerd fonts library is updated
on the latest nerd font update, the powerline symbols seem fine in every application expect polybar there's some weird screen tearing effects now on every status update

It also happened with me when i updated my system. ( Polybar was already on highest version - it could be that in that update nerd fonts were in there. )

looks like this could be an issue with x11 or something in the graphics stack, im able to reproduce the issue in gvim

The problem still exists, but I was able to identify that it was due to anti-aliasing. If antialias=false for the font, the line goes away but the powerline symbols looks awful. I have powerline symbols on the left and right of each module by the format suffix and prefix, each module has its own color and but the vertical line color is the same across all modules, which lead me to suspect that it is solely anti-aliasing problem of the font.

disabling anti-aliasing doesn't fix it for me in polybar or gvim. I forgot to mention it, but I also don't have any issues with the font glyphs in alacritty only polybar / gvim

https://github.com/polybar/polybar/wiki/Formatting#offset-o
This is the method that I followed to offest the characters a to hide the vertical line.
If the same glyph is used more than one time, I would suggest declaring it in variable with the offest one time rather than repeating it across the configuration.

Thanks for the link and suggestion. I'm sure I've sailed past it a few times over the years. Now I can put the section to some use.

@Asem-Ashraf You're right this does look like an anti-aliasing issue. The font renderer inserts pixels with different colors to make edges look smoother. In most cases, this is desirable, but for the straight edges where powerline symbols and the like are supposed to connect together, this creates these small vertical lines.
Small Example
[bar/main]
font-0 = "Literation Mono Nerd Font:antialias=off:size=17;3"
; font-0 = "Literation Mono Nerd Font:antialias=on:size=17;3"
modules-left = mod1
background = #ffffff
foreground = #000000

width = 200
height = 48

override-redirect = true

[module/mod1]
type = custom/text
label = " %{+u}███%{+u}█ %{+u} "

With anti-aliasing:

Without anti-aliasing:

For the half-circles you may need to zoom in a bit, the left one has a small line in the middle when anti-aliasing is turned on.
There are two problems here. For one, as seen in the two circles, adding a formatting tag in between, causes a line to appear.
The reason for that is that the two half-circles are rendered separately (because the formatting tag could have changed something, so the rendering is split up into separate chunks with different formatting values) and so each rendering may decide to add this vertical line for anti-aliasing.
If there is no tag in the middle (right circle), the font renderer decides, in this case, that this is not necessary in between the half circles.
The second problem is the anti-aliasing itself. We can see this in the rectangle on the left. The rectangle is made out of full size block elements. Some of them have a formatting tag in between, but not all and still all of them have vertical lines due to anti-aliasing.
I don't see a satisfying solution for this. Some partial solutions:
Turning off anti-aliasing
This will solve the issue these vertical lines, but most other stuff will look ugly. As seen above, the half circles will not look very smooth, the same goes for anything else that does not exclusively have vertical and horizontal edges, including text.
@jayywolff You have reported that turning off anti-aliasing does not work for you. However, I think in your case the symbols are also slightly too small and don't fill out the full width, also causing a gap. Try playing around with the size for the powerline symbols.
Turning off anti-aliasing only for specific characters
This requires multiple font definitions and manually setting the non-antialias font for all desired characters.
It does solve unrelated characters not looking smooth, but things like powerline symbols which still have no anti-aliasing to get rid of these vertical lines still look ugly.
Negative 1px offset
As described above by @Asem-Ashraf, one can manually apply a negative 1px offset before or after these symbols (depending on where the vertical lines occur) to have the subsequent text move back 1 pixel and basically overwrite the 1px vertical line.
This should indeed work as long as the discolored vertical line from anti-aliasing is only 1 pixel wide.
It is however very tedious to do and you also lose 1 pixel from the icons which may make them look slightly off (especially for the half circles).

I have been looking into how to solve this in the code and have so far been unsuccessful.
I have tried to render something with pango, which I hoped would not have this issue, but I was able to replicate the same behavior:

This was produced with the following markup string:
 ████  

As you can see, simply breaking up the two half circles (on the left) with a zero-width element, has the same effect as in polybar and the full size block elements also all exhibit the same anti-aliasing artifact.
i3bar has a similar problem:

The full size block elements also have these vertical bars. For some reason the half circles overlap, so we can't do any comparisons there.
So does tint2:

tint2 doesn't seem to have any kind of formatting syntax, so we can't insert anything between the half circles like we did in polybar. But the block elements all also have the vertical lines.

I have no idea how to solve this or if it even is solvable. Unless anyone has an idea for how to approach this, I will have to put this on the back burner.


Reorder columns in RC

ID
Title
Workflow
Current Step
Time on Step
Status
Systems
Switchboards
Circuits
Tags
HT Tags
Areas
Comm Packs
Phase
Due date
State
last Modified
Create At

@idrisbo yes please -> here is the issue for that -> https://github.com/orgs/equinor/projects/636/views/7?pane=issue&itemId=52661321


HTML file generation: notes get wrapped in  tags

This is probably related to the code re-write in v0.10 where you mention that bugs may exist given how big of a re-write this was.
Compare these two text files of the inner HTML of the note-content div in v0.9 and the latest master.
Here is an image with the arrow pointing to the note where the issue occurs. After that, everything is wrapped in <b> tags:

PS: Yes, it's a weird note... but it did work correctly in the previous version!

Thanks for raising this issue. I'm going to pend this one while I look into merging #69 since this isn't a breaking bug.

This should now be fixed after 87dd32c02efcfeeffb908701cb159dd8840f9246. Could you please confirm?


Would TPV be able to tell between a job sent by a workflow and a job sent directly by a user?

I'm thinking on some different rules for jobs that come from workflows and jobs that come from users, I wonder if we can tell them apart. I would like workflow jobs to have re-trials when the error is unknown (besides OOMs, etc), but have direct user jobs only have retrials on specified errors (OOMs, walltime, etc) but not on unknown errors. Thanks!

The workflow_invocation_uuid is available as a context variable, so I think it should be possible to differentiate between the two cases. Something like this could work:
tools:
  default:
    resubmit:
      with_more_mem_on_failure:
        condition: memory_limit_reached and attempt <= {1 if workflow_invocation_uuid else 3}
        destination: tpv_dispatcher

...mmm... no, doesn't seem to work:
tpv.rules.gateway INFO 2023-03-10 16:49:36,000 [pN:job_handler_0,p:8,tN:JobHandlerQueue.monitor_thread] Watching for changes in file: /galaxy/server/config/persist-seq-extra-tpv.yaml
galaxy.jobs.mapper ERROR 2023-03-10 16:49:36,099 [pN:job_handler_0,p:8,tN:JobHandlerQueue.monitor_thread] Caught unhandled exception while attempting to cache job destination:
Traceback (most recent call last):
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 236, in __cache_job_destination
    self.cached_job_destination = self.__determine_job_destination(
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 224, in __determine_job_destination
    job_destination = self.__handle_dynamic_job_destination(raw_job_destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 204, in __handle_dynamic_job_destination
    return self.__handle_rule(expand_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 207, in __handle_rule
    job_destination = self.__invoke_expand_function(rule_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 124, in __invoke_expand_function
    return expand_function(**actual_args)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/rules/gateway.py", line 50, in map_tool_to_destination
    return ACTIVE_DESTINATION_MAPPER.map_to_destination(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 143, in map_to_destination
    context, late_evaluated_entity = self.match_combine_evaluate_entities(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 133, in match_combine_evaluate_entities
    late_evaluated_entity = combined_entity.evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 457, in evaluate_late
    return super(EntityWithRules, new_entity).evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 368, in evaluate_late
    new_entity.resubmit = self.evaluate_complex_property(self.resubmit, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 223, in evaluate_complex_property
    return self.process_complex_property(
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 206, in process_complex_property
    return func(prop, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 224, in <lambda>
    prop, context, lambda p, c: self.loader.eval_code_block(p, c, as_f_string=True))
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/loader.py", line 53, in eval_code_block
    return eval(eval_block, locals)
  File "<string>", line 1, in <module>
NameError: name 'workflow_invocation_uuid' is not defined
galaxy.jobs.handler DEBUG 2023-03-10 16:49:36,100 [pN:job_handler_0,p:8,tN:JobHandlerQueue.monitor_thread] Intentionally failing job with message (Encountered an unhandled exception while caching job destination dynamic rule.)
galaxy.jobs.mapper ERROR 2023-03-10 16:49:36,111 [pN:job_handler_0,p:8,tN:JobHandlerQueue.monitor_thread] Caught unhandled exception while attempting to cache job destination:
Traceback (most recent call last):
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 236, in __cache_job_destination
    self.cached_job_destination = self.__determine_job_destination(
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 224, in __determine_job_destination
    job_destination = self.__handle_dynamic_job_destination(raw_job_destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 204, in __handle_dynamic_job_destination
    return self.__handle_rule(expand_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 207, in __handle_rule
    job_destination = self.__invoke_expand_function(rule_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 124, in __invoke_expand_function
    return expand_function(**actual_args)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/rules/gateway.py", line 50, in map_tool_to_destination
    return ACTIVE_DESTINATION_MAPPER.map_to_destination(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 143, in map_to_destination
    context, late_evaluated_entity = self.match_combine_evaluate_entities(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 133, in match_combine_evaluate_entities
    late_evaluated_entity = combined_entity.evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 457, in evaluate_late
    return super(EntityWithRules, new_entity).evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 368, in evaluate_late
    new_entity.resubmit = self.evaluate_complex_property(self.resubmit, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 223, in evaluate_complex_property
    return self.process_complex_property(
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 206, in process_complex_property
    return func(prop, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 224, in <lambda>
    prop, context, lambda p, c: self.loader.eval_code_block(p, c, as_f_string=True))
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/loader.py", line 53, in eval_code_block
    return eval(eval_block, locals)
  File "<string>", line 1, in <module>
NameError: name 'workflow_invocation_uuid' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/galaxy/server/lib/galaxy/jobs/handler.py", line 701, in __verify_job_ready
    job_destination = job_wrapper.job_destination
  File "/galaxy/server/lib/galaxy/jobs/__init__.py", line 2420, in job_destination
    return self.job_runner_mapper.get_job_destination(self.params)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 255, in get_job_destination
    return self.__cache_job_destination(params)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 245, in __cache_job_destination
    raise JobMappingException(ERROR_MESSAGE_RULE_EXCEPTION)
galaxy.jobs.mapper.JobMappingException: Encountered an unhandled exception while caching job destination dynamic rule.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 236, in __cache_job_destination
    self.cached_job_destination = self.__determine_job_destination(
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 224, in __determine_job_destination
    job_destination = self.__handle_dynamic_job_destination(raw_job_destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 204, in __handle_dynamic_job_destination
    return self.__handle_rule(expand_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 207, in __handle_rule
    job_destination = self.__invoke_expand_function(rule_function, destination)
  File "/galaxy/server/lib/galaxy/jobs/mapper.py", line 124, in __invoke_expand_function
    return expand_function(**actual_args)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/rules/gateway.py", line 50, in map_tool_to_destination
    return ACTIVE_DESTINATION_MAPPER.map_to_destination(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 143, in map_to_destination
    context, late_evaluated_entity = self.match_combine_evaluate_entities(app, tool, user, job)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/mapper.py", line 133, in match_combine_evaluate_entities
    late_evaluated_entity = combined_entity.evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 457, in evaluate_late
    return super(EntityWithRules, new_entity).evaluate_late(context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 368, in evaluate_late
    new_entity.resubmit = self.evaluate_complex_property(self.resubmit, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 223, in evaluate_complex_property
    return self.process_complex_property(
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in process_complex_property
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 208, in <dictcomp>
    evaluated_props = {key: self.process_complex_property(childprop, context, func)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 206, in process_complex_property
    return func(prop, context)
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/entities.py", line 224, in <lambda>
    prop, context, lambda p, c: self.loader.eval_code_block(p, c, as_f_string=True))
  File "/galaxy/server/.venv/lib/python3.10/site-packages/tpv/core/loader.py", line 53, in eval_code_block
    return eval(eval_block, locals)
  File "<string>", line 1, in <module>
NameError: name 'workflow_invocation_uuid' is not defined
galaxy.jobs DEBUG 2023-03-10 16:49:36,112 [pN:job_handler_0,p:8,tN:JobHandlerQueue.monitor_thread] (2627) fail(): Job destination raised JobMappingException('Encountered an unhandled exception while caching job destination dynamic rule.'), caching fake '__fail__' destination for completion of fail method

would workflow_invocation_uuid be a first class variable or perhaps is visible inside other dictionary?

Which version of TPV are you using? workflow_invocation_uuid was added in tpv 2+.

@pcm32 Did this work ok/can we close this issue?

I'll close this for now. Please reopen if it's still an issue.


(Blazor Wasm) Fixes duplication of sections in security docs, broken links and typos

The Name and role claim with API authorization and Profile Service sections on the Blazor WebAssembly > hosted with identity server security docs were duplicated. This PR removes that duplication.
It also fixes a couple of broken links to the Authorize attribute docs and a small typo.

Thanks @chrissainty ...

That dup of content likely occurred when Javier fixed the factory for the various values that can come down in the role claim. I obviously didn't build locally, and I can't see the internal build. My bad. Thanks for fixing it.
I don't care for the original layout: It's too difficult to grok the two Server app approaches for establishing the role claim (API auth options or Profile Service). I made some additional updates here that I hope clarifies it.
WRT the link: Yesterday, there was a massive (500 line) update PR for API doc crosslinks. This one was a victim of large-scale cut-'n-paste and snuck past eyeballing the PR diff. I don't want to fix it like this tho: The goal of the links is to link to both the topic and the API docs. All that it needs is for a bracket to be removed.
WRT "username"/"user name": @scottaddie The manual is using "username" (one word), but we're using "user name" (two words) everywhere (AFAICT from a quick search). Did the guidance change at some point?

Given that the doc is in rough shape at the moment, I'm going to 🚓 Emergency Merge:tm: 🚒 this now. I'll :eyes: LOOK :eyes: this time at the live topic.
@scottaddie, let me know on the "username" vs. "user name" situation. I'm about to kill the en dash layout elements in favor of ye olde colon-space syntax, and that's a good patch PR to update our use of "user name" to "username" if that's what we're going to do. :ear:

@guardrex That all makes sense, I agree, the name CustomUserFactory is a better choice and fits in with existing examples.
I agree about the layout, the reason I spotted these issues was because i was brushing up on the newer approached for Blazor Wasm; it took me a few passes to realise that API auth options and profile service were alternate approaches for handling role claims.


YTM - Track artist matches previous track, not current

OS: Windows
GPMDP Version: 4.6.0 with Youtube Music
Issue Descriptions: Current track is shown with artist from previous played track
Steps to Reproduce:

Start playing a playlist with multiple artists
Skip to next song
Check the song artist in either window title, or windows media control dialog
Expected: Artist matches the song
Actual: Artist matches the previous song in the playlist

Also the track progression is not working, maybe same reason.

Same issue on MacOS

Same issue on Ubuntu

Having the same issues on Archlinux (Antergos)

Having same issue. Honestly quite annoying when I want to know who sings a song

This issue also affects Discord Rich Presence integration.

Same issue on Ubuntu 18.04.
I believe I figured out why though. When there's a track change the YTM interface changes the track name nearly instantly but the the other information (Artist, Album, Like) is changed approximately half a second later. So the problem is that GPMDP scrapes the YTM interface instantly after the track changes but before everything excepting the track name has changed.
This can be checked by clicking the next track button while paying attention to the Artist name, it changes slightly after the track name. I've tested it in GPMDP as well as in Google Chrome.
I haven't had time to check where a change could be made, but a quick and ugly fix would be to update the artist and album information when the time gets updated. The best way to fix it would possibly be by scraping with a small delay after the track changes.
Hope this helps anybody looking into solving this problem, I'll try this weekend if I get the time.

I haven't had time to check where a change could be made, but a quick and ugly fix would be to update the artist and album information when the time gets updated. The best way to fix it would possibly be by scraping with a small delay after the track changes.

I think "when the time gets updated" is a better solution. "with a small delay" implies that we know the delay is consistent, and that it won't change in the future.

It should be relatively easy to code around this with some checks to see if the track name has changed.  Something like if new artist/time elapsed reset, but track not changed -> wait X seconds -> repeat check.

Alright considering the closing of that issue, whats the status of fixing this bug

I haven't heard of anyone making progress. We know the cause of it but idk if anyone is working on it.

I'm on my phone right now, once I'm home I'll fork and see if I can fix it

If anyone hasn't tackled this yet, instead of using the html selectors in the YTM api, it may be possible to dive into the __data__ on the ytmusic-player-bar node in the DOM. Cursory glancing shows all the data is present.
// Album:
document.getElementsByTagName('ytmusic-player-bar')[0].__data__.playerPageWatchMetadata_.albumName.runs[0].text

// Track Title
document.getElementsByTagName('ytmusic-player-bar')[0].__data__.playerPageWatchMetadata_.title.runs[0].text

// Artist
document.getElementsByTagName('ytmusic-player-bar')[0].__data__.playerPageWatchMetadata_.byline.runs[0].text

// Year
document.getElementsByTagName('ytmusic-player-bar')[0].__data__.playerPageWatchMetadata_.byline.runs[4].text

 document.getElementsByTagName('ytmusic-player-bar')[0].__data__.playing_ for playing status, for state checking
also heres the object itself, from firefox
{
  "title": {
    "runs": [
      {
        "text": "One More Time"
      }
    ]
  },
  "byline": {
    "runs": [
      {
        "text": "Daft Punk",
        "navigationEndpoint": {
          "clickTrackingParams": "CBMQkGsYACITCMPwldzxt98CFRnYnAod5VoJBg==",
          "browseEndpoint": {
            "browseId": "UCRr1xG_2WIDs18a6cIiCxeA"
          },
          "trackingParams": null
        }
      },
      {
        "text": " • "
      },
      {
        "text": "Discovery",
        "navigationEndpoint": {
          "clickTrackingParams": "CBMQkGsYACITCMPwldzxt98CFRnYnAod5VoJBg==",
          "musicEntityBrowseEndpoint": {
            "pageId": "DETAIL",
            "entityId": {
              "musicAlbumReleaseEntity": "Eg1iXzdsdE0zNGtyMG1IIBEoAQ%3D%3D"
            }
          },
          "trackingParams": null
        }
      },
      {
        "text": " • "
      },
      {
        "text": "2001"
      }
    ]
  },
  "secondaryByline": {
    "runs": [
      {
        "text": "2.4M views"
      },
      {
        "text": " • "
      },
      {
        "text": "41K likes"
      }
    ]
  },
  "secondaryTitle": {
    "runs": [
      {
        "text": "One More Time"
      }
    ]
  },
  "viewCountText": {
    "runs": [
      {
        "text": "2,499,015 views"
      }
    ]
  },
  "likeButton": {
    "likeButtonRenderer": {
      "target": {
        "videoId": "fa5IWHDbftI"
      },
      "likeStatus": "INDIFFERENT",
      "likeCount": 41096,
      "likeCountText": {
        "runs": [
          {
            "text": "41K"
          }
        ]
      },
      "likeCountWithLikeText": {
        "runs": [
          {
            "text": "41K"
          }
        ]
      },
      "dislikeCount": 8349,
      "dislikeCountText": {
        "runs": [
          {
            "text": "8.3K"
          }
        ]
      },
      "dislikeCountWithDislikeText": {
        "runs": [
          {
            "text": "8.3K"
          }
        ]
      },
      "trackingParams": "CBUQpUEiEwjD8JXc8bffAhUZ2JwKHeVaCQY=",
      "likesAllowed": true,
      "serviceEndpoints": [
        {
          "clickTrackingParams": "CBUQpUEiEwjD8JXc8bffAhUZ2JwKHeVaCQY=",
          "likeEndpoint": {
            "status": "LIKE",
            "target": {
              "videoId": "fa5IWHDbftI"
            }
          }
        },
        {
          "clickTrackingParams": "CBUQpUEiEwjD8JXc8bffAhUZ2JwKHeVaCQY=",
          "likeEndpoint": {
            "status": "DISLIKE",
            "target": {
              "videoId": "fa5IWHDbftI"
            }
          }
        },
        {
          "clickTrackingParams": "CBUQpUEiEwjD8JXc8bffAhUZ2JwKHeVaCQY=",
          "likeEndpoint": {
            "status": "INDIFFERENT",
            "target": {
              "videoId": "fa5IWHDbftI"
            }
          }
        }
      ],
      "dislikeNavigationEndpoint": {
        "clickTrackingParams": "CBUQpUEiEwjD8JXc8bffAhUZ2JwKHeVaCQYyDGRpc2xpa2VfbmV4dEjS_e2Gh4uS130=",
        "watchEndpoint": {
          "videoId": "yQBGdXGCUbA",
          "playlistId": "RDMMT3MP_RnlgwE",
          "index": 3,
          "params": "EAIYATgB"
        }
      }
    }
  },
  "trackingParams": "CBMQkGsYACITCMPwldzxt98CFRnYnAod5VoJBg==",
  "links": [
    {
      "compactLinkRenderer": {
        "icon": {
          "iconType": "ADD_TO_PLAYLIST"
        },
        "title": {
          "runs": [
            {
              "text": "Add to playlist"
            }
          ]
        },
        "trackingParams": "CBQQp0wYACITCMPwldzxt98CFRnYnAod5VoJBg==",
        "navigationEndpoint": {
          "clickTrackingParams": "CBQQp0wYACITCMPwldzxt98CFRnYnAod5VoJBg==",
          "addToPlaylistEndpoint": {
            "videoId": "fa5IWHDbftI"
          }
        }
      }
    }
  ],
  "albumName": {
    "runs": [
      {
        "text": "Discovery"
      }
    ]
  }
}

also @jostrander we need a position grabber, because the position that mpris reports is dead wrong

mpris:length
64-bit integer: The duration of the track in microseconds.

just looked at the specification

actually i can parse position and length fine. i just divide by 1,000,000 to get the amount of seconds

Fixed by #3586


Support various batch size in port binding rally-ovs job

@mestery do you think this is a valid enhancement? I can understand that logical ports could be created in a batch; in other word the CMS (e.g., neutron) issues an ovs command containing creating multiple lports (ovn-nb lp-add p1 -- p2 -- p3...). However, does it make sense to batch binding operations in a single hypervisor? Thanks.


Use continuous memory region for weights and gradients

Each parameter currently uses separate memory region for their data and gradient. It requires separate call of zero filling for each gradient at the beginning of gradient computation (zerograds), which may be an overhead in some cases. The overhead is also incurred in optimizers.
Many frameworks combine regions of those parameters into one contiguous memory area. We can add a similar feature to Chain/ChainList by collecting the parameters, allocating two big arrays (for parameter and gradient, resp.), and resetting the parameters and gradients by their slices. It would improve the performance of zerograds and optimizers.

Close since it's old. Reopen or make a new one if anyone is still interested in it.


Bot not responding

Hi Community,
The app has been uploaded and I could see the new employee checklist in the tab but the bot is not responding on the commands. Is there any way that I can fix this?

Hi @Vijay-Gunashekaran,
Thank you for raising the query here, can you please check the application insights to see if any exceptions logged for us to understand better on this issue.

Hi @Porkai-Pandian , thanks for the reply. I have seen the application insights and it says no exception. Is there anything that I am missing?.

@AsharmaS4 please share your email id so that we can connect over the call to troubleshoot the issue.

Hi @Porkai-Pandian, My email address is<EMAIL_ADDRESS>You can call me at any time. Thank you for the support.


mbed-cli ignores config when mbed_app.json invalid

mbed-cli builds anyway when mbed_app.json is invalid, which leads to unexpected debugging errors.

cc @theotherjimmy

I also noticed the exactly same thing yesterday. I copied some defines from git and had something like this in mbed_app.json:
   "macros": ["MACRO1",
               "MACRO2",
+               "MACRO3"],

So I had a + sign there, which I did not notice for a while and got very strange fails in compilation :-)
Maybe mbed-cli could do some validation for critical configuration files?

Okay guys, mbed tools do report the error, it's just hidden by tonnes of output.
For example:

cat mbed_app.json : ,
mbed compile

Error parsing './mbed_app.json':
No JSON object could be decoded
Building project mbed-os-example-fat-filesystem (K64F, GCC_ARM)
Scan: .
Scan: FEATURE_LWIP
Scan: FEATURE_COMMON_PAL
Scan: FEATURE_UVISOR
Scan: FEATURE_BLE
Scan: FEATURE_LOWPAN_ROUTER
Scan: FEATURE_ETHERNET_HOST
Scan: FEATURE_NANOSTACK
Scan: FEATURE_THREAD_END_DEVICE
Scan: FEATURE_THREAD_ROUTER
Scan: FEATURE_THREAD_BORDER_ROUTER
Scan: FEATURE_LOWPAN_BORDER_ROUTER
Scan: FEATURE_NANOSTACK_FULL
Scan: FEATURE_LOWPAN_HOST
Scan: FEATURE_STORAGE
Scan: mbed
Scan: env

I take it that you are requesting that it stops and does not continue.

See ARMmbed/mbed-os#4098 for a fix.


bug in save_data

@wangyinz and I had exchanged some email about this problem, but I now know the cause of the problem.  I am leaving this entry here for the record.  This is an urgent bug fix as it creates wf_TimeSeries entries that are pretty much useless.   The problem was found in revisions to the getting_started tutorial.   Within the current version of that tutorial is this block of code:
i=0
for doc in cursor:
    if i in keepers:
        origin_time=doc['time']
        # We need the ObjectId of the source to provide a cross reference to link our
        # waveform data to the right source.  Better to do this now than later as association
        # can be a big challenge
        id=doc['_id']

        print('Starting on event number',i,' with origin time=',UTCDateTime(origin_time))
        stime=origin_time+start_offset
        etime=origin_time+end_offset
        strm=client.get_waveforms(
            starttime=UTCDateTime(stime),
            endtime=UTCDateTime(etime),
            network='TA',
            channel='BH?',
            location='*'
        )
        # The output of get_waveforms is an obspy Stream object. Stream objects are iterable
        # so we work through the group, converting each to a MsPASS TimeSeries, and then saving
        # the results to the database. \
        import pdb; pdb.set_trace()
        for d in strm:
            d_mspass=Trace2TimeSeries(d)
            # Here is where we save the id linked to the source collection.
            # We use a MsPASS convention that such metadata have name collection_id
            d_mspass['source_id'] = id
            d_mspass=db.save_data(d_mspass)
            count += 1
    else:
        print('Skipping event number ',i,' with origin time=',UTCDateTime(origin_time))
    i += 1

Noting this job is fetching waveform data from iris with obspy.  Then all it is doing is converting the waveforms to mspass data objects and saving them to the database with the default use of the db.save_data function.
The bug is that this context creates incomplete wf_TimeSeries documents.    The symptom I saw was that the stock seed station codes "net", "sta", and "chan" where not being saved.
My code block above shows how I enabled pdb to find this error while running a notebook.  I preserve that here as it is a very very helpful trick to debug a notebook.   It actually goes way back and we need to add something about that usage in a new user manual section we need to produce on debugging a workflow.
With pdb I was able to figure out what happened.  The logic of the following section of the save_data method is flawed:
    927             for k in copied_metadata.keys():
    928                 if save_schema.is_defined(k):
    929                     if save_schema.readonly(k):
    930                         if k in changed_key_list:
    931                             newkey = "READONLYERROR_" + k
    932                             copied_metadata.change_key(k, newkey)
    933                             mspass_object.elog.log_error(
    934                                 "Database.save_data",
    935                                 "readonly attribute with key="
    936                                 + k
    937                                 + " was improperly modified.  Saved changed value with key="
    938                                 + newkey,
    939                                 ErrorSeverity.Complaint,
    940                             )
    941                         else:
    942                             copied_metadata.erase(k)

where I pasted the section from pdb created with the list command.  The problem is that in the context the workflow above we have this value for changed_key_list:
ipdb>  print(changed_key_list)
{'time_standard', 'utc_convertible', 'starttime', 'source_id', 'npts'}

But note this line:
ipdb>  print(save_schema.readonly("sta"))
True

I get the same result for "net" and "chan".   Because "net", "sta", and "chan" are not in the changed_key_list the above logic causes them to be erased from the data inserted to form the new document for the data being saved.
I'm not quite sure how to fix this without breaking something else or I would blunder forward.   This exists because of the need to handle the "readonly" data problem, but the logic here fails because in this context "net", "sta", and "chan" really aren't changed because they were defined during the construction of the data object and didn't "change" but were created.
This urgently needs to be fixed, but as I said I'm not sure what the right solution is that won't create a different problem.    One thing I propose is that we should consider making "net", "sta", "chan", and "loc" special attributes.  The four letter word of SEED is so locked into those four attributes they may need special designation.
The other element is that when I look a bit deeper I think the root of this problem is treating updates and adds for documents somewhat similarly in the Database class may be the root of this problem.   That is, I think all metadata traffic in Database goes through the update_metadata method.  Seems we ought to have a way to handle data more cleanly when the operation is "add" instead of "update".   That is the root of this problem, I think.

I think we've been through this issue before. Basically the core of the problem is in a given workflow, what should be readonly and what shouldn't be. I remember that our conclusion is that the data download and data processing workflows are distinctively different, and the problem here is using the wrong schema for the wrong workflow. I though we got this resolved by having different sets of schema, and the mspass_lite.yaml should not have this problem.
I just checked and can see that it does not have the problematic readonly definition: https://github.com/mspass-team/mspass/blob/44aa03372470bd3f8a18eb6636698c247de1c0e2/data/yaml/mspass_lite.yaml#L209-L247
If you use this one, it should save the miniseed codes correctly I think.

I'm testing this further after you, @wangyinz, sent me an email suggesting this was related to a known issue with readonly attributes.   I think I did make an error in the above debugging wherein I meant to use "mspass_lite" but got "mspass" for the schema instead.  However, that mistake may have been good because it detected this error.   That is, this particular error is really bad.  If a user innocently did this (remember mspass is the default schema) they would create a database that was unusable.   The reason is that when the wf_TimeSeries collection is created in the above context there are no values of net, sta, chan in the documents.   Since I didn't do normalization to define a "channel_id" attribute when saved that way there is no way the waveforms indexed by the wf_TimeSeries collection can be associated with the correct channel metadata.   I might be able to make this tutorial work by using mspass_lite (I'm running that test as I'm composing this) but that is just a temporary workaround if it works.
I looked at the code for the save_data method and conclude the fundamental problem here is that the code for that function has been through too many modifications to patch issues without rethinking the overall design.   I see a couple things I think we should fix:

I think that when we run in "promiscuous" mode all metadata contents should be saved without any edits of any kind.   i.e. everything is just saved without any tests.   A slight modification is it might still be prudent to do type tests or tests for nulls.
I think we need to encapsulate all the metadata manipulation code into one or more private methods that any save function can call.   The recently added save_ensemble_binary_file method, for example, largely cloned this flawed code block.   Creating a private method to handle this common task will regularize that behavior.
Because seed/miniseed data is so universal for mspass we probably should rethink the default schema.   In particular, I think we it would be appropriate to have net, sta, chan, and loc to allowed as plain value keys in wf_TimeSeries and wf_Seismogram.  By that I mean a TimeSeries or Seismogram object would allow content like the following (in python format for clarity):

  {"net" : "TA:,
    "channel_net" : "TA",
    "sta" : "S22A:,
    "channel_sta" : "S22A",
    "chan" : "BHZ:,
    "channel_chan" : "BHZ"
}

Allowing item 3 would fix this bug.   Item 1 and 2 would just clean up the code base.

As noted I reran the offending workbook again with this change to define the database handle:
from mspasspy.db.database import Database
import mspasspy.client as msc
dbclient=msc.Client(schema='mspass_lite.yaml')
db = dbclient.get_database("getting_started")

I get the same behavior.   That is very mysterious because I even looked at mspass_lite in the data/yaml directory and it does not have net, sta, chan, and loc set readonly.   I am not sure why that is happening.  @wangyinz you should be able to recreate this as I'm working with the current instance of the "getting_started" tutorial in the notebooks directory of the tutorial repository.

Oh, I see the problem. I don't think there is such a thing mspasspy.client.Client(schema='mspass_lite.yaml'). There is no schema option in the client. This is indeed a design flaw as we don't have anything other than the default database constructor to specify
the schema. Currently, the schema should be set by the set_metadata_schema and set_database_schema methods. i.e.,
from mspasspy.db.schema import DatabaseSchema, MetadataSchema
from mspasspy.db.database import Database
import mspasspy.client
dbclient = mspasspy.client.Client()
db = dbclient.get_database("getting_started")
db.set_metadata_schema(MetadataSchema('mspass_lite.yaml'))
db.set_database_schema(DatabaseSchema('mspass_lite.yaml'))

Good, that explains why the workaround failed.   What this did, however, remains a bug we need to eventually squash.   I think we should, as I suggested above, use this as a reason to clean up the Database class implementation.    We should probably not close this issue until that has been done.


Define reasonable response patterns for deprecated Patient identities

PIXm https://github.com/IHE/ITI.PIXm/issues/120
For PDQm, it is possible for someone to query by id, or to get by id. In those cases the reasonable response patterns mentioned for PIXm on merge should also be addressed. right?
Given that PDQm (might) know of prior Patient Identities that have been Merged or simply Deprecated (Deleted).
When a query happens requesting specifically that prior identity by Patient.id or Patient.identity
Then there should be a set of reasonable response patterns that the server could be configured to use
And a client would expect to be able to handle any of these defined reasonable response patterns
Return 404
Return 404 with an OperationOutcome pointing to the surviving id
Return redirect to the new identity
???
see https://confluence.hl7.org/display/PA/Merge+Operation

follow guidance from HL7. Return 200. Based on query parameter for status return empty (because asked for active), or the old in the bundle with the status inactive/deprecated.

CP should be written. Follow example of PMIR - https://profiles.ihe.net/ITI/PMIR/ITI-93.html#23934131-post-mergedelete-expectations

Spencer will address this in the $match public-comment


add flag to specify image pull secret for echo apps

Allows the tests to be run in environments with private registries by providing the framework with a secret to pull images.

@stevenctl: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
70ef58443cb7fe3fa81d581c96240dfb0100b060
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
70ef58443cb7fe3fa81d581c96240dfb0100b060
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
39a19d38d96de4c3fe1082ace91e3e0a4c52e5c4
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stevenctl: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

gencheck_istio
39a19d38d96de4c3fe1082ace91e3e0a4c52e5c4
link
/test gencheck_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

In response to a cherrypick label: new pull request created: #30459

In response to a cherrypick label: new pull request created: #30459

In response to a cherrypick label: new pull request created: #30460

In response to a cherrypick label: new pull request created: #30460


Having troubles

i actually dont undestand how to use the fastapi... what the hell i have to pass to X-Gorgon, for example? you could provide an example script just for 1 request. Apprecciate ur work ❤

params is query string parameters of url
if full url is https://example.com/some/other?a=b&c=d&e=f
params= a=b&c=d&e=f
req.headers is dictionary of http headers that is to be sent on http request.
like
headers={
    "User-Agent":"okhttp",
    "Cookie":"key=value",
    ...
}

calculate method would return dictionary of X-Gorgon and X-Khronos values which can be used together with other headers
So
You can use it like
from lib.XGorgon import XGorgon

params="aweme_id=6937964355933752578&origin_type=web&request_source=0&os_api=22&device_type=HUAWEI+MLA-L12&ssmix=a&manifest_version_code=2021706030&dpi=160&uoo=0&carrier_region=NP&region=NP&carrier_region_v2=429&app_name=musical_ly&version_name=17.6.3&timezone_offset=20700&ts=1678782&ab_version=17.6.3&residence=NP&cpu_support64=false&current_region=NP&storage_type=0&ac2=wifi&app_type=normal&ac=wifi&host_abi=armeabi-v7a&update_version_code=2021706030&channel=googleplay&_rticket=1678782468&device_platform=android&iid=6876014652904638209&build_number=17.6.3&locale=en&op_region=NP&version_code=170603&timezone_name=Asia%2FKatmandu&cdid=9427c791-1bcf-46aa-a2c4-750eab0bf6a8&openudid=9a73a6e22b4a6ee2&sys_region=NP&device_id=6860034884988601862&app_language=en&resolution=540*960&os_version=5.1.1&language=en&device_brand=HUAWEI&aid=1233"
headers={
   "Cookie":"session_id=xxxxx",
   "User-Agent":"okhttp",
   "Some":"Other HTTP headers can go here"
}

XG=XGorgon()
xgValue=XG.calculate(params,headers)

xgValue can be something like
{
  "X-Gorgon":"04048074400092ebc955ebebd34bdbaf980cd4ce7b5f4a52dc32"
 "X-Khronos":"1618477389"
}

alright, thanks. another thing: may i ask you to make a guide on how you managed to reverse these algorithms? so people in future could update them!

also, am i doing something wrong or Gorgon and Khronos are not enough to make a successful request to tiktok api?


Animate ListView.builder [Question]

Hello at all.
Is there any posibility to animate a ListView.builder in the same way,
as used for animating lists of widgets?
https://pub.dev/packages/flutter_animate#animating-lists
Thanks and best regards

yeah i need this too

Is there a reason you wouldn't just apply the animations in your itemBuilder?

Would'nt that apply the effects at the same time for each item in that list ? the property interval is missing at this point i guess, so we can't animate each item separately. If i missed out anything please point it out for me.

All interval does is set a delay based on the index, which you can do inside itemBuilder.
Rough sketch:
itemBuilder: (_, i) => MyWidget().animate(delay: (i * 200).ms).fadeIn()

@gskinner thanks I will try it. 👍

@gskinner But this will animate the items every time i scroll the view.
What i want is only an inital animation wenn the items are loaded.
but i see - not possible per default so i have to do some custom work (loading flag e.g.).
Thanks anyway for your fast reply - btw awsome lib, gthanks for that.

All interval does is set a delay based on the index, which you can do inside itemBuilder.
Rough sketch:
itemBuilder: (_, i) => MyWidget().animate(delay: (i * 200).ms).fadeIn()

Makes sense yes, thanks for the enlightenment.

@gskinner would be awesome with an extension or way to achieve list animations in ListBuilders, while avoiding re-animating the same item list again, once it becomes visible

@gskinner could we re-open this? Using the workaround of applying the animation in itemBuilder results in the animation replaying every time you scroll.


Upload files without opening them

In its current implementation, it looks like you have to read in the entire file before uploading, which is memory intensive/prohibitive when working with large files. It would be nice to be able to pass an open file object that is streamed to the server.
Requests already supports file objects, the big change will be calculating the sha1 hash.

Requests file's feature is to send in files in a dict for named fields, usually on a web form. To send in files to b2, you must use the data property. And as you said, I'm not sure how to calculate a sha1 with an unopened file.
This is an interesting idea though so I'm going to leave it open. If anyone has any implementation thoughts, please let me know.

requests can also take the file as data. See http://docs.python-requests.org/en/master/user/advanced/#streaming-uploads

Ah, very good call. Such a complex library. Now we just need to figure out how to calculate a standing sha1.

Here we can use buffers: https://stackoverflow.com/questions/22058048/hashing-a-file-in-python

Checkout the references to hex_digits_at_end  here.

Checkout the references to hex_digits_at_end here.

We still need to calculate the sha1 though. I don't think this takes away the calculation requirement.

I would need to sit down and do some testing, but I believe it would look something like this in connector.py:
BUF_SIZE = 1024 # 1k at a time? Not sure that's the best choice, but should be fine

....

if hasattr(file_contents, 'read'): # If it has `read`, then it's a file-like object that we can stream
  sha= sha1()
  buf = file_contents.read(BUF_SIZE)
  file_size = len(buf)
  while len(buf) > 0:
    sha.update(buf)
    buf = file_contents.read(BUF_SIZE)
  file_sha = sha.hexdigest()
  file_contents.seek(0) # Reset to beginning
# Otherwise, continue as usual

The only catch I can think of is file size, though the requests docs say that the Content-Length header is automatically added, so maybe just some logic not to manually add the header if it's a file object.
On a related note, I'm not sure that sys.getsizeof() is the right way to get the length of the content. It seems to get the size of the object in memory, but that includes some memory overhead. That said, it seems that Content-Length is overwritten anyway, so I think it could be removed in both cases and still work.

Yeah, Content-Length is overridden: http://docs.python-requests.org/en/master/user/quickstart/?highlight=content-length#custom-headers

You're right about content-length.  I'll fix it.

Pushed!  Enjoy!

@sibblegp Oh yea I wasn't saying calculation is required. Looking at the links you posted you could start the streaming request with the hex_digits_at_end header value and update the hash as the chunks are processed and write the final hash value at the end.

@patrick--  Ah, very interesting.  I'll consider that.


A bug in IE9+ when create notification

Hey @Nickersoft, thanks for your useful notification plugin.
I'm recently reading your source code to learn Notification API, and maybe I find a small mistake in your code.
in push.js, line 240~249,
// Clear any previous notifications
w.external.msSiteModeClearIconOverlay();
// ....
notification = {};

I notice you clean other notification before create new in IE9, so maybe what you wanna do is:
notifications = {};
// not notification = {};

Otherwise, It will throw an error when you addEventListener later.
Besides, I have opened a pull request for this small bug. THX.

See the comment left on the pull request. Closing.


Workspace - New workspace created after use the "Free Plan" on price page from OldDot.

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to NewDot and Log out
Navigate to OldDot and sign in with any account that has an existing Workspace
Navigate to staging.expensify.com/pricing and select the "Free Plan"
Verify you're redirected to NewDot > Workspace settings of a pre-existing workspace
Verify that you're logged in with the same account as in OldDot
Return to OldDot Tap on the back button

Expected Result:
No Workspace was created. This is a regression step (https://expensify.testrail.io/index.php?/tests/view/2318945&group_by=cases:section_id&group_id=228848&group_order=asc)   "Logged out of NewDot"
Actual Result:
Workspace was created.
Workaround:
Unknown
Platform:

Where is this issue occurring?

Web

Version Number: v1.1.89-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/186516499-cd164bba-a893-4dc2-9b59-71b3b1818456.mp4
Expensify/Expensify Issue URL:
Issue reported by:  Applause internal team
Slack conversation:
View all open jobs on GitHub

cc @aldo-expensify This is a consequence of this PR https://github.com/Expensify/Web-Expensify/pull/34547
I see this is confusing here, I think we would not want to create a new workspace when there already is one, but also this might be fine for now, I will ask in product!

yes, lol, the opposite was reported in this GH issue at the time: https://github.com/Expensify/Expensify/issues/221105

@kavimuru @mvtglobally Would you be able to confirm this change in the expected result of the regression test?

@mountiny we will update TC

Thank you, closing this then!


Use UnboundMethod#bind_call method instead to improve performance

Which issue(s) this PR fixes:
Fixes #
What this PR does / why we need it:
UnboundMethod#bind_call method had been introduced at Ruby 2.7 that it aims to improve performance.
Ref. https://bugs.ruby-lang.org/issues/15955
environment

Linux

Manjaro Linux x86_64
Kernel: 6.9.12-1-MANJARO
CPU: Intel i9-14900 (32) @ 5.500GHz
Compiler: gcc 14.1.1
Ruby: ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]

micro benchmark code
require 'bundler/inline'
gemfile do
  source 'https://rubygems.org'
  gem 'benchmark-ips'
end

class Foo
  def foo
  end
end

meth = Foo.instance_method(:foo)
obj = Foo.new

Benchmark.ips do |x|
  x.report("bind.call") {
    meth.bind(obj).call
  }
  x.report("bind_call") {
    meth.bind_call(obj)
  }

  x.compare!
end

result
$ ruby bind_call.rb
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]
Warming up --------------------------------------
           bind.call   766.396k i/100ms
           bind_call     1.651M i/100ms
Calculating -------------------------------------
           bind.call      7.967M (± 3.4%) i/s -     39.853M in   5.008135s
           bind_call     16.881M (± 4.8%) i/s -     85.852M in   5.097269s

Comparison:
           bind_call: 16880585.1 i/s
           bind.call:  7966891.3 i/s - 2.12x  slower

Docs Changes:
Release Note:

It is just a simple replacement.
So, I think it is ok if the CI passes :)


EL8 minimal install doesn't include tar

When testing on a minimal install of EL8 (RHEL and CentOS), tar isn't included which means I ended up with an error:
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": false, "cmd": "tar -xf /tmp/ansible.gwik8e25rke2-install.XXXXXXXXXX/rke2.linux-amd64.tar.gz -C /usr/local", "msg": "[Errno 2] No such file or directory: b'tar': b'tar'", "rc": 2}

It would be nice if tar was on the list for ansible to check/install or have it on the pre-requirements list.
Thanks!

@tuckcodes #74 I decided to just do it

This appears to be solved. Closing


Types or type stub file

Is there a plan to include types in the source or to produce a type stub file?

Based on #32 I don't see why he wouldn't accept a PR that includes types. It isn't much work to go through to make sure it comply with mypy (just some 300 LoC). I'd happily do it, unless you are faster. :).

hey @dineshbvadhia, I don’t really have any plans to do this atm, but if you like feel free to open a PR. I’d be more than happy to merge it.

sounds reasonable at this point.


cnspec: 10.1.4 -> 10.2.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/mondoohq/cnspec/releases.
meta.description for cnspec is: An open source, cloud-native security and policy project
meta.homepage for cnspec is: https://github.com/mondoohq/cnspec
meta.changelog for cnspec is: https://github.com/mondoohq/cnspec/releases/tag/v10.2.0
Updates performed

Golang update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 10.2.0 with grep in /nix/store/a81lcxrv11w0y08zhlh75rx75iyvkijf-cnspec-10.2.0
found 10.2.0 in filename of file in /nix/store/a81lcxrv11w0y08zhlh75rx75iyvkijf-cnspec-10.2.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
cnspec

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/a81lcxrv11w0y08zhlh75rx75iyvkijf-cnspec-10.2.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A cnspec https://github.com/r-ryantm/nixpkgs/archive/64bd44e5f557fed483327343ad682185c9858014.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/64bd44e5f557fed483327343ad682185c9858014#cnspec

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/a81lcxrv11w0y08zhlh75rx75iyvkijf-cnspec-10.2.0
ls -la /nix/store/a81lcxrv11w0y08zhlh75rx75iyvkijf-cnspec-10.2.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

cnspec

Maintainer pings
cc @fabaff @mariuskimmina for testing.

Duplicate of #286686


GO:0002221    pattern recognition receptor signaling pathway

GO:0002221    pattern recognition receptor signaling pathway
Add parent
GO:0002764   immune response-regulating signaling pathway

Actually I think the correct parent for both these terms is 'innate immune response activating cell surface receptor signaling pathway'
@hattrill many fly genes annotated to this - just checking with you also-
Thanks, Pascale

I see there are intracellular receptors - I will leave bother terms to GO:0002764   immune response-regulating signaling pathway, unless we find reason to do otherwise.
Thanks, Pascale

That sounds good to me - I was just looking and there are extracellular, TMRs and intracellular receptors.


Support for period/frequency

Option 1
struct Pedals {
    acc_pos @0: u8 | unit("%"),
    brake_pos @1: u8 | unit("%"),
}

impl can for Pedals {
    id: 10,
    device: "ecu",
    period: 15, /* Period in milliseconds*/

    signal brake_pos {
        bitstart: 16,
    },
}

Option 2
struct Pedals {
    acc_pos @0: u8 | unit("%"),
    brake_pos @1: u8 | unit("%"),
}

impl can for Pedals {
    id: 10,
    device: "ecu",
    frequency: 15, /* Frequency in Hz*/

    signal brake_pos {
        bitstart: 16,
    },
}

Decisions, decisions.
I would like to point out that comments as the ones after the frequency: and period: fields are not supported 😲.


Add a measuring tool to the UI

it would be very nice if said measuring tool snapped to edges of on field POIs :)

straightedges would be really nice, like in iOS screenshot tools.


Support BuildConfigs for openshift provider

When the provider is selected as openshift and if docker-compose file has build directive then create a buildconfig out of it, along with deploymentconfig and service

I want to work on this issue.

@rtnpro I am thinking of handling builds in multiple ways:

When user has git repo create a buildconfig and imagestream using that git directory info
But a user might also wanna do a local build, so he wants build to happen using dockerfile, so i am working on a parallel build story which will build docker images using imagebuilder and that image names can be added to deploymentconfig and made to use those images rather than pulling it from docker hub, so I am planning to add a flag to kompose cli which does this, but this assumes that user will be running a single node cluster using minikube or minishift or CDK and user will have to export some variables that enables us to talk to remote docker daemon.

But a user might also wanna do a local build, so he wants build to happen using dockerfile, so i am working on a parallel build story which will build docker images using imagebuilder and that image names can be added to deploymentconfig and made to use those images rather than pulling it from docker hub, so I am planning to add a flag to kompose cli which does this, but this assumes that user will be running a single node cluster using minikube or minishift or CDK and user will have to export some variables that enables us to talk to remote docker daemon.

To  be honest, I don't like assumption that user is using single node cluster.
And even than I don't think that majority of users are going to run kompose on same machine where their single node cluster is running. For example if I'm using minikube I'm never going to run kompose in minikube VM.

@kadel

We assume that user will run a single node only when that flag is provided
We can do builds on that cluster machine, only if the environment variables are exported, using imagebuilder. Remote builds are possible once we export those environments.
User will be running kompose on his machine not on the cluster machine.

My issue with this is that it is quite limiting :-( This requires that you have single node cluster, and that you have remote access to that docker daemon.
Wouldn't be better to build that image locally and that push it to OpenShift's registry? We have done similar thing in OpenShift2Nulecule. This will also work with clusters. OpenShift has already internal registry and for Kubernetes  we can use its registry addon as mentioned in https://github.com/skippbox/kompose/issues/97#issuecomment-239018220

So going ahead we right now only implement what OpenShift by default provides, which is detect the source code's git remote and create buildConfigs with that info in buildconfig artifact.
Further we still have to work on doing local builds without having to rely on remote git repo.

So going ahead we right now only implement what OpenShift by default provides, which is detect the source code's git remote and create buildConfigs with that info in buildconfig artifact.

Just to explain this more deeply how this is example who will work:
I have cloned repo github.com/foo/bar on my local machine.
In this repo is docker-compose.yml that looks like this:
versoin: 2
services:
   foo:
      build: ./

When you run kompose on this file, kompose will try to detect remote of this git and use it as source for build.
generated BuildConfig will probably look something like this:
  apiVersion: v1
  kind: BuildConfig
  metadata:
    name: foo
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: foo:latest
    source:
      type: Git
      git:
        ref: master
        uri: http://github.com/foo/bar
      contextDir: ./
    strategy:
      dockerStrategy:
        type: Docker
        from:
          kind: ImageStreamTag
          name: foo:from
    triggers:
      - type: ConfigChange
      - type: ImageChange

This means that build is not from local directory but from remote git repository.
Only what is committed and pushed to remote is build.

@sebgoa can you please assign @rtnpro to this issue?

@rtnpro you need to accept the invitation to the kompose contributor team

just a thought, is there a way to run docker in docker in a Kubernetes pod ?

just a thought, is there a way to run docker in docker in a Kubernetes pod ?

it would require root access, so it depends on how you have the cluster set up. I think overall it's not going to be an option, though.

Hi @bgrant0607, what was reason for removing @rtnpro  from this? Or it was just something that happened during move to incubator?

@kadel It just happened during the move. Only org members can be assigned to issues and PRs. I had to invite all kompose contributors to the kubernetes-incubator org.

@bgrant0607 Thank you. I thought that this was it.

Can this issue be closed via https://github.com/kubernetes-incubator/kompose/pull/206 ? cc @surajssd @rtnpro

since https://github.com/kubernetes-incubator/kompose/pull/206 is merged, closing this in favour of more specific issue https://github.com/kubernetes-incubator/kompose/issues/353


Ubuntu latest - apt-get upgrade causes failure - grub

Description
Updating the runner fails for some grub reason
name: ubuntu latest

on:
  workflow_dispatch:

jobs:
  ubuntu_latest:
    runs-on: ubuntu-latest
    steps:
      - name: Host - update
        run: sudo apt-get update

      - name: Host - upgrade
        run: sudo apt-get -y upgrade

Setting up grub-efi-amd64-bin (2.06-2ubuntu14.1) ...
Setting up grub-efi-amd64-signed (1.187.3~22.04.1+2.06-2ubuntu14.1) ...
mount: /var/lib/grub/esp: special device /dev/disk/by-id/scsi-14d534654202020200690df035523a242afc173af9e57f2a4-part15 does not exist.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Errors were encountered while processing:
 grub-efi-amd64-signed
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: Process completed with exit code 100.

Platforms affected

[ ] Azure DevOps
[X] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[X] Ubuntu 22.04
[ ] macOS 11
[ ] macOS 12
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
Current runner version: '2.301.1'
Operating System
Ubuntu
22.04.2
LTS
Runner Image
Image: ubuntu-22.04
Version: 20230219.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230219.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230219.1
Runner Image Provisioner
<IP_ADDRESS>
Is it regression?
don't know
Expected behavior
not fail on apt-get upgrade
Actual behavior
It's failing due to some grub related issue.
Repro steps
name: ubuntu latest

on:
  workflow_dispatch:

jobs:
  ubuntu_latest:
    runs-on: ubuntu-latest
    steps:
      - name: Host - update
        run: sudo apt-get update

      - name: Host - upgrade
        run: sudo apt-get -y upgrade

Duplicate of https://github.com/actions/runner-images/issues/7192


[for discussion] Annotate important processes

Opening for discussion. Let me know if you think it is a bad idea. I'll annotate more processes next week.
Once in a while for busy clusters there is a need to figure out a list of processes which has a big number of messages in their mailbox. Currently it is quite hard to infer the kind of process which has backups. We have to rely on inspecting an initial calls, monitors, links and so on.
The idea is to annotate important processes by storing kind key in the process dictionary.

I would say that there's some work we can do here, but for the most part figuring out thigns based on initial_call and registered names is pretty easy.  For those ones we should look into replacing erlang:spawn* with proc_lib:spawn* though for spawn_monitor we'll have to fake it cause proc_lib doesn't have a monitor related things (and prevents the option from being used for some unknown reason).

I am glad I opened the PR for discussion prior to any significant work


[Feature Request] Add another Occupancy Sensor that shows occupancy on errors

This way you could have homekit notifications anytime the roborock has an error. It probably wouldn’t have any descriptions, but it would at least bring the vacuum to my attention if it gets stuck or something.

Thank you @hardaysknight
It makes sense! I'm only concerned about a known bug with the underlying communication layer that keeps reporting an error even after it's no longer there.
How about using a Lock switch instead? They also provide built-in notification capabilities and we can acknowledge the error by unlocking it?
That said, have you tried using the existing notifications in the Xiaomi MiHome app? Personally, I use homebridge for the Homekit automations: i.e.: if I leave the house, turn on the cleaner or for any Siri commands. But the errors are better handled on the Xiaomi app: the notifications are quite self-explanatory and you'll likely need to open the app anyway to reset the maintenance counters.

The lock idea is even better!
I have the MiHome app, I just hate using it because it’s so slow to load, and I don’t want the other users in my house to have to download a million apps for controlling everything in the house. 9 times out of 10 the only errors I get on my 1st gen vacuum are check brush errors due to my medium pile carpet, but I understand what you’re saying.

Yeah! I share your feeling :)
I'm the only one at home with the MiHome installed. Everyone else uses the Home app to turn the robot on and off.
That also makes me the only one to take care of the maintenance tasks (and something tells me it won't change even when they know something is going on) xD
I'll try to implement this when I get a spare moment. In the meanwhile, if anyone wants to try and create a Pull Request with the changes. They are more than welcome :)

@hardaysknight, I think #651 covers your ask, right?
Do you mind if I close this in favor of the other one?


Why is the query so slow after adding the timezone？

In influxdb2.2 OSS:
for example
this query is fast:
from(bucket: "test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "record_raw_data")
|> filter(fn: (r) => r["_field"] == "accessTime")
|> aggregateWindow(every: 24h, fn: count, createEmpty: false)
|> yield(name: "count")
but this query is too slow（More than 300 times slower）:
import "timezone"
option location = timezone.location(name:"Asia/Shanghai")
from(bucket: "test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "record_raw_data")
|> filter(fn: (r) => r["_field"] == "accessTime")
|> aggregateWindow(every: 24h, fn: count, createEmpty: false)
|> yield(name: "count")
How can I split the query time in the correct timezone in an acceptable time?

me too

@davidby-influx  excuse me

me too, For this reason, we are forcing all data to be entered in UTC.
Adding timezone makes queries with aggregateWindow tens of times slower

This is a known issue to the Flux team. Thanks for reporting it. You will see it in the release notes when it is fixed.

me too

Me too. When I run my queries without the timezone it gets the data instantly without any delay. If I add the timezone conversion, my query times out.

Same problem here. Is there maybe any update on a fix or a workaround other than not importing "timezone"?

Same problem here. Is there maybe any update on a fix or a workaround other than not importing "timezone"?

 If I was able to write my query in a different way, hoping to circumvent importing “timezone”, I could continue and be done with it.
But the best advice I can give you: if you’re not too deep in InfluxDB yet, switch to QuestDB. More complex timezone specific queries run now in < 0.5 seconds and I know what query I’m writing because it’s the old, “boring” SQL syntax everyone knows.

What works for me: remove global option location, aggregate to 1h* resolution, then aggregate sum to 1d resolution with timezone:
import "timezone"

from(bucket: "test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "record_raw_data")
|> filter(fn: (r) => r["_field"] == "accessTime")

|> aggregateWindow(every: 1h, fn: count, createEmpty: false, timeSrc: "_start") // <-- Intermediate results

|> aggregateWindow(every: 24h, fn: sum, createEmpty: false, location: timezone.location(name:"Asia/Shanghai"))
|> yield(name: "count")

(*) 15m/30m for time zones with 30/45-minute offsets

What works for me: remove global option location, aggregate to 1h* resolution, then aggregate sum to 1d resolution with timezone:
import "timezone"

from(bucket: "test")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "record_raw_data")
|> filter(fn: (r) => r["_field"] == "accessTime")

|> aggregateWindow(every: 1h, fn: count, createEmpty: false, timeSrc: "_start") // <-- Intermediate results

|> aggregateWindow(every: 24h, fn: sum, createEmpty: false, location: timezone.location(name:"Asia/Shanghai"))
|> yield(name: "count")

(*) 15m/30m for time zones with 30/45-minute offsets

this will be useful


Issue with startWithCredentials after packaging with pkg

Description:
When running my code directly with node index.js, everything works as expected. The Steam login session functions correctly, and I can authenticate without issues. Additionally, when bundling the code using esbuild and running the output with node app.js, it also works perfectly.
However, after packaging the bundled code with pkg into an executable (app.exe), the login process fails. Specifically, entering the Steam Guard code leads to the error DuplicateRequest (EResult: 29).
On Node.js v18, everything works correctly after packaging with pkg. The issue occurs specifically with Node.js v22. Additionally, using refreshToken to update the session works as expected, but the login process using credentials fails. Please assist in identifying and resolving the problem.
Versions
Operating System: Windows 10 x64
Node.js Version: v22.11.0
Pkg Version: 6.1.1
Esbuild Version: 0.24.0
Steam-Session Version: 1.9.0
Code
index.js:
import { LoginSession, EAuthTokenPlatformType, EAuthSessionGuardType } from 'steam-session'
import readline from 'node:readline'

main()

async function main() {
    try {
        const rl = readline.createInterface({
            input: process.stdin,
            output: process.stdout,
        })

        const session = new LoginSession(EAuthTokenPlatformType.WebBrowser, {
            userAgent: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36`,
        })
        session.loginTimeout = 30000 // добавляем время на логин

        session.on('authenticated', async () => {
            console.log(`Success login, account: ${session.accountName}`)
        })

        session.on('timeout', () => {
            console.log(`Failed to login in 30 seconds`)
        })

        session.on('error', (e) => {
            console.log(`Unexpected error. Login failed!`, e)
        })

        const steamGuardCode = await new Promise((resolve) => rl.question('Steam Guard Code? ', resolve))

        const startSessionResult = await session.startWithCredentials({
            accountName: `yourSteamAcc`,
            password: `yourSteamPass`,
            steamGuardCode,
        })

        if (startSessionResult.actionRequired) {
            let reason = ``
            if (Array.isArray(startSessionResult.validActions) && startSessionResult.validActions[0]?.type) {
                reason = EAuthSessionGuardType[startSessionResult.validActions[0]?.type]
            }

            console.log(`On login asked action! ${reason}`)
        }
    } catch (e) {
        console.log(e)
    }
}

package.json:
{
    "type": "module",
    "dependencies": {
        "@yao-pkg/pkg": "^6.1.1",
        "esbuild": "^0.24.0",
        "steam-session": "^1.9.0"
    }
}

Steps to Reproduce:

Take my index.js and package.json and install dependencies.
Run the code with node index.js:

Works as expected.

Bundle the code with esbuild:esbuild index.js --bundle --platform=node --target=node22 --outfile=app.js

Run the code with node app.js:

Works as expected.

Package the bundled app using pkg
   bash pkg app.js --targets node22-win-x64 -o app.exe
Run app.exe

Enter the Steam Guard code when prompted.
The authentication process fails with the error:

Error: DuplicateRequest
    at eresultError (C:\snapshot\repeatBug\app.js)
    at AuthenticationClient.sendRequest (C:\snapshot\repeatBug\app.js)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AuthenticationClient.submitSteamGuardCode (C:\snapshot\repeatBug\app.js)
    at async LoginSession2.submitSteamGuardCode (C:\snapshot\repeatBug\app.js)
    at async LoginSession2._attemptTotpCodeAuth (C:\snapshot\repeatBug\app.js)
    at async LoginSession2._processStartSessionResponse (C:\snapshot\repeatBug\app.js)
    at async LoginSession2.startWithCredentials (C:\snapshot\repeatBug\app.js)
    at async main (C:\snapshot\repeatBug\app.js) {
  eresult: 29
}

Expected Behavior:
After packaging with pkg, the login session should function identically to how it works when run directly with node index.js or the bundled esbuild output (node app.js).
Actual Behavior:
The executable built with pkg fails during the login process, resulting in the DuplicateRequest error when submitting the Steam Guard code.
Logs:
Here are the outputs from each step:

Node.js (direct):
Steam Guard Code? XYP44
Success login, account: 055vvsln

Node.js (esbuild):
Steam Guard Code? XYP44
Success login, account: 055vvsln

Pkg (after packaging):
Steam Guard Code? RR8DR
(node:32196) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Error: DuplicateRequest
at eresultError (C:\snapshot\repeatBug\app.js)
at AuthenticationClient.sendRequest (C:\snapshot\repeatBug\app.js)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async AuthenticationClient.submitSteamGuardCode (C:\snapshot\repeatBug\app.js)
at async LoginSession2.submitSteamGuardCode (C:\snapshot\repeatBug\app.js)
at async LoginSession2._attemptTotpCodeAuth (C:\snapshot\repeatBug\app.js)
at async LoginSession2._processStartSessionResponse (C:\snapshot\repeatBug\app.js)
at async LoginSession2.startWithCredentials (C:\snapshot\repeatBug\app.js)
at async main (C:\snapshot\repeatBug\app.js) {
eresult: 29
}

Problem caused by esbuild.
Module bytebuffer bundles wrong and pkg missed memcpy after that (it will see if use pkg's debug).
Without using esbuild (with commonjs) it's works without any problem.
I guess, it can be solved at esbuild level, but i can't solve it with --external flags.

Closing, cause not related to node-steam-session


feat: create image card

Current dependencies on/for this PR:

next

PR #184

PR #185

PR #193

PR #192

PR #197  (this PR)

PR #194

PR #191

PR #187

PR #186

This comment was auto-generated by Graphite.


next-i18next tried to access @babel/runtime, but it isn't declared in its dependencies

Hello guys, I'm experiencing an issue in combination with Yarn2 and PnP.
Describe the bug
When referencing next-18next, we get the following error from yarn:
error - ../../.yarn/$$virtual/next-i18next-virtual-9e82de204c/0/cache/next-i18next-npm-8.1.2-6f33ac777a-285a3d0a52.zip/node_modules/next-i18next/dist/esm/appWithTranslation.js:2:0
Module not found: next-i18next tried to access @babel/runtime, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @babel/runtime (via "@babel\runtime\helpers\defineProperty")

Occurs in next-i18next version
8.1.1
Steps to reproduce
I don't have a repro repository, but here is our setup:
We are using yarn2 with PnP which is very strict in regards to what is being referenced (unless you use it with loose mode). Every time a library is used, without being listed as a dependency, it would throw this error.
Expected behaviour
It should not throw an error
OS (please complete the following information)

Windows 10

Additional context
Workarounds:
The two options to workaround the issue, while fixed are:

change pnp to loose mode (haven't tested, but should work in theory)
add a configuration for this specific dependency problem in .yarnrc.yml

packageExtensions:
  next-i18next@*:
    dependencies:
      '@babel/runtime': '*'

Haven't encountered this before. Might need to move @babel/plugin-transform-runtime from devDeps into dependencies? PRs welcome.

It's included in the JS output, so yes, I suppose it should be a dependency, and not a dev dependency

Not entirely sure it's necessary anymore – may be a remnant of v7 and previous.

Have experienced the same today ...

@yovanoc What version of next-i18next are you on?

8.1.3

Another workaround that might work, from what I've encountered with these sorts of errors:
-yarn next build
-yarn pnpify next build

More info: https://next.yarnpkg.com/advanced/pnpify

@davidcalhoun Would be great to support pnp properly, and I think it should be fairly trivial. PRs welcomed!


Remove a page

Is there a way to remove an earlier created page? Couldn't find that in the guide 🤷♂

There is not a remove command. I almost added it!
elm-spa remove Pages.Example

I thought it would be just as easy to run:
rm src/Pages/Example.elm

Or just delete the file in your code editor / file explorer.
The elm-spa add command is useful because it scaffolds out some boilerplate for you.

I see. Does that mean that I'd have to manually edit the files in the Generated folder?

I see. Does that mean that I'd have to manually edit the files in the Generated folder?

When you run elm-spa gen it will do that for you.


Reusing Secure Comparator crashes with BoringSSL

Issue description
Trying to reuse a Secure Comparator after performing a comparison causes a segmentation fault in BoringSSL library.
Environment info
OS: Linux (macOS is affected as well)
Themis version: 0.10.0
Crypto provider: BoringSSL (google/boringssl@0a54e998481b0b5a8abd9717c5f7301a3b18b628)
Details
Steps to reproduce:

Build BoringSSL.
Build Themis with that BoringSSL.
Build this sample code.
Run it.

(There's a script in that gist which does all of this.)
Actual result:
$ ./a.out
[=] appending data to A: different
[=] appending data to B: test data
[-] begin   comparison: A
[~] proceed comparison: B
[~] proceed comparison: A
[~] proceed comparison: B
[~] proceed comparison: A
[!] comparison complete
[>] result A: (---) mismatch
[>] result B: (---) mismatch
[=] appending data to A: the same data
Segmentation fault (core dumped)

Expected result:
Definitely not a crash.
I'm not sure what is the expected behavior for Secure Comparator if it is reused. After some thought I have came up with at least three perfectly reasonable ways for it to behave:

complete both comparison successfully, return "no match" for both
complete both comparison successfully, return "no match" for the first comparison, but "match" the second one
deny reusing Secure Comparators, fail with an error when trying to append data after the comparison has been completed

Notes
The issue is not actual for OpenSSL and LibreSSL. In this case the sample returns "no match" for both comparisons.
The crash seems to be caused by misuse of EVP_MD by Themis. OpenSSL documentation says:

After calling EVP_DigestFinal_ex() no additional calls to  can be made, but EVP_DigestInit_ex() can be called to initialize a new digest operation.

The erroneous call sequence:
secure_comparator_proceed_compare (of Alice-the-client)
  secure_comparator_alice_step1
    soter_hash_final(&comp_ctx->hash_ctx)
      EVP_DigestFinal_ex

secure_comparator_proceed_compare (of Bob-the-server)
  secure_comparator_bob_step2
    soter_hash_final(&comp_ctx->hash_ctx)
      EVP_DigestFinal_ex

secure_comparator_append_secret
  soter_hash_update(&comp_ctx->hash_ctx)
    EVP_DigestUpdate

BoringSSL seems to free the digest computation state after the digest value is retrieved:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff75456ea in EVP_DigestUpdate (ctx=0x603500, data=0x400f5c, len=13)
    at themis/third_party/boringssl/src/crypto/fipsmodule/digest/digest.c:200
200	  ctx->digest->update(ctx, data, len);
(gdb) p *ctx
$1 = {digest = 0x0, md_data = 0x0, pctx = 0x0, pctx_ops = 0x0}
(gdb) where
#0  0x00007ffff75456ea in EVP_DigestUpdate (ctx=0x603500, data=0x400f5c, len=13)
    at themis/third_party/boringssl/src/crypto/fipsmodule/digest/digest.c:200
#1  0x00007ffff752045a in soter_hash_update ()
   from themis/install/lib/libsoter.so
#2  0x00007ffff7bcfa6b in secure_comparator_append_secret ()
   from themis/install/lib/libthemis.so
#3  0x0000000000400a0d in append_secret ()
#4  0x0000000000400cfb in main ()

So it really can't handle calling EVP_DigestUpdate() after EVP_DigestFinal_ex().

Many crypto implementations have "finalisable" objects. Maybe, to solve this problem long-term we should add another error code, like THEMIS_OBJECT_FINALIZED or something - to give clear indication to the caller, that their program flow is somehow incorrect. Thoughts?


Swift 3.0

Swift 3 compatibility.

Cool, can you change the PR to be to the swift3 branch?
https://github.com/icanzilb/SwiftSpinner/tree/swift3

I did it as a new pull, so this one can be closes.
A


Apps: add singleAppMode to switch between clinepi and mbio views

In workspaceRouter, add singleAppMode prop with value the name of the app to be used. For clinepi, name is 'pass'. If we have this set, the user only lives in one instance of the app always. Otherwise, user gets to choose from a list of apps (mbio view)
Important to get this out quickly so that we can start working on mbio apps on the main branch.

Closed with #962

@asizemore, does this need qa or can we move to "Complete"?

@SheenaTomko this is one the clinepi team is best to QA, but QA is straightforward: if the QA site is showing the correct pass app and it looks just like it always did, then this ticket can be moved to Complete

QA.clinepi looks like normal on the visualize tab. Moving to complete.


Can anyone reproduce the result by using a smaller batch size?

In my case, only got EAO: 0.339/A: 0.601/R: 0.356 with batch size=40 which different from the result (0.380/0.609/0.276).
Can someone help me solve this problem? Thank you.

@guangqianqin After 20 epochs, the best model (base) I got will be epoch 9 and the EAO is 0.293. What was the result you got? Had you tried to run the train_siammask_refine.py?

I succeed

您好，我想请教一下您是怎么成功训练siammask的,能否指点一下？谢谢。

I succeed

How did you manage to do so? can you please mention the steps?

EAO的最高位为0.289;但精度的最高位为0.623，其EAO为0.287。更重要的是，在train_siammask_refine之后，第二个基本模型生成了最佳模型。也许我会尝试更改优化器（尝试使用前瞻+ Radam）。

请问您复现出论文的结果了嘛

没有，效果差很多，我在siamrpn(resnet)上做的改进，这个效果挺好
---Original---
From<EMAIL_ADDRESS>Date: Tue, Mar 17, 2020 22:03 PM
To<EMAIL_ADDRESS>Cc: "Jimzhou82sub"<664933345<EMAIL_ADDRESS>Subject: Re: [foolwood/SiamMask] Can anyone reproduce the result by using a smaller batch size? (#102)
EAO的最高位为0.289;但精度的最高位为0.623，其EAO为0.287。更重要的是，在train_siammask_refine之后，第二个基本模型生成了最佳模型。也许我会尝试更改优化器（尝试使用前瞻+ Radam）。
请问您复现出论文的结果了嘛
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

after training, my final results was pnly EAO=0.35,
It was far from the result EOA=0.422  with the provided model(SiamMask_VOT_LD.pth
I reported here:
https://github.com/foolwood/SiamMask/issues/176


treafik certificate persistence with docker

Adjust traefik configurations when used in docker (probably just edxnotes at the moment) so that the acme.json file is written to disk and persisted across container restarts. LetsEncrypt has pretty strict cert limits for a given DNS entry. 5 / week or something.

For edx-notes we are writing the acme.json file into /etc/traefik which is mounted directly from the host, so it is persisting across container restarts. I'm not sure why I thought this was a problem. Closing.


found 404, for [.../slug], with multilingual module installed

Package containing the bug
I’m not sure
Describe the bug
I can  see path object is missing in /jsonapi/node/page. While I use a drush command to fix this. drush config:delete core.base_field_override.node.page.path.  Now path is visible
"path": { "alias": "/page", "pid": 114222, "langcode": "und" }
still I'm getting path null from below:
const path = await drupal.translatePathFromContext(context)
This issue is only with multilingual site, for normal website, it's working fine
please help me in this

@shadcn @JohnAlbin please help me into this

You need to re-read about Next.js' Dynamic Path Segments. https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes
[.../slug] should be [...slug]. That error is probably preventing Next.js from putting a valid slug field inside the context variable.


Failed to start BIND Domain Name Server.

Hello , thank you for your useful tools, when i restart the bind server, i obtain an issue, I've tried to search in a lot of forum but i don't understand where can be the problem, you can see picture below .

the server  used is an Ec2 instance, I have followed this youtube video
https://www.youtube.com/watch?v=p8wbebEgtDk&t=422s
Thanks :)

have the same problem

have the same problem

I didn't obtain the solution,but I had just created a new vm ,and it's work now


Auto-regulate ticks per second

Decrease the ticks per second as the frame rate drops, and increase it back when the frame rate rises.

We will auto-regulate if tps is set to 0. Otherwise it's a manual setting.

Or if it's absent.

I don't think we allow settings to be absent currently.

Oh, cool.

You seem to have an idea of how this would work, so I'd like if you could work on it.

@seisatsu Just wondering. Do we even need to limit TPS since we always request vsync to be on? I'm wondering if that will limit TPS to the refresh rate of the screen.

I'm not sure. It may just run as fast as it's able.

Yes, of course. But if vsync is turned on then SDL_RenderPresent() will pause the process every frame until the vertical synchronization of the monitor.

The other thing to consider is that some gamers like to turn off vsync and run games at maximum frame rates (e.g., 300 fps) because this minimizes input lag which improves your performance in twitch-heavy games.

Let's assume vsync will always work for now and reopen this issue if it becomes a problem.


[FEATURE REQ] CreateOrUpdate method for Custom Roles

https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles-rest

Thanks for sending this feedback. We are routing to the appropriate team for follow-up.

@rthorn17 any updates on this?

@rthorn17 any updates on this?

This is not with the ARM team.  The Identity team would need to make the changes to their RP to add the feature request.
@jsquire > I see you updated the issue in Jun. Are you tracking this in a backlog for feature requests?

@rthorn17 - I am not; this was moved to allow it to pass automated issue validation.  The repository standards require that anything tagged feature-request be assigned to a milestone.   Backlog is the default which comes with no assumed timeline.

@AlexGhiondea:  Would you be so kind as to help route this to the appropriate team.  I'm not sure which tag/group is appropriate for the management plane Identity area.

@nickzhums : would you happen to know who might be able to help with management plane Identity?

@jianghaolu Could you please see if this is related to Azure Identity?

This is not owned by the Identity team. The API is owned by the Azure management SDK team.
And I can see this test already in place: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/authorization/Microsoft.Azure.Management.Authorization/tests/Tests/BasicTests.cs#L1160. Is this what you are looking for?


HLS search: Fix segfault and adding snap_malloc to enforce alignment …

…when doing allocations
Signed-off-by: Frank Haverkamp<EMAIL_ADDRESS>

Let us wait for some tests to succeed before merging. If you see enough tests being ok, press merge Bruno.


Replace MetaGraphs.jl with a type-stable alternative

MetaGraphsNext.jl is an experimental, type-stable replacement for MetaGraphs.jl.

See also MetaDataGraphs.jl.


Fix weird overscrolling on the app

The page can scroll even though its fixed... weird.

Fixed overscrolling on the opinions page with live ballots.
Will wait until Wednesday when an off day comes to fix the overscolling on off days.

Done. Just changed the positioning to fixed instead of absolute.