Incorrect resizing with latest JWL (no title bar present)

I have a dual monitor setup so I still use JwlMediaWin to share pictures and videos during the meetings more easily and without accidents.
However, in JW Library 12.3.106 the media window no longer has the title bar. Only the (now transparent) buttons may be slightly visible depending on whether the window is selected or not. This means at least two things:

the window now extends too much beyond the top border of the screen so the media displayed is not centered;
the resizing is not needed and maximizing the window should be performed in its place.

Again, thank you for the hard work you do in order to help us manage meetings as smoothly as possible!

@TizianoNoto Thanks for your report. I can't reproduce the problem you are experiencing and wonder if you would expound a little, please? AFAIK, the media window has never had a title bar when shown on a second monitor. Nor do I see any buttons.

@TizianoNoto Thanks for your report. I can't reproduce the problem you are experiencing and wonder if you would expound a little, please? AFAIK, the media window has never had a title bar when shown on a second monitor. Nor do I see any buttons.

It might be related to JWL 12.3.106 or might be due to some Windows update. I also noticed today that the JWL Media window has a black bar on the bottom of the screen. In fact, I've change the background to the 2nd screen, and seems like the JWL Media window is not spread across all the screen (I can see a light black bar and the red one is the desktop color). Also the brother that shared the screen during today's meeting had this issue (we're using JWL 12.3.106 and the latest JWLMediaWin <IP_ADDRESS>)
I've test this on a different laptop where I have JWL 12.2.69 + JWLMediaWin 1.0.09 and everything runs smoothly there.

It might be related to JWL 12.3.106 or might be due to some Windows update. I also noticed today that the JWL Media window has a black bar on the bottom of the screen. In fact, I've change the background to the 2nd screen, and seems like the JWL Media window is not spread across all the screen (I can see a light black bar and the red one is the desktop color). Also the brother that shared the screen during today's meeting had this issue (we're using JWL 12.3.106 and the latest JWLMediaWin <IP_ADDRESS>)
I've test this on a different laptop where I have JWL 12.2.69 + JWLMediaWin 1.0.09 and everything runs smoothly there.

@AntonyCorbett of course. I'll try to explain myself better. When the second display option is enabled in JWL, it creates a new window (the "media window"), called "JW Library", in full screen mode on the second display. If no second display is detected, the media window will be opened in normal mode.
They must have changed something in JWL 12.3. The "normal" media window now doesn't show a title bar. Only the buttons can be spotted in the top right corner and will be white if window is active, otherwise they're black. See the following screenshot.

My understanding is that JwlMediaWin sets the media window in normal mode, moves it on the second display and resizes it so that its content match the resolution without showing the title bar and the borders. But what if there is no title bar? The content of the window now has a portion of it beyond the top of the screen and theree is some unused space at the bottom, as it's shown in @LvDaniel 's screenshot.
My suggested fix is to see if the title bar is visible (AppWindowTitleBar.IsVisible property?) and decide the appropriate behaviour (resize or just maximize).

@AntonyCorbett of course. I'll try to explain myself better. When the second display option is enabled in JWL, it creates a new window (the "media window"), called "JW Library", in full screen mode on the second display. If no second display is detected, the media window will be opened in normal mode.
They must have changed something in JWL 12.3. The "normal" media window now doesn't show a title bar. Only the buttons can be spotted in the top right corner and will be white if window is active, otherwise they're black. See the following screenshot.

My understanding is that JwlMediaWin sets the media window in normal mode, moves it on the second display and resizes it so that its content match the resolution without showing the title bar and the borders. But what if there is no title bar? The content of the window now has a portion of it beyond the top of the screen and theree is some unused space at the bottom, as it's shown in @LvDaniel 's screenshot.
My suggested fix is to see if the title bar is visible (AppWindowTitleBar.IsVisible property?) and decide the appropriate behaviour (resize or just maximize).

I also noticed today that the JWL Media window has a black bar on the bottom of the screen.

Is this with or without JwlMediaWin?

I also noticed today that the JWL Media window has a black bar on the bottom of the screen.

Is this with or without JwlMediaWin?

I can reproduce the problem (in my case it's only apparent if the aspect ratio of the monitor and image means that the image normally occupies the full height of the display).

I can reproduce the problem (in my case it's only apparent if the aspect ratio of the monitor and image means that the image normally occupies the full height of the display).

The titlebar remains but it is transparent. Will fix

The titlebar remains but it is transparent. Will fix

@TizianoNoto @LvDaniel
I've updated the application (v<IP_ADDRESS>). I'd be grateful if you would take a look and report back please.

@TizianoNoto @LvDaniel
I've updated the application (v<IP_ADDRESS>). I'd be grateful if you would take a look and report back please.

I also noticed today that the JWL Media window has a black bar on the bottom of the screen.

Is this with or without JwlMediaWin?

It's with JwlMediaWin.
I'll test v<IP_ADDRESS> and reply back.

I also noticed today that the JWL Media window has a black bar on the bottom of the screen.

Is this with or without JwlMediaWin?

It's with JwlMediaWin.
I'll test v<IP_ADDRESS> and reply back.

@TizianoNoto @LvDaniel
I've updated the application (v<IP_ADDRESS>). I'd be grateful if you would take a look and report back please.

JW Media window occupies the full height of the display now.
I can see like @TizianoNoto the buttons in the top right corner.

@TizianoNoto @LvDaniel
I've updated the application (v<IP_ADDRESS>). I'd be grateful if you would take a look and report back please.

JW Media window occupies the full height of the display now.
I can see like @TizianoNoto the buttons in the top right corner.

I confirm that it looks fine, however I had to restart JWL after startin JwlMediaWin or the window wouldn't be fixed (related to #17 ?)

I confirm that it looks fine, however I had to restart JWL after startin JwlMediaWin or the window wouldn't be fixed (related to #17 ?)

I confirm that it looks fine, however I had to restart JWL after startin JwlMediaWin or the window wouldn't be fixed (related to #17 ?)

@TizianoNoto are you still see the buttons on the top right corner or they have disappeared?
After I've upgrade to v<IP_ADDRESS> I can see them, but they were not visible in the previous version v1.0.09

I confirm that it looks fine, however I had to restart JWL after startin JwlMediaWin or the window wouldn't be fixed (related to #17 ?)

@TizianoNoto are you still see the buttons on the top right corner or they have disappeared?
After I've upgrade to v<IP_ADDRESS> I can see them, but they were not visible in the previous version v1.0.09

@TizianoNoto are you still see the buttons on the top right corner or they have disappeared?

Yes.
Up to JWL 12.2, the media window would have a solid title bar with the buttons (unless in UWP full screen mode) and JwlMediaWin would "crop" it. With the current version, the bar is fully transparent meaning you can't "crop" the buttons without losing a piece of the media displayed.
Why the change? Many brothers don't have two monitors (or another device) to stream the media and monitor other things at the same time without distracting the audience. JWL has been allowing for some time to enable a separate media window even if you have a single display. My guess is it was done for this scenario. Since the title bar was solid, it would appear in the stream wasting precious space (and looking more "amateur"). Having a fully transparent title bar will help those brothers.

@TizianoNoto are you still see the buttons on the top right corner or they have disappeared?

Yes.
Up to JWL 12.2, the media window would have a solid title bar with the buttons (unless in UWP full screen mode) and JwlMediaWin would "crop" it. With the current version, the bar is fully transparent meaning you can't "crop" the buttons without losing a piece of the media displayed.
Why the change? Many brothers don't have two monitors (or another device) to stream the media and monitor other things at the same time without distracting the audience. JWL has been allowing for some time to enable a separate media window even if you have a single display. My guess is it was done for this scenario. Since the title bar was solid, it would appear in the stream wasting precious space (and looking more "amateur"). Having a fully transparent title bar will help those brothers.

@TizianoNoto thanks for info.
I noticed that if I don't use JwlMediaWin those buttons (in the top right) are not present. I always use a second screen to display JWL content so I'm not using a separate JWL window on the same screen.
@AntonyCorbett is it possible to make disappear those buttons or this is the normal behavior?
Thank you brothers!

@TizianoNoto thanks for info.
I noticed that if I don't use JwlMediaWin those buttons (in the top right) are not present. I always use a second screen to display JWL content so I'm not using a separate JWL window on the same screen.
@AntonyCorbett is it possible to make disappear those buttons or this is the normal behavior?
Thank you brothers!

@AntonyCorbett is it possible to make disappear those buttons or this is the normal behavior?

@LvDaniel Possibly, but not without some digging. @TizianoNoto explains it well in his previous comment.

@AntonyCorbett is it possible to make disappear those buttons or this is the normal behavior?

@LvDaniel Possibly, but not without some digging. @TizianoNoto explains it well in his previous comment.


Move to parking_lot::Mutex for mutex and away from std::sync::Mutex?

parking_lot has a lot of advantages over std::sync::Mutex.
Should we migrate to parking_lot for all futures_util::lock primitives?
If we're open to this, I'd be happy to contribute the work for this.

I would accept a PR to add an optional feature to do this.
(parking_lot is very good, but note that it may fail to compile on some platforms. futures needs to work on such platforms. e.g., https://github.com/Amanieu/parking_lot/issues/269)

I would love to see a parking_lot feature. I keep ending up taking code using parking_lot::Mutex and changing it to futures::lock::Mutex because it's being used in an async context, and this feels like a regression.

Given the work going on to improve std::sync::Mutex, it might not be of much benefit to add this now.

I agreed with @ibraheemdev, and tend to close this for now.
relevant discussion: https://github.com/tokio-rs/tokio/issues/4623


Troubleshooting ommissions in esyN graphs

https://github.com/pombase/curation/issues/960
I'm trying to figure out why the esyN networks  do not seem to be updating correctly.
The first example problem I looked at, and I can't see the data in the  file that Dan uses:
On the gene pages
SPAC1782.09c (clp1) has_substrate SPAC24H6.05 (cdc25)
This is present on www and dev.
Can you see if you can figure out why it doesn't get into the esyN file?
http://curation.pombase.org/dumps/releases/pombase-chado-latest/exports/pombase-go-substrates.tsv.gz

I'm confused.  That file has:
SPAC1782.09c    SPAC24H6.05     PMID:15128870

What am I missing?

Sorry! missed that!


edit-and-execute-command execute the command(that was already enter when ctrl x ctrl e) even when quiting the editor without saving.

Windows Version
Microsoft Windows [Version 10.0.22621.2861]
WSL Version
<IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>-1
Distro Version
Ubuntu 23.04
Other Software
No response
Repro Steps
-lunch WSL from terminal (type wsl in cmd).
-start typing a command.
-press ctrl+x then ctrl+e
-quit the editor without saving
Expected Behavior
the command should not be executed if you do not save the edit in the editor.
Actual Behavior
Ubuntu execute the command I started typing before using the shortcut (ctrl x ctrl e).
Diagnostic Logs
No response

WSL doesn't control the behavior of the shell. What you're seeing is depending on the shell you're using.
Closing since this is not a WSL issue.


Loosen --cfg zerocopy_derive_union_into_bytes

Permit it to be passed either when compiling zerocopy-derive or when compiling the user's crate. This makes the --cfg play more nicely with different build systems.
Makes progress on #1792

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.40%. Comparing base (d204727) to head (cab5024).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1819   +/-   ##
=======================================
  Coverage   87.40%   87.40%
=======================================
  Files          16       16
  Lines        5994     5994
=======================================
  Hits         5239     5239
  Misses        755      755

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Travis CI checks for Node 10 & 12 Added

Addresses #21 by ensuring Travis CI tests run for Node 10 and 12 latest releases.
Removes unnecessary cruft from ./.travis.yml.

All builds fail because of #18 which we still need to address.
This of course should not impact merging this specific PR... since they were already failing. 👎

I am going to merge this as it is merely a maintenance task. @Hollywood feel free to revert if you feel otherwise.


Quick fix for purescript-test-unit's deleted tag

To my dismay, the tag of purescript-test-unit that was just released got DELETED (discussion here), which of course causes failure across our packages.
This commit fixes the build. Once merged, this should be released in purescript-aff-reattempt as a patch version in order to silently fix all the packages that depend on it.

Self-merging because it's kind of an emergency. :fearful:
(Just to document, the previous self-merge was successful and did not cause this issue; the current problem was just a result of the author of the test-unit package deleting a tag, which shouldn't ever be done IMO.)

:+1:


Travel method error message

Overview of the Pull Request:
Add error message to notify user the travel method limit has been reached.
link to Trello card or Github issue

How Has This Been Tested?
Browser window.
Pull Request Checklist:
Make sure the following checkboxes[ ] are checked with x before sending your PR -- thank you!

[x] Have you included a link Trello card / Github issue and written sufficient description to help others review your work?
[x] Is your pull request up-to-date with main branch?
[x] Have you checked That code is well formatted? Did npx prettier --check . return no warnings/errors?
[x] Have you written instructions on how to test that your changes work as expected?
[x] Have you tested your work thoroughly on your local machine to ensure you are not breaking anything?

Move error message inside container as per @hqtan request 👍

Hi @Amutha37 ,
Great idea, just changed the message. Also made removed word "on-site" for work from home mode as the user will be selecting travel methods anyway.

Wait @hqtan , do we revert back to previous message? 😄

Great 👍

As per discussion with @hqtan , converted error message into info message


"API": isn't Bocadillo's main class name misleading?

Is your feature request related to a problem? Please describe.
Bocadillo can be used for building REST APIs, but not only. In this sense, it's feeling more and more like the name API for the bocadillo.API class, which is the main "application" class, is biased and perhaps even misleading.
Describe the solution you'd like
Change the name of the API class to something else (see alternatives).
This would be a major breaking change, so here's a suggestion for the release cycle:

In v0.11: rename API to something else, but keep API as a wrapper that triggers a DeprecationWarning
In v0.12: drop support for API.

This frees the name API which could be used to implement a specialised application class targeted at building REST APIs. Indeed, I have a feeling Bocadillo should stay versatile but provide helpers to build REST APIs such as: setting the media_type, registering error_to_media as the HTTPError error handler, etc.
Describe alternatives you've considered

Bocadillo: classic and mainstream

from bocadillo import Bocadillo

app = Bocadillo()

Salsa: a pun on our tagline, which is perhaps too… punny? (And maybe not future-proof in case we ever change that tagline.)

from bocadillo import Salsa

app = Salsa()

App: too generic?

from bocadillo import App

app = App()

Additional context
/

Poll:
https://twitter.com/bocadillopy/status/1095594986731646982?s=21

Results: 37% out of 27 people voted for App. Sounds fair to me. :+1: Will update issue description.


feat(authorizer): add standardized input

Current dependencies on/for this PR:

main

PR #12

PR #13   👈

This comment was auto-generated by Graphite.


Duplicate classes when using flutter_blue and firebase

Issue
I'm getting a lot of classes duplicated. I think that it because I'm using firebase.
Example
Duplicate class com.google.protobuf.SmallSortedMap found in modules protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

Version
flutter_blue: ^0.7.3

hello friend, have you been able to solve this problem? I have the same problem
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.

1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

Hello,
Unfortunately I didn't. Now I'm using the flutter_blue_lib package and I don't have the issue. You should try it

Hi thanks
I followed your advice and tried this library and it works well, I already got the scanned devices, I have not been able to connect to the device, you will have an example of how to make this connection and be able to read a characteristic of a service.

Yes of course. I'll show you an example from my code.
So after you discover a specific device you have a DEVICE object. This DEVICE object contain a future function to connect.
it should be look like this:
try {
 await device.peripheral.connect();
} catch (error) {
 print(error);
}

Once you are connected to the device you can send data.
You can discover all the services and characteristics like this.
await _device.peripheral.discoverAllServicesAndCharacteristics();
Store them in a variable
List<Service> services = await _device.peripheral.services();
And go throw each one
    services.forEach((service) async {
      var servChars = await service.characteristics();
      servChars.forEach((serChar) async {
         // Send data here
      });
    });

And send data like this
await _device.peripheral.writeCharacteristic(service.uuid, serChar.uuid, Uint8List.fromList(utf8.encode(data)), false);

I don't think is the optimal way to do that. I'm beginning with BLE services and Characteristic but that work for me. Hope that was helpful.

Hi! thank you very much.
You don't have the problem that the device automatically disconnects after a few seconds of connection?
D/BluetoothGatt(29955): onConnectionUpdated() - Device= interval=495 latency=0 timeout=600 status=0
D/BluetoothGatt(29955): onClientConnectionState() - status=19 clientIf=16 device=
D/BluetoothManager(29955): getConnectionState()
D/BluetoothManager(29955): getConnectedDevices
D/BluetoothGatt(29955): close()
D/BluetoothGatt(29955): unregisterApp() - mClientIf=16
I/flutter (29955): **********************************
I/flutter (29955): iTrack DESCONECTANDO.....
I/flutter (29955): **********************************

No, I don't think that I have this issue

Downgrade version to:
flutter_blue: 0.7.2
It worked for me


Shrinkwrap.

This PR fixes #10669.
cc @xavijam

Merge in https://github.com/CartoDB/cartodb/pull/10670


Include an option for where line breaks should occur

For example when importing the Intents framework, this code is generated:
  INBoatTrip = interface(NSObject)
    ['{AB88A6B6-EFAA-4D6D-A4D2-A55983C4E890}']
    function arrivalBoatTerminalLocation: CLPlacemark; cdecl;
    function boatName: NSString; cdecl;
    function boatNumber: NSString; cdecl;
    function departureBoatTerminalLocation: CLPlacemark; cdecl;
    function initWithProvider(provider: NSString; boatName: NSString; boatNumber: NSString; tripDuration: INDateComponentsRange; departureBoatTerminalLocation: CLPlacemark; arrivalBoatTerminalLocation: CLPlacemark): Pointer; cdecl;
    function provider: NSString; cdecl;
    function tripDuration: INDateComponentsRange; cdecl;
  end;
  TINBoatTrip = class(TOCGenericImport<INBoatTripClass, INBoatTrip>) end;

Line breaks should occur using these rules:

Break at the last parameter if any of it, or anything subsequent (e.g. result type etc) crosses the margin - in this case it would be departureBoatTerminalLocation: CLPlacemark; - if any part of this crosses the margin, the whole parameter should begin on the next line, indented 2 spaces from the text directly above it - in this case, the keyword function.
If the remainder of the declaration also crosses the margin, apply the rule again, except indent at the same level as the last break
Comments related to deprecation etc should not break

Other rules need to be formulated for other declarations. Using the rules above, with a margin of 150 characters, the class declaration would become this:
  INBoatTrip = interface(NSObject)
    ['{AB88A6B6-EFAA-4D6D-A4D2-A55983C4E890}']
    function arrivalBoatTerminalLocation: CLPlacemark; cdecl;
    function boatName: NSString; cdecl;
    function boatNumber: NSString; cdecl;
    function departureBoatTerminalLocation: CLPlacemark; cdecl;
    function initWithProvider(provider: NSString; boatName: NSString; boatNumber: NSString; tripDuration: INDateComponentsRange;
      departureBoatTerminalLocation: CLPlacemark; arrivalBoatTerminalLocation: CLPlacemark): Pointer; cdecl;
    function provider: NSString; cdecl;
    function tripDuration: INDateComponentsRange; cdecl;
  end;
  TINBoatTrip = class(TOCGenericImport<INBoatTripClass, INBoatTrip>) end;

This might be implemented in one of a couple of ways:

Modify TSourceWriter to keep track of the number of characters that have been written to the current line so far, have it be aware of what is about to be written (i.e. whether it's a method parameter etc), and "break" if what is about to be written will exceed the margin. This could prove difficult if a rule is to break before a parameter that has already been written.
Write the entire source, then use a parser (such as DelphiAST) to identify where breaks need to occur.

I'm leaning towards option 2


Views Order Not correct

Description
On toggling the sorting order of Links in profile page the views does not sort
Default

On sort the order changes but the view does show in the same

Screenshots
No response
Additional information
No response

Can i get assigned on this


move moment timecode processing to server side

also add timecode support to cms https://www.netlifycms.org/docs/custom-widgets/


Discussion: improving issue reports for embedded devices

There are a lot of Tizen/WebOS/etc issues reported these days. Unfortunately many of these industry vendors do not provide any public support for firmware or media playback issues. There is no place to report bugs or get feedback. This is made worse by the fact that firmware updates are infrequent.
But, we may be able to improve our situation. It's possible that we can write more actionable issue reports by including more information, specifically device model number and firmware version. The issue template could be updated to ask for this information.
The goal is to produce a corpus of reports which may be more valuable to industry vendors and their engineering teams.
There may be other ways we can help each other. I know, for instance, that Tizen's media stack is based on GStreamer, which is open source and appears to have a very active community. An enterprising developer may opt to test their media against GStreamer to see if they can reproduce an issue.
Does anyone else have ideas or suggestions on how to help document issues on embedded platforms?

We've had the new field in the issue template for several months.  Since nobody else has had any suggestions in this area, I will go ahead and close this issue.  Thanks!


Performance impact of refreshing each datastore info at every scrape

I've been running into an issue where one of my esxi hosts appears to be unreachable by the exporter.
I think what's actually happening is that the scrape is timing out.

The jump in scrape duration coincides with about the time that I deployed this code change #16
and it looks like I might be bumping up against my default 10 second timeout.
I've increased my timeout but I'm not sure if this is a great solution for everyone. Maybe the datastore refresh should be a configurable option.

Hi,
yes I have the same issue, need to find another way to refresh datastore.

My scrape interval is 60 seconds and after my discovery yesterday I changed the timeout from 10s to 30s.
Interestingly the average scrape duration also improved from around 3.5 seconds to 2.5 seconds after the change. My guess is that this has something to do with request blocking.
In the graph above the 1 node with a significantly higher scrape duration has 2 iscsi datastores instead of 1 so my guess is that the refresh duration increases with every datastore that is attached.
There's also the RefreshDatastore() method https://github.com/vmware/pyvmomi/blob/master/docs/vim/Datastore.rst maybe this is faster.
I'm also wondering if there's a good way to make the refresh not block the rest of the request. I don't really care if the capacity info is refreshed before the request is returned. I just need it to be refreshed on a regular basis.

Hello,
Exporter is getting vcenter (5.5\6.0.2) to refresh datastore information as a vcenter task each query cycle and flood the task viewer.
i would suggest to remove ds.RefreshDatastoreStorageInfo() from vmware_exporter.py

This issue was moved to pryorda/vmware_exporter#8


Merge Version 4.5 to live

Docs Build status updates of commit 6f19d32:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.gitignore
:white_check_mark:Succeeded

CONTRIBUTING.md
:white_check_mark:Succeeded

Docs/Features/key-exchange.md
:white_check_mark:Succeeded

Docs/Features/playready-features.md
:white_check_mark:Succeeded

Docs/Features/trusted-clocks.md
:white_check_mark:Succeeded

Docs/Overview/glossary-and-abbreviations.md
:white_check_mark:Succeeded

Docs/Overview/product-versions.md
:white_check_mark:Succeeded

Docs/Overview/what-is-new.md
:white_check_mark:Succeeded

Docs/Overview/what-is-new/what-is-new-4-5.md
:white_check_mark:Succeeded

Docs/PlayReady/images/caution.gif
:white_check_mark:Succeeded

Docs/PlayReady/images/client_security_level.png
:white_check_mark:Succeeded

Docs/PlayReady/images/commit_changes.jpg
:white_check_mark:Succeeded

Docs/PlayReady/images/edit_file.png
:white_check_mark:Succeeded

Docs/PlayReady/images/encryption_tools.png
:white_check_mark:Succeeded

Docs/PlayReady/images/howtowritemarkdownposter.PNG
:white_check_mark:Succeeded

Docs/PlayReady/images/image26_7.jpg
:white_check_mark:Succeeded

Docs/PlayReady/images/microsoft-logo.png
:white_check_mark:Succeeded

Docs/PlayReady/images/note.gif
:white_check_mark:Succeeded

Docs/PlayReady/images/playready_server_implementations.png
:white_check_mark:Succeeded

Docs/PlayReady/images/preview_changes.png
:white_check_mark:Succeeded

Docs/PlayReady/images/pro_with_prh_hexdump1.png
:white_check_mark:Succeeded

Docs/PlayReady/images/video-packaging-1.jpg
:white_check_mark:Succeeded

Docs/PlayReady/images/video-packaging-2.jpg
:white_check_mark:Succeeded

Docs/PlayReady/images/video-play-button-1.jpg
:white_check_mark:Succeeded

Docs/PlayReady/images/video-play-button-2.png
:white_check_mark:Succeeded

Docs/Specifications/playready-header-specification.md
:white_check_mark:Succeeded

Docs/images/caution.gif
:white_check_mark:Succeeded

Docs/images/client_security_level.png
:white_check_mark:Succeeded

Docs/images/commit_changes.jpg
:white_check_mark:Succeeded

Docs/images/edit_file.png
:white_check_mark:Succeeded

Docs/images/encryption_tools.png
:white_check_mark:Succeeded

Docs/images/howtowritemarkdownposter.PNG
:white_check_mark:Succeeded

Docs/images/image26_7.jpg
:white_check_mark:Succeeded

Docs/images/microsoft-logo.png
:white_check_mark:Succeeded

Docs/images/note.gif
:white_check_mark:Succeeded

Docs/images/playready_server_implementations.png
:white_check_mark:Succeeded

Docs/images/preview_changes.png
:white_check_mark:Succeeded

Docs/images/pro_with_prh_hexdump1.png
:white_check_mark:Succeeded

Docs/images/video-packaging-1.jpg
:white_check_mark:Succeeded

Docs/images/video-packaging-2.jpg
:white_check_mark:Succeeded

Docs/images/video-play-button-1.jpg
:white_check_mark:Succeeded

Docs/images/video-play-button-2.png
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Conversion of conint is losing the type int

I think I have a small issue for BP008 part.
This model:
class MyModel(BaseModel):
    # ...
    some_id: Optional[conint(ge=1, le=4294967295)] = None

will be turned into:
class MyModel(BaseModel):
    # ...
    some_id: Optional[Field(ge=1, le=4294967295)] = None

At runtime, we will get this exception:
TypeError: typing.Optional requires a single type. Got FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=1), Le(le=4294967295)])
I was expecting a model along the line of:
class MyModel(BaseModel):
    # ...
    some_id: Optional[Annotated[int, Field(ge=1, le=4294967295)]] = None

Oh! My bad.
Yeah, I'll fix it tomorrow.

Thanks. I was working on a very small project so it was straight-forward for me to fix this manually. But it may help larger projects during their migration.


Al3mart/feat buy on demand coretime

This is a WIP draft to add the use case of allowing contracts to purchase on demand coretime.
This branch doesn't build at the moment

Closed as included in https://github.com/r0gue-io/pop-node/pull/33


Downloading updates through proxy as enhancement.

The auto update feature is great but since it made request to github cdn or S3, more or less, resulting a download failure. Just like https://github.com/shadowsocks/shadowsocks-windows, please add upgrading through proxy feature. Thanks!

The auto update feature using system proxy.


feat: Logging out

Write auth plugin components as wrappers

Allows plugins to always be mounted and control the transition to loading the app
Needed to ensure keycloak plugin can wipe token on logout

Refactor auth plugins to just use AuthPluginBase

There was a lot of the same code, just refactored it into one common base
Also added a useContextOrThrow hook

Added login screen for AuthPluginPsk

Took the LoginAnimation from Enterprise, renamed to RandomAreaPlotAnimation
Added a Login and LoginForm components to allow others to reuse if desired
Also stores the pre-shared key as a cookie after successful login

Add broadcast channel for notifying other tabs about login/logout

Notifies after successful login, or when logout button is pressed

Added permission for canLogout (since you can't logout when anonymous
Add context providers for overriding user info and permissions (used by auth plugins)

Getting an error when trying to import from auth-keycloak:
@deephaven/js-plugin-auth-keycloak: build started...
@deephaven/js-plugin-auth-keycloak: ✓ 6190 modules transformed.
@deephaven/js-plugin-auth-keycloak: Could not resolve "./Login.css" from<EMAIL_ADDRESS>@deephaven/js-plugin-auth-keycloak: file<EMAIL_ADDRESS>


Mapping issues with DI and AmbiguousMatchException - inconsistent results - bug?

I found some pretty weird behaviour with Mapster 7.4.0...
Imagine you have the following DTOs:
public class Source
{
    public long Id { get; init; }
}

public class ADestination
{
    public int Id { get; init; }
}

public class BDestination : ADestination
{
    public new long Id { get; init; }
}

With no configuration at all, Mapster should be able to map between these two types and it can... but only depending on how it's invoked:
var source = new Source();
source.Adapt<BDestination>(); // this works
source.Adapt(new BDestination()); // this throws a AmbiguousMatchException exception

To make things worse ... if your DTOs are not as simple as this example and you use DI/IoC and you combine this with TypeAdapterConfig<Source, BDestination>.NewConfig().ConstructUsing() then the results are again unexpected depending on the Expression passed:
using Microsoft.Extensions.DependencyInjection;

var serviceProvider = new ServiceCollection().AddTransient<BDestination>().BuildServiceProvider();

// Obviously use *one* of the configurations below only

// Works if configured this way (only when doing Adapt<BDestination>() though!!)
TypeAdapterConfig<Source, BDestination>.NewConfig().ConstructUsing(_ => new BDestination());

// Does not work with this configuration - no matter what I try
TypeAdapterConfig<Source, BDestination>.NewConfig().ConstructUsing(_ => serviceProvider.GetRequiredService<BDestination>());

var source = new Source();
source.Adapt<BDestination>(); // Depending on configuration used, either Mapster will map successfully or throw AmbiguousMatchException  here

Any ideas what's going on and any potential workarounds?

Ok cause I was really certain that this worked before with DryIoC and the only other thing I could think of was that I updated Mapster... I decided to go back to 7.3.0 and that works so this looks a regression bug?


[SPOOL-490] Make java handle GC log rotation

With logrotate's copytruncate handling of
/var/log/opscode/opscode-solr4/gclog.log, the system could end up with
(truncated) sparse files that had a huge apparent size (du --apparent-size FILE). Non-sparse-file-aware tools could then create a
mess when copying those logs.
See also http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7055309
Now, the rotation of those gclog files is handled by java (by passing
the right arguments). Also, it can be disabled in case you don't need
those files. For backwards compatibility, we've defaulted it to true.
Also, this adds another recipe for chef-server-ctl cleanup that
removes old rotated log files (when it was handled by logrotate).
Signed-off-by: Stephan Renatus<EMAIL_ADDRESS>

@chef/chef-server-maintainers (cc @jeremiahsnapp) Looking for another maintainer vote on this.


0.6.3 didn't expose PluginOptions interface

What version of prettier-plugin-tailwindcss are you using?
v0.6.3
What version of Tailwind CSS are you using?
v3.4.4
What version of Node.js are you using?
v20.13.1
What package manager are you using?
pnpm
What operating system are you using?
Ubuntu
Reproduction URL

Describe your issue
Found typing issue with 0.6.3
/** @typedef {import("prettier-plugin-tailwindcss").PluginOptions} TailwindConfig */
the line above not working anymore
0.6.2 index.d.ts
import { Parser, Printer, SupportOption } from 'prettier'

export interface PluginOptions {
  /**
   * Path to the Tailwind config file.
   */
  tailwindConfig?: string

  /**
   * Path to the Tailwind entry point (v4+)
   */
  tailwindEntryPoint?: string

  /**
   * List of custom function and tag names that contain classes.
   */
  tailwindFunctions?: string[]

  /**
   * List of custom attributes that contain classes.
   */
  tailwindAttributes?: string[]
}

declare module 'prettier' {
  interface RequiredOptions extends PluginOptions {}
  interface ParserOptions extends PluginOptions {}
}

export const options: Record<keyof PluginOptions, SupportOption>
export const parsers: Record<string, Parser>
export const printers: Record<string, Printer>

0.6.3 index.d.ts
import { SupportOption, Printer, Parser } from 'prettier';

declare const options: Record<string, SupportOption>;

declare const printers: Record<string, Printer>;
declare const parsers: Record<string, Parser>;
interface PluginOptions {
    /**
     * Path to the Tailwind config file.
     */
    tailwindConfig?: string;
    /**
     * Path to the Tailwind entry point (v4+)
     */
    tailwindEntryPoint?: string;
    /**
     * List of custom function and tag names that contain classes.
     */
    tailwindFunctions?: string[];
    /**
     * List of custom attributes that contain classes.
     */
    tailwindAttributes?: string[];
}
declare module 'prettier' {
    interface RequiredOptions extends PluginOptions {
    }
    interface ParserOptions extends PluginOptions {
    }
}

export { options, parsers, printers };

Is there a reason you're typing as PluginOptions from our plugin rather than Options from prettier?
e.g. /** @type {import('prettier').Options} */

It happened to be in a config from this project
can you give a recommendation for how to use it start from 0.6.3?

@exneval
if you're using an isolated prettier module like in t3's monorepo example, you can get around this by adding a types.d.ts to the prettier package and set it yourself until it gets resolved, like this
//prettier/types.d.ts
declare module "prettier-plugin-tailwindcss" {
  import type { Options } from "prettier";

  export interface PluginOptions {
    /**
     * Path to the Tailwind config file.
     */
    tailwindConfig?: string;
    /**
     * Path to the Tailwind entry point (v4+)
     */
    tailwindEntryPoint?: string;
    /**
     * List of custom function and tag names that contain classes.
     */
    tailwindFunctions?: string[];
    /**
     * List of custom attributes that contain classes.
     */
    tailwindAttributes?: string[];
  }
}

@exneval @biohackerellie If you have control over the config you should just remove the import and the typedef. The definitions will still show up and click through will still work. It's the entire reason we have the declare module 'prettier' { … } code in the types:

I'm going to merge in a fix for this and push a patch release out because it's an unintentional breaking change — but as far as I know there should never be a reason for a project to need to import or use that type.

Fix released in v0.6.4

Aside: I just created a project with that template and it indeed doesn't work by default. Something must be going on with the typescript config there because it's supposed to work.
Adding a reference comment in the file fixes this tho:
/// <reference types="prettier-plugin-tailwindcss" />

Tagging @juliusmarminge here since this should be updated in t3-turbo as well

Tagging @juliusmarminge here since this should be updated in t3-turbo as well

File a PR :)


It's not working EEEeeeeeeekkk!!!!!

Somehow with the namespace update it's all not working now.
So if you have a script dependent on another script loaded later, it isnt working.
FIX IT!!!!!

Sorte


more detail/example needed to get going

If you're not familiar with Nagios (like myself) it's difficult to get going with these cookbooks (nagios+nrpe). For me it would really help to have a small example to get basic monitoring counters included for a small cluster. With a small example working it;s much easier to scale up...
For example what is not clear now:

when do i need nrpe? Where to install it? How do these connect to the server?
what checks are provided by default?

Thanks for any tips,
Paul

Hi Paul,
It's indeed very hard to start with this cookbook while you don't have any experience with Nagios.
So I would start with the Nagios documentation on https://assets.nagios.com/downloads/nagioscore/docs/nrpe/NRPE.pdf
But I will try to answer your questions:
NRPE client is used to execute scripts/executables that check something and report this back to nagios.
NRPE client is installed on the target machine were you want to run the check.
Nagios uses check_nrpe with some parameters to connect to the NRPE client
The default checks are installed under /usr/lib/nagios/plugins/* so here you can find them.

Hello Paul,
I agree with Sander. Try to install and configure nagios manually, without cookbook. Once you get familiar with nagios internals, you will be ready to dive into cookbook. Without nagios engine knowledge you will not be able fix an issue in nagios once bad things happen.


Old 16 digit project member ID triggers error

The Message Project Members feature isn't working for a pre-existing direct sharing project that has a 16 digit ID.

@madprime fixed in dfc51a65f80ec2964d2e1ddb25515e7da8a27c88; OK to deploy to production? (this would mean mPower would get deployed as well, or I can cherry pick just this fix...)

Yeah... I'd like to see this deployed this morning, but can you give mPower a run-through on staging? Pretend to be a naive user, follow the data retrieval and upload instructions. Afterwards, double-check that the file shows up in the database post-upload.
(Deploying mPower helps with communications, we want to let GET Labs attendees know they should hook up sources/studies to show up on their badges.)

Updated the mPower docs and fixed a small bug :)


Removed old file

Description
This PR just removes an old file not currently used.
[] It needs and includes Unit Tests
Changes in Client or Server public APIs

[] It includes documentation for these changes in /doc.

Sorry, I mixed two PRs. Deleting this and creating a new one....


Add support for Django 2.1

Add django 2.1 to tox.ini. Tests pass without any changes.
Skipped 2.0 as it is already EOL.

Coverage remained the same at 97.015% when pulling 00e333b5a036f7a3428f8d3d0fe17a10f376f7b3 on dbowring:tox-django2.1 into f1901625034029a09a926e39ed7cff24b4d512b2 on agiliq:master.

Closing, as 2.1 is no longer supported.


Update minishift to 1.13.1

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Thanks!


Error when precompiling assets

Go to gems spec/test_app directory and run
bundle exec rake assets:precompile
You get
rake aborted!
SyntaxError: /Users/mitch/railsdev/reactive-ruby/lib/generators/reactive_ruby/test_app/templates/application.rb.erb:2: syntax error, unexpected tSTRING_BEG, expecting keyword_then or ';' or '\n'
_erbout.concat "require File.expand_path('../boot', __FILE__) \n"
                ^
/Users/mitch/railsdev/reactive-ruby/lib/generators/reactive_ruby/test_app/templates/application.rb.erb:15: syntax error, unexpected keyword_end, expecting end-of-input
/Users/mitch/.rvm/gems/ruby-2.2.2/gems/sprockets-3.5.2/lib/sprockets/erb_processor.rb:25:in `call'
/Users/mitch/.rvm/gems/ruby-2.2.2/gems/sprockets-3.5.2/lib/sprockets/erb_processor.rb:13:in `call'
/Users/mitch/.rvm/gems/ruby-2.2.2/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/mitch/.rvm/gems/ruby-2.2.2/gems/sprockets-3.5.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'

This worked fine at this commit e2147320633f5981145063b86ad149d6a716ffd1

This issue was moved to reactrb/reactrb#107


changed: removed ' in path for working on Windows system

webp8 on Windows
preparing:

install PHP, Composter and cwebp
add pathes for Composter, PHP and cwebp in Environment Variables (sysdm.cpl -> Advanced -> E.V.)
restart system
composter install

run:
php src/webp8.php convert [Directory]

thank you for the pull request, how will the changes affect linux systems?

thank you for the pull request, how will the changes affect linux systems?

It seems that nothing has changed) convert and cleanup work, but maybe I did not notice something.

webp8 on Windows
preparing:

install PHP, Composter and cwebp
add pathes for Composter, PHP and cwebp in Environment Variables (sysdm.cpl -> Advanced -> E.V.)
restart system
composter install

run:
php src/webp8.php convert [Directory]

please add to README

thank you for the pull request, how will the changes affect linux systems?

It seems that nothing has changed) convert and cleanup work, but maybe I did not notice something.

I pretty sure I put the '' for a reason, can you update your code to something like that?
if ($windows)
        $command = "cwebp {$options} {$src} -o {$dest}";
else
        $command = "cwebp {$options} '{$src}' -o '{$dest}'";

only README update missing

https://www.php.net/manual/en/function.php-uname.php php-uname('s') seems to be a better choice to check the OS the script is running on.


Force postgresql to 9.4

This commit https://github.com/mirumee/saleor/commit/0191dd92e25230f0b1b9d0c20bb1c48fa56f53dc#diff-354f30a63fb0907d4ad57269548329e3 force postgresql version to 9.4. I don't know why. But it is better to keep same both in travis and circle CI.
Pull Request Checklist

[ ] Privileged views and APIs are guarded by proper permission checks.
[ ] All visible strings are translated with proper context.
[ ] All data-formatting is locale-aware (dates, numbers, and so on).
[ ] Database queries are optimized and the number of queries is constant.
[ ] The changes are tested.
[ ] The code is documented (docstrings, project documentation).
[ ] GraphQL schema and type definitions are up to date.

I'm pretty sure we'd rather use PostgreSQL 11.x, @artursmet any idea why this was set to 9.4?

As far as I remember, travis default psql version was petty old and we needed something newer that contains Hstore extensions. There are no blockers to use more recent version of postgresql in tests. Probably they were not available at the time


Relative_action

Hello, I am currently exploring your fascinating project and I have noticed that the relative_action parameter is specifically utilized with CALVIN. I am curious to understand the rationale behind this specific usage.

Could you kindly share the insights or analyses that led to the decision to use relative_action only in the context of CALVIN?

Thank you very much for your time and for the impressive work on this project.

Hi @chenjiayi-zxx, thanks for you interest in our project!
In some earlier experiments we found using a relative coordinate frame not to be an important factor on RLBench. However, we did find it important on CALVIN, as also suggested by related literature such as HULC. We hypothesize that this is due to the nature of instructions of CALVIN, e.g. "mover block to the right", which suggest relative actions. Instead, on RLBench there is usually a set of solutions defined visually, e.g. reaching the handle of a door.
We haven't retried relative actions recently on RLBench, so it's possible that if you try you'll notice some performance difference.


New version: ImageView v0.10.0

Registering package: ImageView
Repository: https://github.com/JuliaImages/ImageView.jl
Created by: @timholy
Version: v0.10.0
Commit: 3461d79f7b8707437382d5884ab7b15527c5b670
Reviewed by: @timholy
Reference: https://github.com/JuliaImages/ImageView.jl/commit/3461d79f7b8707437382d5884ab7b15527c5b670#commitcomment-36326375

[noblock] This was the final step in a long journey: fixing JuliaImages on OSX. ProfileView "crossed over" in https://github.com/JuliaRegistries/General/pull/6422, so I think this is the last of the packages I maintain, and a really pivotal one for JuliaImages.
I'd like to thank everyone who helped with the Artifacts system on Julia 1.3 and the consequent Cairo/Gtk stack, esp. @staticfloat, @giordano, @StefanKarpinski, @KristofferC, @SimonDanisch, @tknopp, and @lobingera. (Sorry if I missed anyone!)


JSONModel observe does not update the binding if push is used on an array

OpenUI5 version:
1.40.8
Browser/version (+device/version):
Chrome 53
Any other tested browsers/devices(OK/FAIL):
Code (minimal example if possible):
http://jsfiddle.net/pjraj52p/
Steps to reproduce the problem:

Create a JSONModel with an array and observe true
Create a list bound to this array
Add an element to the list with jsonModel.getData().items.push()

What is the expected result?
The list bound to the model should automatically show the new item
What happens instead?
Nothing. I have to execute list.getBinding("items").refresh(); to see the new item
Any other information? (attach screenshot if possible)
A proxy might solve this issues: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy

Thanks. I've opened internal incident<PHONE_NUMBER> to clarify if this is something that could easily be fixed in the current implementation or if a different approach (e.g. Proxy) would be a better solution.

As described in the JSONModel API documentation:
"Observation does only work for existing properties in the JSON, it can not detect new properties or new array entries."

Can I make a feature request out of it?
I would guess my use case is very common and should be supported.

The reason it is not supported is not that we didn't think about it or were too lazy to build it, but there was no way to catch new properties or new array entries. The new Proxy object may be a solution, but is not supported on all our browsers yet.

@goligo Thanks for the explanation. For is it would be ok if it works only in modern browsers.


feat(regular_expression): add terms visitor to pattern

To make it easier to iterate over the nodes in the regex AST, I attempted to add a pseudo-visitor method for patterns

#5951  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @camchenry and the rest of your teammates on  Graphite

@DonIsaac I am not familiar with this area...! 😅
Should these be handwritten? Or we need some updates for tasks/ast_tools?

I feel like this might be the wrong implementation, but we probably do need some sort of regular expression AST visitor. I'm going to mark this as draft for now

create a generic AST visitor that can visit every node type

I agree.
For the main oxc_ast ASTs, it seems adding #[ast(visit)] instructs tasks/ast_tools to automatically generate the visit_ implementation (sorry, maybe I'm wrong).
However, I don't know the details of how it works or whether we should do the same here.
@Boshen Would you please help me to review? 🙏🏻

We can always start with a manual one to test the water, and then migrate to ast_tools.

@camchenry If that's the case, I think there's no problem.
Just 1 point, I think it would be nice to separate the file as visit.rs with comments referring to ast_tools.

closing this in favor of https://github.com/oxc-project/oxc/pull/6055, which is the better implementation I think


[]:Error will be reported when directly used in nextjs

Error will be reported when directly used in nextjs

Hi @2995404392 , Could you provide a little bit more details?


[Node] fix typos in include/tvm/node/functor.h

fixed typos in include/tvm/node/functor.h

Thanks for the fix @hckim96! This is now merged :smile_cat:


FEAT: Icebreakers functionality

Description
It would be fun to add this to the bot, so that we can run a solution in discord itself, instead of that bad buggy platform.
Why not :P
Due date
2-3 days probably

related to CommonsBuild/coordination#678


SERVER WGBR Might not be starting (no config appears in folder)

Describe the bug
In my large modpack the mod seems to not be starting
To Reproduce
In order to reproduce this you would need my server.
The config file does not appear in the server folder after running.
The commands do not activate for the client.
Logs/Screenshots/Videos
https://paste.ubuntu.com/p/XBHfjDHH9m/
Versions (please complete the following information, do NOT say "latest"):

Minecraft: 1.12.2
Mod Version: 2.3.1 - 1.12.2
Forge (If applicable) <IP_ADDRESS>55

Long story short, make sure your shortcuts are launching the correct server.


[YogaKit][travis] Upgrade Travis to Xcode 8.2

Doing this externally to trigger a Travis build. This will put our Travis infra on the newest Xcode.

FWIW Travis is currently failing. If you look at the build this spun-off, the YogaKitTests actually passed with Xcode8.2


Shift+Del aka Perminant Delete does not work.

Description
If you use Shift+ Delete key to delete a file or folder, it does nothing.
Steps To Reproduce
Press Shift + Delete on a file or a folder.
Click on Delete button on new menu.
Nothing happens.
Expected behavior
For the file to be removed permanently
Files Version
Version: <IP_ADDRESS> OS Version: 10.0.22000.556
Windows Version
Windows 11 Pro Version	21H2 OS build	22000.556 Experience	Windows Feature Experience Pack 1000.22000.556.0
Relevant Assets/Logs
debug.log
debug_fulltrust.log

Issue is only with permanent delete or also moving to bin? Any difference of you try with the keyboard or the context menu? Does the delete confirmation dialog appear?

Normal delete or moving to bin has no issue; only the permanent delete has this issue.
Both keyboard and context menu while holding shift does nothing after confirming to delete.
Delete confirmation dialog does appear.
Yes it is enabled.

Here's what the bug is like for me.
https://user-images.githubusercontent.com/61494838/160541181-0196888d-1b7e-4cd3-b6d1-b73a8d1bd7e8.mp4

In latest preview build version: <IP_ADDRESS>
OS Version: 10.0.22000.652
Shift + Trash Can icon click does not pre-fill the "Permanent Delete" checkbox.
After the file is deleted, and the operation is done, I open the Operation list on the top right, click Clear, and after clearing all operations sucessfully, the operations popup window stays open, empty, instead of closing automatically :)

Is this still an issue in <IP_ADDRESS>?

Yes happens often.

Asking @yaichenbaum for approval.

Is this still an issue in the preview build? https://files.community/download/preview

Everything woks fine for me in version <IP_ADDRESS>
https://user-images.githubusercontent.com/109022579/195945547-8c76fcf5-6f0f-419d-ab13-a4a3cb27a927.mp4


Major docs overhaul: refs, guide, cookbook

Split the docs into reference, guide, and cookbook.
The guide is mostly as it was before, with a lot of cleanup. Some sections were combined and simplified.
Some guides were moved into a new cookbook section. This section describes techniques that are helpful in specific situations of using factory_bot but not, in itself, part of factory_bot. For example, using factory_bot to simulate a has_many relation.
Other guides were moved into the wiki. The criteria for this was: does it have to do with factory_bot, or with something external? Will we change the docs alongside a change in this repo's code, or due to another repo's code change?
A new reference section is added. It lists terse facts about methods you are expected to use. The reason RubyDoc isn't the right solution here is because these methods are defined all over the codebase. Due to instance_eval and mixins, factory_bot is more of a DSL than a set of Ruby classes. Thus, the reference section.

Looks like GitHub closed the PR before it merged it. Wrong order, GitHub!
Anyway this is merged now.


fix(vscode): add GitHub.copilot-chat to hybrid mode compatible list

fix #5044

Hey guys, what's the estimated release date?


Optional query string parameter with a default value

One thing that has come up at work several times: we'd like to be able to declare an optional query string parameter with a default value. OpenAPI supports describing default values (see "Default Parameter Values" on this page).
I've not given much thought to syntax for this, but ideally you could do something like this:
path / "api" / "v1" / "pets" /? qs[Int]("limit", default = 5): Url[Int]

Then, the endpoint would have a default value

server interpreters would look for an optional param and use the default value as a fallback
documentation interpreters would generate docs mentioning the default value (Swagger UI knows how to generate forms that fill this default in nicely, I think)
client interpreters would be generated always specifying the value (so never using the default)

As a workaround, we've been doing the following, but that forces us to put information about the default value in documentation, and the generated OpenAPI isn't as useful.
path / "api" / "v1" / "pets" /? qs[Option[Int]]("limit").xmap(_.getOrElse(5))(Some(_)): Url[Int]

I'd be happy to implement this. I'll have to think a little about how this could fit into the QueryStringParam/QueryString types that get used first though.

Interesting, actually I didn’t know we could document default values for optional parameters. I see that this is supported in JSON schemas as well.
Currently, we use your workround to implement JSON schemas of objects having an optional field with a default value:
https://github.com/endpoints4s/endpoints4s/blob/99a1a74ea852ddd85bf4a6fbd12b06063ee312a8/json-schema/json-schema/src/main/scala/endpoints4s/algebra/JsonSchemas.scala#L292-L309
But as you said, the generated documentation doen’t tell about the default value.
So, this discussion makes me think that we could try to have a homogeneous syntax for both JSON schemas and query string parameters.
Speaking of the syntax, adding an overload qs[Int]("limit", default = 5) should work.

Great point about aiming for a solution that deals with JSON schemas and query string parameters in the same way - I hadn't noticed that this was supported in JSON schema as well. It'll simplify some of the boilerplate docs we currently include (which do little more than comment about what the default value of the optional field it). Unless someone beats me to it, I'll make a PR as soon as I have some time (hopefully later this week).On Oct 22, 2020, at 2:30 AM, Julien Richard-Foy<EMAIL_ADDRESS>wrote:Interesting, actually I didn’t know we could document default values for optional parameters. I see that this is supported in JSON schemas as well.Currently, we use your workround to implement JSON schemas of objects having an optional field with a default value:https://github.com/endpoints4s/endpoints4s/blob/99a1a74ea852ddd85bf4a6fbd12b06063ee312a8/json-schema/json-schema/src/main/scala/endpoints4s/algebra/JsonSchemas.scala#L292-L309But as you said, the generated documentation doen’t tell about the default value.So, this discussion makes me think that we could try to have a homogeneous syntax for both JSON schemas and query string parameters.Speaking of the syntax, adding an overload qs[Int]("limit", default = 5) should work.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

I have a problem with the way default values are modeled in JSON schemas. Consider the case where you have an object type Foo containing an optional property of type Bar with a default value. We would put the information about the default value used by Foo in the schema of Bar:
{
  "Foo": {
    "type": "object",
    "properties": {
      "bar": { "$ref": "#/components/schemas/Bar" }
    }
  },
  "Bar": {
    "type": "object",
    "properties": { /* something */ },
    "default": { /* something */ }
  }
}

The problem is that if another type Quux has an optional field of type Bar with a default value different from the default value used by Foo, we can’t represent it because the default value is not attached to the schema that contains the optional property (Foo or Quux), but to the schema of the target type (Bar).
This may not be an issue in query parameters, though, because we don’t name these schemas, so there is no possible reuse. (Only schemas of JSON entities can be named)

@harpocrates In case you are working on the support of optional query parameters with default values, you may be interested in this commit, which adds the ability to produce a default property to the schemas generated by endpoints4s.

The problem is that if another type Quux has an optional field of type Bar with a default value different from the default value used by Foo, we can’t represent it because the default value is not attached to the schema that contains the optional property (Foo or Quux), but to the schema of the target type (Bar).

If you have a type Quux and it has a field with type Bar and Quux has default values defined, it would have a field with a default value for type Bar, would you still run in to the problem?

Because it needs to include all fields and therefore all the default values of the types it includes.

Except when we $ref to a schema. In that case, the referenced schema is shared, so no overriding is possible. If I understood correctly.

I solved this problem also in an Avro library I've developed. Like with JsonSchema I came up with a abstract way of describing data structures like seen here: https://gist.github.com/Fristi/525d4381dc1c966a42abeb189f585d37#file-data-scala-L33 (this is simalair to the work of xenomorph and schemaz)
In the Avro library I created a few different type classes like AvroEncoder , AvroDecoder and also AvroDefaultValuePrinter. An sample of this can be seen here for JSON https://gist.github.com/Fristi/525d4381dc1c966a42abeb189f585d37#file-data-scala-L33 (where you supply a Dsl[A] value and get back a JsonDecoder[A]. Basically it interprets the high level dsl description into a type class. This is what xenomorph does (https://github.com/nuttycom/xenomorph)
In the AvroDefaultValuePrinter case you would make an type class like this
object AvroDefaultValuePrinter {

  import scala.collection.JavaConverters._

  def create[A](f: A => JsonNode): AvroDefaultValuePrinter[A] = new AvroDefaultValuePrinter[A] {
    override def print(value: A): JsonNode = f(value)
  }

  def by[A, B](printer: AvroDefaultValuePrinter[A])(f: B => A): AvroDefaultValuePrinter[B] = new AvroDefaultValuePrinter[B] {
    override def print(value: B): JsonNode = printer.print(f(value))
  }

  implicit val interpreter: AvroAlgebra[AvroDefaultValuePrinter] = new AvroAlgebra[AvroDefaultValuePrinter] with AvroDefaultValuePrinterRecordN {

    override val int: AvroDefaultValuePrinter[Int] = create(new IntNode(_))
    override val string: AvroDefaultValuePrinter[String] = create(new TextNode(_))
    override val bool: AvroDefaultValuePrinter[Boolean] = create(BooleanNode.valueOf)
    override val float: AvroDefaultValuePrinter[Float] = create(v => new DoubleNode(v.toDouble))

    override def bigDecimal(scale: Int, precision: Int): AvroDefaultValuePrinter[BigDecimal] = by(byteArray) { decimal =>
      val decimalType = LogicalTypes.decimal(precision, scale)
      val decimalConversion = new Conversions.DecimalConversion

      decimalConversion.toBytes(decimal.setScale(scale).bigDecimal, null, decimalType).array()
    }

    override val byteArray: AvroDefaultValuePrinter[Array[Byte]] =
      create(bytes => new TextNode(new String(bytes, Charset.forName("ISO-8859-1"))))

    override val double: AvroDefaultValuePrinter[Double] = create(new DoubleNode(_))

    override val long: AvroDefaultValuePrinter[Long] = create(new LongNode(_))

    override val cnil: AvroDefaultValuePrinter[CNil] = create(_ => NullNode.instance)

    override val uuid: AvroDefaultValuePrinter[UUID] = by(string)(_.toString)

    override val instant: AvroDefaultValuePrinter[Instant] = by(long)(_.toEpochMilli)

    override def option[A](from: AvroDefaultValuePrinter[A]): AvroDefaultValuePrinter[Option[A]] = create {
      case Some(v) => from.print(v)
      case None => NullNode.instance
    }

    override def list[A](of: AvroDefaultValuePrinter[A]): AvroDefaultValuePrinter[List[A]] =
      create(xs => new ArrayNode(JsonNodeFactory.instance).addAll(xs.map(of.print).asJava))

    override def set[A](of: AvroDefaultValuePrinter[A]): AvroDefaultValuePrinter[Set[A]] = by(list(of))(_.toList)

    override def vector[A](of: AvroDefaultValuePrinter[A]): AvroDefaultValuePrinter[Vector[A]] = by(list(of))(_.toList)

    override def seq[A](of: AvroDefaultValuePrinter[A]): AvroDefaultValuePrinter[Seq[A]] = by(list(of))(_.toList)

    override def map[K, V](value: AvroDefaultValuePrinter[V])(mapKey: String => Attempt[K])(contramapKey: K => String): AvroDefaultValuePrinter[Map[K, V]] = create { mm =>
      new ObjectNode(JsonNodeFactory.instance).putAll(mm.map { case (k, v) => contramapKey(k).trim -> value.print(v) }.asJava)
    }

    override def pmap[A, B](fa: AvroDefaultValuePrinter[A])(f: A => Attempt[B])(g: B => A): AvroDefaultValuePrinter[B] = by(fa)(g)

    override def imap[A, B](fa: AvroDefaultValuePrinter[A])(f: A => B)(g: B => A): AvroDefaultValuePrinter[B] = by(fa)(g)

    override def or[A, B](fa: AvroDefaultValuePrinter[A], fb: AvroDefaultValuePrinter[B]): AvroDefaultValuePrinter[Either[A, B]] = create {
      case Left(left) => fa.print(left)
      case Right(right) => fb.print(right)
    }
  }
}

Hope it makes sense! :)


Prometheus Operator with custom prometheus.yml

Hello guys, I'm trying to better understand the behaviour of Prometheus Operator. There are some things I can't quite explain but all that said I'm in no way good at Kubernetes.
What did you do?
I created a Prometheus Operator on a Tectonic Cluster, and an associated dockerized Graphite Exporter. Using ServiceMonitor and checking targets in Prometheus, it does manage to discover my graphite exporter. However, I want to now use this same operator to also monitor instances outside of the Tectonic cluster which are not managed by Tectonic, and all the information I can find online only demonstrates how to monitor pods managed by Tectonic, which is working fine for me. From what I can tell:
i) There's no way to include another configuration file to Prometheus (I've tried putting my extra scrape_config in a .rules file, it didn't like it).
cassandra.rules: |
    global:
      scrape_interval: 30s
      scrape_timeout: 10s
      evaluation_interval: 30s
    rule_files:
    - /etc/prometheus/rules/rules-0/*.rules
    scrape_configs:
    - job_name: cassandra-nodes
        ec2_sd_configs:
        - region: ap-northeast-2
          profile: tectonic-worker-role
          port: 9100

        relabel_configs:
        - action: keep
          source_labels: [__meta_ec2_tag_K8SCluster]
          regex: ForTheGreaterGood*

ii) The prometheus.yaml file is automatically created by the operator based on the definition of ServiceMonitor.
To that end I created a ConfigMap with Prometheus.yaml to try and get Prometheus to reload, with the default which I copy+pasted from Prometheus with my own custom scrape_config tacked on at the bottom:
apiVersion: v1
kind: ConfigMap
metadata:
  name: cassandra-prometheus-configmap
  labels:
    prometheus: cassandra
data:
  prometheus.yaml: |
    global:
      scrape_interval: 30s
      scrape_timeout: 10s
      evaluation_interval: 30s
    rule_files:
    - /etc/prometheus/rules/rules-0/*.rules
    scrape_configs:
    - job_name: default/prometheus-graphite/0
      scrape_interval: 30s
      scrape_timeout: 10s
      metrics_path: /metrics
      scheme: http
      kubernetes_sd_configs: <---- Seems to be that all this was autogenerated by declaring ServiceMonitor
      - api_server: null
        role: endpoints
        namespaces:
          names:
          - default
      relabel_configs:
      - source_labels: [__meta_kubernetes_service_label_service]
        separator: ;
        regex: prometheus-graphite
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_endpoint_port_name]
        separator: ;
        regex: prometheus-graphite
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_namespace]
        separator: ;
        regex: (.*)
        target_label: namespace
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_pod_name]
        separator: ;
        regex: (.*)
        target_label: pod
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_service_name]
        separator: ;
        regex: (.*)
        target_label: service
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_service_name]
        separator: ;
        regex: (.*)
        target_label: job
        replacement: ${1}
        action: replace
      - source_labels: []
        separator: ;
        regex: (.*)
        target_label: endpoint
        replacement: prometheus-graphite
        action: replace
    - job_name: cassandra-nodes <----- Start of my custom scrape_config
        ec2_sd_configs:
        - region: ap-northeast-2
          profile: tectonic-worker-role
          port: 9100

        relabel_configs:
        - action: keep
          source_labels: [__meta_ec2_tag_K8SCluster]
          regex: ForTheGreaterGood*

I applied to my cluster, checked the logs of Prometheus-config-reloader, it was all good:
ts=2017-10-05T23:02:58Z caller=main.go:244 component=volume-watcher msg="ConfigMap modified."
ts=2017-10-05T23:02:58Z caller=main.go:204 component=volume-watcher msg="Updating rule files..."
ts=2017-10-05T23:02:58Z caller=main.go:209 component=volume-watcher msg="Rule files updated."
ts=2017-10-05T23:02:58Z caller=main.go:212 component=volume-watcher msg="Reloading Prometheus..."

Prometheus looked great as well:
time="2017-10-05T23:02:00Z" level=info msg="Done checkpointing in-memory metrics and chunks in 44.599677ms." source="persistence.go:665"
time="2017-10-05T23:02:58Z" level=info msg="Loading configuration file /etc/prometheus/config/prometheus.yaml" source="main.go:252"
time="2017-10-05T23:02:58Z" level=info msg="Using pod service account via in-cluster config" source="kubernetes.go:104"
time="2017-10-05T23:07:00Z" level=info msg="Checkpointing in-memory metrics and chunks..." source="persistence.go:633"

But on closer look at my Prometheus, it still only has the default configuration which I believe was put there by the ServiceMonitor:
global:
      scrape_interval: 30s
      scrape_timeout: 10s
      evaluation_interval: 30s
    rule_files:
    - /etc/prometheus/rules/rules-0/*.rules
    scrape_configs:
        - job_name: default/prometheus-graphite/0
      scrape_interval: 30s
      scrape_timeout: 10s
      metrics_path: /metrics
      scheme: http
      kubernetes_sd_configs:
      - api_server: null
        role: endpoints
        namespaces:
          names:
          - default
      relabel_configs:
      - source_labels: [__meta_kubernetes_service_label_service]
        separator: ;
        regex: prometheus-graphite
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_endpoint_port_name]
        separator: ;
        regex: prometheus-graphite
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_namespace]
        separator: ;
        regex: (.*)
        target_label: namespace
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_pod_name]
        separator: ;
        regex: (.*)
        target_label: pod
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_service_name]
        separator: ;
        regex: (.*)
        target_label: service
        replacement: $1
        action: replace
      - source_labels: [__meta_kubernetes_service_name]
        separator: ;
        regex: (.*)
        target_label: job
        replacement: ${1}
        action: replace
      - source_labels: []
        separator: ;
        regex: (.*)
        target_label: endpoint
        replacement: prometheus-graphite
        action: replace

What did you expect to see?
I was expecting my own custom config to be tacked on at the bottom. My Prometheus Operators/ServiceMonitors are all based on the available getting started/documentation on Prometheus Operator with labels tweaked. This is the deployment if it helps:
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  labels:
    deployment: cassandra-prometheus-operator
  name: cassandra-prometheus-operator
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: cassandra-prometheus-operator
    spec:
      serviceAccountName: cassandra-prometheus
      containers:
      - args:
        - --kubelet-service=kube-system/kubelet
        - --config-reloader-image=quay.io/coreos/configmap-reload:v0.0.1
        - --prometheus-config-reloader=quay.io/coreos/prometheus-config-reloader:v0.0.2
        image: quay.io/coreos/prometheus-operator:v0.12.0
        name: cassandra-prometheus-operator
        ports:
        - containerPort: 8080
          name: http
        resources:
          limits:
            cpu: 200m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 50Mi

What did you see instead? Under which circumstances?
My Prometheus Operator doesn't have the updated configuration. I tried destroying and recreating the config map a couple of times and restarted the pod, it still behaved the same way.
Environment

Kubernetes version information:

Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T07:00:21Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3+coreos.0", GitCommit:"42de91f04e456f7625941a6c4aaedaa69708be1b", GitTreeState:"clean", BuildDate:"2017-08-07T19:44:31Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

Kubernetes cluster kind:
This was a tectonic cluster installed using the tectonic-installer.
Prometheus Operator Logs:

ts=2017-10-05T23:03:46Z caller=operator.go:641 component=prometheusoperator msg="sync prometheus" key=tectonic-system/k8s
ts=2017-10-05T23:03:46Z caller=operator.go:999 component=prometheusoperator msg="updating config skipped, no configuration change"
ts=2017-10-05T23:03:52Z caller=operator.go:641 component=prometheusoperator msg="sync prometheus" key=tectonic-system/k8s
ts=2017-10-05T23:03:52Z caller=operator.go:999 component=prometheusoperator msg="updating config skipped, no configuration change"
ts=2017-10-05T23:03:52Z caller=operator.go:309 component=prometheusoperator msg="Prometheus updated" key=tectonic-system/k8s
ts=2017-10-05T23:03:52Z caller=operator.go:309 component=prometheusoperator msg="Prometheus updated" key=default/cassandra-prometheus

I'm also just curious if anybody has had any success in getting Prometheus Operator to monitor instances not managed by Kubernetes/Tectonic, if you did, I'd love to hear how. At the moment I unable to get a custom configuration to be used by the Prometheus pod, and ServiceMonitor requires LabelSelector and Endpoints (I want to try to use Prometheus' ec2_sd_config in its scrape_config). I could load *.rules files (or, at least, it certainly tried because it complained:
unexpected <op:-> in record statement, expected "="

Which I am attributing to me trying to put a scrape_config into a rules file. It would seem that without the ability to add a custom scrape_config it's not possible?
If there's a better place to ask about this let me know. Thanks a lot!

On a closer glance and the source code, it looks like Config reloader is only able to reload configurations which target the ".rule" directory. In that case, I guess it is not possible to provide custom prometheus.yamls to a Tectonic Prometheus Operator's managed Prometheus and as a corollary of that is then since it is generated based on ServiceMonitor only instances/pods managed by Tectonic can be monitored? :(

There are a couple of confusions here, I'm hoping I can solve all of them. Firstly, Prometheus rule files are not about the Prometheus configuration itself, it's meant for specifying the alerting rules. The Prometheus configuration is primarily about how Prometheus is supposed to discover targets, and which of those to select to be monitored.
In contrast to the etcd-operator, the Prometheus Operator works cluster wide, so you will not need an additional deployment as Tectonic already ships with a cluster wide Prometheus Operator. All you need to do is create a Prometheus object.
There is a way to specify a custom configuration, but it's not very well documented and a few features will not work if you choose to do so. The way you can enable your Prometheus pods to use a custom configuration is by not specifying a serviceMonitorSelector in your Prometheus object. This will in contrast also mean, that you cannot configure your Prometheus instances with the ServiceMonitor objects, but need to do so entirely manually.
Leaving the serviceMonitorSelector empty, will then enable you to manage the Secret containing the Prometheus configuration yourself. The secret needs to be named prometheus-<prometheus-object-name>, and the configuration must be stored under the key prometheus.yaml.
The ServiceMonitor object of the Prometheus Operator is primarily meant to monitor targets using the Kubernetes API for service discovery, in your case, you want to discover targets using ec2 service discovery, so using a custom configuration is legit in this case.
Let me know if this helps, and feel free to ask any further questions! :slightly_smiling_face:

You bet it helps. Wow. After a lot more mucking around, it works just as you described!
I am trying to use Prometheus to monitor instances both inside Tectonic and outside Tectonic, and was trying to get away with having a ServiceMonitor for the pods and a custom configuration otherwise. That actually clears things up a lot, thanks a lot for your effort in explaining all that again! 👍

As this is not the first time this has come up, I will make sure to create a documentation page for this right now.

Hi,  Is it possible to have an example on how to create the custom configuration?

I currently don't have the capacity to write docs on this, but you are more than welcome to contribute some if you can figure it out. I believe I have commented about custom configs a couple times on the issue tracker here, so you should be able to find most of the information.

@ScottBrenner Prometheus only supports the Prometheus text format for metrics. You need to convert you Jason formatted metrics to the Prometheus format for Prometheus to be able to understand it. If what you have is a commonly used application/database chances are this already exists. We call these types of shim applications “exporters”.


it stops oscillating!

Value of k0 dropped in 071ea75 caused system to lose its oscillation.

Correct!


az ad sp create-for-rbac is flaky

$az ad sp create-for-rbac --role contributor --scopes /subscriptions/{redacted-guid}

Resource 'ServicePrincipal_1cd4fa0c-069f-49e0-b4c6-b25105798bfe' does not exist or one of its queried reference-property objects are not present.

Here's a different failure, same command:
No matches in graph database for 'e2a6833c-9453-47b0-8f06-41083189768d'

this is a dupe of 1332

dupe of #1332


allow for decimals in fiat unit

Offlineshop extension couldn't handle decimals, in items... now it does!

Yo, love this PR, finally!
Can you run make format and add adjust the migration to conv.py pls! Ideally you'd also update the extension db in mock_data.zip so the tests fail for the next person as well :)

Codecov Report

Merging #791 (85db59c) into main (783502e) will increase coverage by 0.02%.
The diff coverage is 55.55%.

@@            Coverage Diff             @@
##             main     #791      +/-   ##
==========================================
+ Coverage   41.22%   41.25%   +0.02%
==========================================
  Files         207      207
  Lines       10912    10926      +14
==========================================
+ Hits         4499     4507       +8
- Misses       6413     6419       +6

Impacted Files
Coverage Δ

lnbits/extensions/events/views_api.py
34.06% <ø> (ø)

lnbits/extensions/offlineshop/crud.py
36.84% <0.00%> (ø)

lnbits/extensions/offlineshop/models.py
52.22% <55.55%> (-0.22%)
:arrow_down:

lnbits/extensions/offlineshop/views_api.py
56.45% <60.00%> (-0.45%)
:arrow_down:

lnbits/extensions/offlineshop/migrations.py
100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


[flutter_releases] Roll Engine from 4df9cf27052b to 79152137a94c (8 revisions) (#102551)

This moves the roll forward by 1 commit to include impeller artifacts

Merging with pending checks as this is actually to fast forward the branch to the next commit


[RESOLVED] Interface eth0(): High error rate (>2 for 5m)

Problem started at 11:51:29 on 2023.05.31
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Operational data: errors in: 3, errors out: 0
Original problem ID: 23005
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23483&eventid=23005

Problem has been resolved in 6m 0s at 11:57:29 on 2023.05.31
Problem name: Interface eth0(): High error rate (>2 for 5m)
Host: S100-Primario
Severity: Warning
Original problem ID: 23005


aegisub: 3.2.2 -> <IP_ADDRESS>20513

Description of changes
This also is a switch to wangqr's fork.
This fork is currently used by OpenSUSE, Fedora, Solus, and Void Linux. https://repology.org/project/aegisub/versions
The latest git is used as there hasn't been a release of this fork in two years.
https://github.com/wangqr/aegisub
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Why the cryptic version number?

Is there anything holding this back from being merged?

Nothing to be honest. I was waiting for ofborg, but I forgot completely.

No problem. Thanks :)


Update the number of contributors

The data regarding the number of contributors is outdated. Update the number of contributors on the homepage
Screenshot

If we fix #219 this should be solved aswell.

Done :)


SERIOUS, issues with CORS and OPTIONS calls

Coming from go-chi I was using this code:
func main() {
	r := chi.NewRouter()

	r.Use(newCorsMiddleware())

	r.Get("/", myHandler)
	r.Post("/", myHandler)

	http.ListenAndServe(":3000", r)
}

func newCorsMiddleware(corsOriginList []string) func(h http.Handler) http.Handler {
	return func(next http.Handler) http.Handler {
		return cors.New(cors.Options{
			AllowedOrigins:   corsOriginList,
			AllowCredentials: true,
		}).Handler(next)
	}
}

When I use it from browser (with a fetch method in javascript) and an OPTIONS call starts it works, I get 204 No Content and all the right Access-Control-Allow-..... correctly.
With the same code but bunrouter instead of go-chi things are different:
func main() {
	r := bunrouter.New(bunrouter.WithMiddleware(newCorsMiddleware(corsOriginList)))

	router.NewGroup("/",
		bunrouter.WithGroup(func(group *bunrouter.Group) {
			group.GET("", myHandler)
			group.POST("", myHandler)
			//group.OPTIONS("", myHandler)
		}),
	)

	http.ListenAndServe(":3000", r)
}

func newCorsMiddleware(corsOriginList []string) func(h http.Handler) http.Handler {
	return func(next http.Handler) http.Handler {
		return cors.New(cors.Options{
			AllowedOrigins:   corsOriginList,
			AllowCredentials: true,
		}).Handler(next)
	}
}

During the OPTIONS call I get the 405 Method Not Allowed but all the right Access-Control-Allow-..... correctly.
In go-chi I don't need to use router.Options() because this is a problem that https://github.com/rs/cors handles, not me.
I think something is broken with bunrouter in this case, infact if I add a group.OPTIONS("", myHandler) the call works, but obviously this is wrong because I'm not directly handling OPTIONS calls.

Thanks for the report. This should be fixed in v1.0.5 - see the updated CORS example

Something has definitely changed after the fix and in fact it works for all API endpoints. But there is a new problem.
In one case instead of receiving 2xx code status, I am receiving 301 and consequently this error:
Access to fetch at 'http://localhost:3000/login?flow=8106fa49-72bc-4365-b85f-5f3fa05df1c1' from origin 'http://localhost:4000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

Request URL: http://localhost:3000/login?flow=8106fa49-72bc-4365-b85f-5f3fa05df1c1
Request Method: OPTIONS
Status Code: 301
Referrer Policy: strict-origin-when-cross-origin
Content-Length: 0
Date: Mon, 08 Nov 2021 14:35:13 GMT
Location: /login/?flow=8106fa49-72bc-4365-b85f-5f3fa05df1c1
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7
Access-Control-Request-Headers: content-type
Access-Control-Request-Method: POST
Connection: keep-alive
Host: localhost:3000
Origin: http://localhost:4000
Referer: http://localhost:4000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

This is not happening with the same code and go-chi.

I think the problem is here: https://github.com/uptrace/bunrouter/blob/b621373e5ed07d76ec548becf02df1add9253c0e/router.go#L125-L135

Please re-open this issue, @vmihailenco.

That can happen if you've defined the route with a slash at the end: /login/ instead of /login

Nope, I'm using the same code as with go-chi.

With go-chi:

router.Group(func(r chi.Router) {
	r.Get("/login/*", loginServerReverseProxy)
	r.Post("/login/*", loginServerReverseProxy)
})

With bunrouter:

router.NewGroup("/login/*path",
	bunrouter.WithGroup(func(group *bunrouter.Group) {
		group.GET("", loginServerReverseProxy)
		group.POST("", loginServerReverseProxy)
	}),
)

Well, that's exactly a route with a slash at the end: /login/ + whatever. Bun correctly redirects /login to /login/. This is documented at https://bunrouter.uptrace.dev/guide/getting-started.html#routing-rules .
You need to add another route /login if you want it to work.

Oh, I'm really having a hard time understanding what's going on right now.

I need to handle that proxy on that route. How to do that? With go-chi that code was enough. Why bunrouter needs to redirect /login to `/login/? And Why do I need another route?

That is how it works. Example from https://bunrouter.uptrace.dev/guide/getting-started.html#routing-rules
Route: /static/*path

  /static          redirect to /static/
  /static/         match
  /static/foo      match
  /static/foo-bar  match
  /static/foo/bar  match

I will check what other routers do tomorrow, but current behavior is consistent with other routing rules.

Adding the other route as you said it works but I think this is a strange code to have in router:
I need to handle paths like these:

GET http://localhost:3000/login/browser
POST http://localhost:3000/login?flow=dff612d2-4d90-4fdf-bf71-973fa49a36c2

router.NewGroup("/login/*path",
	bunrouter.WithGroup(func(group *bunrouter.Group) {
		group.GET("", loginServerReverseProxy)
		//group.POST("", loginServerReverseProxy)
	}),
)

router.NewGroup("/login/",
	bunrouter.WithGroup(func(group *bunrouter.Group) {
		//group.GET("", loginServerReverseProxy)
		group.POST("", loginServerReverseProxy)
	}),
)

I will check what other routers do tomorrow

With go-chi I don't need other routes to handle this - very frequent - behavior.

I've just checked and httprouter has the same behavior. And it can be useful if you want to handle /login and /login/*foo separately.
You can rewrite your example like this:
router.NewGroup("/login",
	bunrouter.WithGroup(func(group *bunrouter.Group) {
                group.GET("/*user", loginServerReverseProxy)
		group.POST("", loginServerReverseProxy)
	}),
)

Ok. I don't know, I still have doubts about this behavior different from go-chi. But maybe I just have to get used to it. I close for now, if I need an opinion again I will disturb you. You are really kind. Thank you so much!

@vm sorry to bother you again on this.
I don't know how to write these routes:
router.NewGroup("/upload",
  bunrouter.WithMiddleware(authMiddleware),
  bunrouter.WithGroup(func(group *bunrouter.Group) {
    group.GET("/presign/*options", signerHandler())
    if config.uploadEnabled {
      group.POST("/up", uploadHandler())
    }
  }),
)

Using a GET for http://localhost:3000/upload/presign?user=ok it gives a 301 status code.
Why?

Please provide a full example that reproduces the problem. /upload/presign/?user=ok should work and I have similar code that works fine.

Yeah. Now I tried from Postman and it works. But from my javascript APP it doesn't.
If I use GET http://localhost:3000/upload/presign it works.
If I use GET http://localhost:3000/upload/presign?user=ok it doesn't.

I get
Request URL: http://localhost:3000/upload/presign?user=ok
Request Method: GET
Status Code: 301
Referrer Policy: strict-origin-when-cross-origin
Content-Length: 70
Content-Type: text/html; charset=utf-8
Date: Mon, 06 Dec 2021 12:16:36 GMT
Location: /upload/presign/?user=ok

CORS is working good for all the routes and within my JS app as well. No changes there.
Form where is coming that 301?

I'm using this JS code:
await fetch(`http://localhost:3000/upload/presign?user=ok`)

and this works instead:
await fetch(`http://localhost:3000/upload/presign`)

I also tried this too without success:
await fetch(`http://localhost:3000/upload/presign/?user=ok`)

http://localhost:3000/upload/presign redirects to http://localhost:3000/upload/presign/ probably loosing query args. You should only use the route with the slash in the end.
You can try curl to check what Go returns:
curl -v http://localhost:3000/upload/presign/?user=ok

With curl it works! Why?

With curl it works with and without slash at the end. With JS not! Why?

I don't know what I did (but really nothing) and now it works. I do not understand. Sorry to bother, really.


control click not working on LDPlayer?

i am trying out with this piece of code
autoit.control_click('LDPlayer(64)', '[CLASS:subWin; INSTANCE:1]', button='left', x=87, y=820)
when i ran it, no errors found but is not clicking at the coords. I am not sure what is happening since no error?

I am no techie, but posting the solution that worked for me. Hoping it will work for others too.
My environment:
Python Version: 3.12
PyAutoIt Version: 0.6.5
Solution: Copy the AutoItX3.dll and AutoItX3_x64.dll from Autoit Install Directory (v<IP_ADDRESS>)\AutoItX to Python's autoit Install directory\lib


Support: How to solve problems from a specific weekly contest using CLI?

Problem Summary

Leetcode has weekly contests. I normally like to solve one of the contests every week(not necessarily the same week's or during a contest.  From my understanding of CLI we have support for all problems on leetcode grouped by difficulty. I was wondering if there is support for problems grouped by weekly contest number for example.
How to reproduce

NA
Environment

leetcode-cli version:

OS version:
Node version:
Npm version:

No, there isn't any support for it, but it can be implemented, as the leetcode api for weekly contest is open and available as json at https://leetcode.com/contest/api/info/weekly-contest-150/.
Can try it myself during December or later if no one takes initiative by then.
Thanks to @skygragon for such an amazing tool.

Thanks @ketankr9! I was not aware of open API or where to find the list of available endpoints. I'll give this a shot as well before then if i'm able to find some time


ecto_ch vs ch high performance diff

defmodule TimeDiff do
  defp get_system_time() do
    :os.system_time(:millisecond)
  end

  defp calculate_time_diff(start_time, end_time) do
    end_time - start_time
  end

  def check_time_diff(fun) do
    start_time = get_system_time()

    result = fun.()

    end_time = get_system_time()

    diff_in_ms = calculate_time_diff(end_time, start_time)
    IO.puts("Time difference: #{diff_in_ms} milliseconds")

    {result, diff_in_ms}
  end
end

defaults = [
  scheme: "placeholder",
  hostname: "placeholder",
  port: 8123,
  database: "placeholder",
  username: "placeholder",
  password: "placeholder",
  settings: [],
  pool_size: 1,
  timeout: :timer.seconds(60)
]

{:ok, pid} = Ch.start_link(defaults)

{sql, params} = {"SELECT p0.\"id\",p0.\"attributes\",p0.\"server_time\",p0.\"device_time\",p0.\"fix_time\",p0.\"latitude\",p0.\"longitude\",p0.\"accuracy\",p0.\"altitude\",p0.\"speed\",p0.\"course\",p0.\"valid\",p0.\"created_at\",p0.\"updated_at\",p0.\"address\",p0.\"weight\",p0.\"source\",p0.\"trust_level\",p0.\"device_id\",p0.\"gadget_id\",p0.\"organization_id\",p0.\"driver_id\",p0.\"vehicle_id\" FROM \"positions_replicated\" AS p0 WHERE (p0.\"vehicle_id\" = {$0:String}) AND ((p0.\"fix_time\" >= {$1:DateTime}) AND (p0.\"fix_time\" <= {$2:DateTime})) AND ((p0.\"trust_level\" = 100) AND (p0.\"valid\" = 1)) ORDER BY p0.\"fix_time\" DESC",
 ["fa8a3280-1fa1-4c90-bfe4-51d55a93294f", ~N[2023-07-01 16:20:43],
   ~N[2023-08-03 15:59:13]]}

# 40k rows y returns ~80000 ms
{x, y} = TimeDiff.check_time_diff(fn -> Ch.query(pid, sql, params, timeout: 240_000) end)

while
def list_positions(vehicle_id, start_at, end_at) do
  PositionReplicated
  |> where([p], p.vehicle_id == ^vehicle_id)
  |> where([p], p.fix_time >= ^start_at and p.fix_time <= ^end_at)
  |> where([p], p.trust_level == 100 and p.valid == 1)
  |> order_by([p], desc: p.fix_time)
  |> RepoClickhouse.all(timeout: 120_000)
end

# for 40k rows y returns  ~119800 ms or exceeds the timeout
{x, y} = TimeDiff.check_time_diff(fn ->  Hermes.Positions.list_vehicle_position("fa8a3280-1fa1-4c90-bfe4-51d55a93294f", ~N[2023-07-01 16:20:43], ~N[2023-08-03 15:59:13]) end)

Interesting fact: if I remove the order by the performance improves significantly.

For example, the last approach without order by ran in 26 sconds :thinking:

Ecto does some postprocessing which likely zccounts for that diff.


Add 'skip to navigation' links at the top of the page

Add 'skip to navigation' links at the top of the page to improve accessibility.

Assigning to @bp323 for review

Coverage remained the same at 100.0% when pulling d8a85a559bfa2c78b0e67ab3406eebdf740acae7 on Coenego:issue-176-skip-to-navigation into f66ae6d6eaef8af52b201f1f9607d1f15bc1d67d on CUL-DigitalServices:master.

I'm going to put this on hold as there are multiple problems identified with the approach.

Focus is not actually set to the correct element, this seems to be an identified browser quirk according to WebAIM.
The hash is used for storing organisational unit IDs, this conflicts with the approach taken here.

I suggest closing and revisiting when we have more time to implement properly.