[L2-UX] Refactor network config getters

What it solves
Resolves #2513
How this PR fixes it
It adds a refactor on the necessary places to be able to handle the chainId internally and hot reloading the necessary components.
To handle the different gateway transactions and avoid mixing them, we had to add chainId as parameter for the state, so now the transactions will be stored separately for each instance of a safe also depending on the network.
gatewayTransactions -> [chainId] -> [safeAddress] -> [history|queue]
In the safe list when unifiying the localStorage between all networks same pattern could apply. This is still to be done. In this PR we just flush the safe list when changing chain Id and load again the expected ones from the local storage
safes -> [chainId] _> [safeAddress] -> safeInformation
Updates onboard to load dynamically. By default Onboard create an unique instance and is stored immutable. We are now wrapping on a function that is able to initialize Onboard again whenever chainId changes. We are using a singleton pattern in order to reuse the Onboard instance while we are working in the same network
How to test it

Open the app
By default app will load using the chain selected on build time (old method)
3. Make sure that Redux Dev Tools extension is installed in your browser
4. Use Redux Dev Tools to dispatch the following event. You can dispatch using the icon between the Pin and the Chronometer. Just copy and paste there this content including brackets and click dispatch. You could play around changing the payload to the desired chainId (1 - Mainnet, 4 - Rinkeby, 100 - xDai...)
{
type: 'config/setChainId',
payload: '1'
}
Use the network switcher button to change network

The NetworkSwitcher button will have the NEW behavior in all environments EXCEPT tagged builds (production deployments) and release builds (for release regression)

(have not finished yet)
What is working fine:
The switching network works fine
The wallet pops up when detects the network has changed
The apps seems to be showing only for the selected network
The safes in the sidebar are from the network you are currently on
Addresses are being validating depending on the network; load safe form for example won't accept the address of a safe from a different network from the one selected
The selected currency used for assets is remembered through network changing
Issues:
-Trying to connect the wallet while MM is configured for a different network than the one selected in the dropdown shows this error in the console constantly until  you switch networks

-Whatever you load through the "Load safe" form is saved in the address book with the chainID of the network you have in the URL (rinkeby in my case) , no matter what chain you are using
-AB still shows all the entries from rinkeby since I'm using that build, so AB is just taking in account the network in the URL, not the one selected
Notes:
-Google analytics still tracks the URL, so I always going to be in rinkeby (in this case) no matter the network. I think this is expected on this PR.
-Since I'm currently using the rinkeby build, the system remembers my last safe used in rinkeby, even if the last safe I visited was one in another network. I think this feature only takes in account the URL and not the network.

Google Analytics is currently configured with a separate tracking ID per subdomain, so nothing will change there for now. It will be always initialized with the original chain params.
Once we move to a single domain, we'll need to use a single GA config. Created #2703 for this.

The issues of the AB were solved:
Entries saved in a specific network will be saved with that ChainID. Same happens with safes created/loaded in that specific network
Also the AB only shows entries that match the current Network give their chainID
Issues:
The errors in the console when the network don't match is still happening. Here is a gif showing the steps to see it

Note:
There is an old issue in AB that wasn't that big of a deal since every network had their own storage, but now is more present with this feature that unifies the networks:
If you want to add an entry to the AB and that entry already exist in another network, then the form to add the entry will tell you that the entry already exist.
Example: you have ADDRESS1 in rinkeby, so if you go to BSC then in the AB you wont see ADDRESS1, but if you try to add it, the form will tell you that the address already exist.
Should we tackle this issue here? or Should I create a new ticket?

Trying to sign a tx in any other network different from the one in the URL will ask me to change to that network:

If you want to add an entry to the AB and that entry already exist in another network, then the form to add the entry will tell you that the entry already exist.
Should we tackle this issue here? or Should I create a new ticket?

I think we should fix it here. 👍
I'll deal with the bugs, thank you Franco. Just to recap:

[ ] Errors in the console when the network don't match
[ ] Adding the same address to AB on different network
[ ] Signing a tx after switching the network will ask to switch the wallet

Adding the same address to AB on a different network
Solved.

Errors in the console when the network doesn't match
I still having issues. Same as the one in the gif above
Note that in the gif I'm in Volta, and I'm changing to EWC, but the popUp says that is trying to switch to rinkeby, so it is still taking the network in the URL

Signing a tx after switching the network will ask to switch the wallet
This is still giving me issues.
This snapshot is me trying to add a new owner to a safe in XDai. The system keeps asking me to change to the rinkeby network, I assume because I'm in the rinkeby build of this PR

If you are not able to reproduce these let me know and we can do a call

The signatures are working fine now.

The issue with the error in the console is still there. a new gif:
The steps are

Go to the volta network and change your network in MM

Click on EWC, the change to EWC button is displayed.

Click the button, the MM popUp shows up

Click the button in the dropdown again

You will see the error in the console and the popUp says that you are changing to Rinkeby network.

Oh, gotcha. Need to click on the switch button repeatedly. 👌 Will fix.


Hosted httpbin doesn't drip

same as https://github.com/kennethreitz/httpbin/issues/252
Tested with curl and OkHttp
curl -v 'https://httpbin.org/drip?numbytes=5000&code=200&duration=10&delay=2'

Heroku has a proxy that lives between you and httpbin. Can you test locally to see if it's dripping or not? That will help narrow down whether this is a PaaS problem or actually a bug in httpbin

Works locally - although the curl command I gave doesn't show it.
with OkHttp Progress Example https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/Progress.java
1
500
false
0% done
23
500
false
4% done
24
500
false
4% done
25
500
false
5% done
26
500
false
5% done
27
500
false
5% done
28
500
false
5% done

Right, since this relates to the version hosted by Heroku, there's literally nothing this project can do. As such, there's no bug to fix and this issue is invalid.

Useful alternative host supporting HTTP/2 https://nghttp2.org/httpbin/

https://github.com/postmanlabs/httpbin/issues/252
https://github.com/postmanlabs/httpbin/issues/348
https://github.com/postmanlabs/httpbin/issues/417
https://github.com/postmanlabs/httpbin/issues/541


bpf: daemon: Use bpftool for kernel parameter checks

bpftool and libbpf have feature checks, which have similar goals to BPF
feature checks in Cilium. This commits makes use of bpftool checks for
kernel parameters, but it also introduces the general use of bpftool
feature checks, so in future all of them can be used.
Ref: #7830
Signed-off-by: Michal Rostecki<EMAIL_ADDRESS>

This change is

test-me-please

Coverage decreased (-0.08%) to 41.406% when pulling 6f40070aae25ec856e3d5d8178e038ee810ab6f0 on mrostecki:bpftool-checks into dd7c78d67a0ea4dfcc018942814c668afea15b5d on cilium:master.

test-me-please

Is bpftool is readily available in all distos ? Quick search gives result only for fedora.

@nirmoy

Is bpftool readily available in all distos ? Quick search gives result only for fedora.

No, but I'm going to package it in openSUSE and include you in review, don't worry. ;) We need to add bpftool to the kernel package spec in https://github.com/openSUSE/kernel-source.
@joestringer

I think we should be able to get rid of probe_run_ll() as well?

Yes. And if there are some simple probe checks which are in Cilium, but not in bpftool, let's maybe send them as patches to bpftool? Porting all *.t files we have to libbpf probes should be quite easy.

@nirmoy I thought about your question once again and I realized that maybe building bpftool in the same spec as the kernel is not the best idea... We need to be able to ship bpftool for already existing versions of SLE and openSUSE Leap without depending on the newest kernel.
The good thing is that libbpf and bpftool don't really depend on the kernel itself, they are just developed together with the kernel. But running libbpf and bpftool from the newest tag (or even from net-next or bpf-next) should be possible on systems which have i.e. kernel 4.18.x.
There is already a standalone build for libbpf: https://github.com/libbpf/libbpf
Maybe it would be a good idea to have a similar repo, for example libbpf/bpftool? @borkmann, what do you think, can we do that?

test-me-please

Is bpftool readily available in all distos ? Quick search gives result only for fedora.

Perhaps not, but we already have a dependency on this and in most cases, Cilium is distributed/deployed as a container with bpftool already available. We should make sure this is documented.

@nirmoy I thought about your question once again and I realized that maybe building bpftool in the same spec as the kernel is not the best idea... We need to be able to ship bpftool for already existing versions of SLE and openSUSE Leap without depending on the newest kernel.
The good thing is that libbpf and bpftool don't really depend on the kernel itself, they are just developed together with the kernel. But running libbpf and bpftool from the newest tag (or even from net-next or bpf-next) should be possible on systems which have i.e. kernel 4.18.x.
There is already a standalone build for libbpf: https://github.com/libbpf/libbpf
Maybe it would be a good idea to have a similar repo, for example libbpf/bpftool? @borkmann, what do you think, can we do that?

I think best might be to have a package that builds bpftool from e.g. net or net-next kernel (which does not rebase its tree anyway). That way you always have the latest features available. We do that in our container image as well. I don't think extra libbpf/bpftool is needed here since all is self-contained in the kernel. We created the libbpf/libbpf for two reasons: 1) to have a pure BSD compatible libbpf lib available and 2) to not having to clone the whole tree if one only wants to build libbpf as a developer. For packaging bpftool these concerns shouldn't matter.

@borkmann Great, thanks for your advice! We will most probably build bpftool package from net-next then.

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

I realized that the way I used bpftool here is completely wrong. bpftool has a functionality of generating feature headers file which can be used directly in BPF programs.


add multicore 4.12.0 build images for effects and domains

Waiting for https://github.com/ocurrent/ocaml-version/pull/32 and https://github.com/ocurrent/ocaml-version/pull/33 to be combined and merged.

pushed to live


Bug: Postgres Exception during reset or similar errors

Summary
We're seeing the following non-user impacting error sporadically for /healthcheck requests:
[ERROR]	2022-08-18T01:10:21.366Z	dbc40eba-fde5-4cef-8b02-a52cab997d48	Exception during reset or similar
Traceback (most recent call last):
    File "/pymodules/sqlalchemy/pool/base.py", line 739, in _finalize_fairy
    fairy._reset(pool)
    File "/pymodules/sqlalchemy/pool/base.py", line 988, in _reset
    pool._dialect.do_rollback(self)
    File "/pymodules/sqlalchemy/engine/default.py", line 682, in do_rollback
    dbapi_connection.rollback()
    psycopg2.OperationalError: SSL connection has been closed unexpectedly

It's possible that it's related to this:
https://stackoverflow.com/questions/61361895/psycopg2-errors-idleintransactionsessiontimeout-terminating-connection-due-to-i

The root cause is that you have database sessions that have started a transaction with BEGIN but are inactive longer than the PostgreSQL parameter idle_in_transaction_session_timeout

Possible fix
Make sure the DB session is always closed:
session = init_session()
    try:
        ... # business logic with other calls and raise-s
        session.commit() # optional
    finally:
        session.close()

Starting to see this error crop up again occasionally, so more investigation is needed.

Another possible fix, this time around keepalive args:
https://stackoverflow.com/a/67421581


Does this mod supports the content from Space Age DLC?

Does this mod support displaying new content from Space Age DLC? I noticed it now supports Factorio 2.0, but the example shown on the website only displays Nauvis. This led me to wonder if space platformes/planets support is available.

Afaik, it should work. Mapshot already exports (by default) all surfaces, and that should include the platforms/planets. (haven't tested it as I don't have such a save handy though).


Problem with using Solana Mainnet, might be about mapping key

Problem Description
I'm trying to read all price from solana by each time I call the function. When I set solana_network with devnet, it was working perfect. However, when I try to use mainet, testnet, or pythnet, it can't work anymore.
Calling method
solana_network="mainnet"
use_program = True

async def SolanaPythClientPriceFunction():
    async with PythClient(
        first_mapping_account_key=get_key(solana_network, "mapping"),
        program_key=get_key(solana_network, "program") if use_program else None,
    ) as c:
        await c.refresh_all_prices()

Debug Console Output
.....venv\Lib\site-packages\pythclient\pythclient.py", line 185, in _refresh_mapping_accounts
    raise exceptions.MissingAccountException(f"need account {key} but missing in getProgramAccount response")
pythclient.exceptions.MissingAccountException: need account AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J but missing in getProgramAccount response

I checked the variables with debugger.
https://github.com/pyth-network/pyth-client-py/blob/bdd32b412beb0816fedd81001ae98581a3f3d37f/pythclient/pythclient.py#L174-L193
Until L180, everything works fine. Both key was correctly assigned values. But then, at L183,
m_data = account_json.get(AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J )
it reads empty data.
Is this an error with mapping key? ( I checked with Pyth Network Website, the key is as same as here) Or with the method that I calling it?

Hi thanks for reaching out. get_key allows you to get the right mapping address for each network.
AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J is the right address for mainnet.
I think perhaps the issue is the getProgramAccount response being empty? Some RPC nodes don't allow you to call this method. Can you check that the return value of getProgramAccount looks ok?

Hi thanks for reaching out. get_key allows you to get the right mapping address for each network. AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J is the right address for mainnet.
I think perhaps the issue is the getProgramAccount response being empty? Some RPC nodes don't allow you to call this method. Can you check that the return value of getProgramAccount looks ok?

Thank you for helping! I put a breakpoint for solana.py L267 but it didn't reach there before broken...
for pythclient.py L179:
mapping_accounts: List[PythMappingAccount] = []
It is empty.
Where exactly shall I look into?

I think probably the best way to proceed here is if you can provide a reproducible code example that causes the error, for example as a Github repository.

I think probably the best way to proceed here is if you can provide a reproducible code example that causes the error, for example as a Github repository.

Sorry it took me some time to build a clean and simple repo. Here is it:
https://github.com/Steinadler177/PythClientTest

The code hardcodes to using DEVNET solana http endpoint. you need to provide a correct mainnet/testnet endpoint to get into about mainnet accounts, this would solve the issue


🐛 [BUG]: VueFlow doesn't make connections in v.1.22.3

Is there an existing issue for this?

[X] I have searched the existing issues and this is a new bug.

Current Behavior
I have updated vueflow/core from 1.15.2 to 1.22.3, and at 1.22.3 connections aren't created :(
Vueflow doesn't emit "connect" event also. "connectStart" and "connectEnd" are still avalible. I'm using "isValidTargetPos" to validate connection, and this function doesn't trigger.
If I change vueflow/core version to 1.15.2 everything is fine, without any other changes. Perhaps the problem occurred in earlier versions.
Expected Behavior
Vueflow should create connections and trigger validation function, if it exist
Steps To Reproduce

Update vueflow/core to 1.22.3
Try to create connection :)

Relevant log output
No response
Anything else?
No response

You'll have to provide a proper reproduction for this issue as creating connections does work (as seen in any example on the docs + I use Vue Flow in a project as well and have 0 issues creating edges).
Here's a template that you can use.

I found out that my problem was in 1.17.5 version, cause behaviour of handle component was changed (attr connectable).
Thank you for fast feedback.


[#112135729] README: Restrict Travis CI badge to master

At the moment it lists the last build, which may be a development branch
that is failing. We only really care about the stability of master.

Looks good.


pingIPAddress not working

I tried to use pingIPAddress, this is my config:
{                     "name": "Fernseher",                     "type": "switch",                     "pingIPAddress": "<IP_ADDRESS>",             "data":{                 "on":"2600...",                 "off":"2600..."           }
But homebridge stopped and says:
if (config.pingIPAddress) checkStateWithPing()                               ^ ReferenceError: checkStateWithPing is not defined

Still the same after update
/usr/lib/node_modules/homebridge-broadlink-rm/accessories/switch.js:16     if (config.pingIPAddress) self.checkStateWithPing()                                    ^ TypeError: self.checkStateWithPing is not a function

same to  me!

please release merge request


Impossible to login

Hi,
When I enter my email, password (40 character length, generated from LastPass) and correct code from Authy, it tells me, "please enter a valid login & password" even though I entered correct credentials and code. When I enter credentials directly to browser it is good.
Password match, no character is trimmed, same behaviour when I enter username instead of email, I let LastPass to directly enter my password then I copy and paste, nothing helped.
Every advice is appreciate. Thank you

This is fixed in master, the last version GitHub had on the play store
won't work with 2-factor authentication anymore.
On Fri, Jul 24, 2015 at 5:08 PM Facedown<EMAIL_ADDRESS>wrote:

Hi,
When I enter my email, password (40 character length, generated from
LastPass) and correct code from Authy, it tells me, "please enter a valid
login & password" even though I entered correct credentials and code. When
I enter credentials directly to browser it is good.
Password match, no character is trimmed, same behaviour when I enter
username instead of email, I let LastPass to directly enter my password
then I copy and paste, nothing helped.
Every advice is appreciate. Thank you
—
Reply to this email directly or view it on GitHub
https://github.com/forkhubs/android/issues/847.

Thank you and sorry for unnecessary issue.

No worries!
On Fri, Jul 24, 2015 at 5:14 PM Facedown<EMAIL_ADDRESS>wrote:

Thank you and sorry for unnecessary issue.
—
Reply to this email directly or view it on GitHub
https://github.com/forkhubs/android/issues/847#issuecomment-124773977.


HTTPS Imgur Links

I noticed all the imgur links provided use HTTP. Would there be any harm in having them default to HTTPS? Encrypted pone is best pone?
Great bot by the way!

Sorry for taking to long to react to this. I barely look at this Github account at the moment.
Should be fixed (along with all other instances that still used http instead of https) by c3fed6be2a4e2de14a1b92941f85601be82631b6.

Cool, thanks.
On May 11, 2017 10:28:43 AM PDT, meditonsin<EMAIL_ADDRESS>wrote:

Sorry for taking to long to react to this. I barely look at this Github
account at the moment.
Should be fixed (along with all other instances that still used http
instead of https) by c3fed6be2a4e2de14a1b92941f85601be82631b6.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
https://github.com/meditonsin/NightMirrorMoon/issues/3#issuecomment-300860100


#284: Add support for command EXPIRETIME

PR to address: Support for command EXPIRETIME
Link to issue

EXPIRETIME returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire
args should contain only 1 value, the key
Returns expiration Unix timestamp in seconds.
Returns -1 if the key exists but has no associated expiration time.
Returns -2 if the key does not exist.

Hi @raknay please pull the latest changes from master to pass the linter check

Thanks for addressing the reviews @raknay! Just had one small comment.

Nevermind, I fixed it while merging.

Thanks for adding this feature @raknay!


cannot install opencv

Command:
c:\vcpkg> .\vcpkg.exe install opencv
Produces error:
Contains invalid characters. Only alphanumeric lowercase ASCII characters and dashes are allowed
Other packages install without any error.

Please try running:
.\vcpkg.exe install opencv --debug

D:\vs2015\vcpkg-master>.\vcpkg.exe install opencv --debug
The following packages will be built and installed:

libjpeg-turbo:x86-windows
liblzma:x86-windows
libpng:x86-windows
opencv:x86-windows
tiff:x86-windows
zlib:x86-windows
Additional packages (*) will be installed to complete this operation.
Building package zlib:x86-windows...
[DEBUG] _wpopen("where.exe cmake 2>&1")
[DEBUG] _wpopen() returned 1
[DEBUG] _wpopen(""D:\vs2015\vcpkg-master\downloads\cmake-3.9.1-win32-x86\bin\cmake.exe" --version 2>&1")
[DEBUG] _wpopen() returned 0
[DEBUG] _wpopen("where.exe git 2>&1")
[DEBUG] _wpopen() returned 1
[DEBUG] _wpopen(""D:\vs2015\vcpkg-master\downloads\MinGit-2.14.1-32-bit\cmd\git.exe" --version 2>&1")
[DEBUG] _wpopen() returned 1
[DEBUG] _wpopen(""C:\Program Files\git\cmd\git.exe" --version 2>&1")
[DEBUG] _wpopen() returned 0
[DEBUG] _wpopen(""C:\Program Files (x86)\git\cmd\git.exe" --version 2>&1")
[DEBUG] _wpopen() returned 1
[DEBUG] _wpopen("powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& 'D:\vs2015\vcpkg-master\scripts\fetchDependency.ps1' -Dependency git}" 2>&1")
[DEBUG] _wpopen() returned 1
Launching powershell failed or was denied when trying to fetch git version 2.14.1.
(No sufficient installed version was found)
[DEBUG] ..\src\VcpkgPaths.cpp(95)

I managed to fix this issue by running the following commands:
git pull
./vcpkg update
.\bootstrap-vcpkg.bat
When I did a "vcpkg update" it told me to do a "git pull" but not the "bootstrap-vcpkg.bat". This should be added to the instructions for "vcpkg update after doing the git pull step."

Thanks for the suggestion!
In general, bootstrap-vcpkg.bat is not needed in every single git pull.
Instead, if we do an interesting change, we bump the version. We have added a warning that you need to rerun bootstrap-vcpkg.bat if the built vcpkg.exe does not match the version of the tree.
This should avoid such an issue in the future.


Can't see any .NET templates when creating a new project with VS 2022

With Visual Studio Community 2022 and aws-toolkit for VS 2022 vsersion1.40, there is no template for .NET project:

Alright, you need to install at least one work component like ASP.NET and Web Development to VS 2022

Alright, you need to install at least one work component like ASP.NET and Web Development to VS 2022

Actually just c# related providers are enough:


Extend (legacy)meta server configuration.

Support to override meta server URL through environment variables.

Codecov Report

Merging #1563 into master will decrease coverage by 7.53%.
The diff coverage is 50%.

@@             Coverage Diff              @@
##             master    #1563      +/-   ##
============================================
- Coverage      56.1%   48.57%   -7.54%
- Complexity     1060     1896     +836
============================================
  Files           191      393     +202
  Lines          5648    11495    +5847
  Branches        588     1198     +610
============================================
+ Hits           3169     5584    +2415
- Misses         2238     5477    +3239
- Partials        241      434     +193

Impacted Files
Coverage Δ
Complexity Δ

...pollo/core/internals/LegacyMetaServerProvider.java
73.91% <50%> (-26.09%)
6 <0> (ø)

...ework/apollo/portal/controller/ItemController.java
1.51% <0%> (ø)
1% <0%> (?)

...o/configservice/wrapper/DeferredResultWrapper.java
100% <0%> (ø)
12% <0%> (?)

...omponent/emailbuilder/GrayPublishEmailBuilder.java
11.53% <0%> (ø)
1% <0%> (?)

...k/apollo/portal/controller/FavoriteController.java
14.28% <0%> (ø)
1% <0%> (?)

...apollo/portal/entity/vo/AppRolesAssignedUsers.java
0% <0%> (ø)
0% <0%> (?)

...ponent/emailbuilder/NormalPublishEmailBuilder.java
20% <0%> (ø)
1% <0%> (?)

.../framework/apollo/portal/entity/vo/SystemInfo.java
0% <0%> (ø)
0% <0%> (?)

...rk/apollo/portal/service/NamespaceLockService.java
12.5% <0%> (ø)
1% <0%> (?)

...k/apollo/portal/spi/ctrip/CtripUserInfoHolder.java
0% <0%> (ø)
0% <0%> (?)

... and 193 more

Continue to review full report at Codecov.

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

Thanks!
Normally, we think system properties have higher priority than system environment properties, is it ok to adjust the logic?
Also, after adding system environment logic, the code looks a little complex, is it better to extract the get meta data logic as a standalone method?

ok,I'll do some refactoring.

Coverage remained the same at 52.353% when pulling a7fcbecdec389215ea9ad73db627e1cb2d425f41 on JaredTan95:master into c22ac5637432c3c557bd857314401a3983e704d2 on ctripcorp:master.

Looks good to me, would you please stash the commits to one commit?

https://github.com/ctripcorp/apollo/pull/1565


Clear notification from notif shade when long pressing chat on conversation details page

No content

Issue created by BlueBubbles Bot in the BlueBubbles commnity on behalf of @tneot01 in #requests.

Here is a screen recording of the issue
https://user-images.githubusercontent.com/53708281/124397728-a476d100-dcdf-11eb-9ddc-fd4eafed8813.mp4

Done on nullsafety branch


[Draft] Add otlp_logs test case

Description:
Add OTLP Logs test case

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Closing this PR.


Why is 'session' not defined?

Sometimes I get this error:
TypeError: Cannot read property 'session' of undefined
    at CookieHandler.exports.contain (C:\FOO\node_modules\plugapi\bin\src\cookie.js:35:12)
    at [object Object].PlugAPI.connect (C:\FOO\node_modules\plugapi\bin\src\client.js:1359:10)
    at WebSocket.messageHandler (C:\FOO\node_modules\plugapi\bin\src\client.js:899:13)
    at WebSocket.emit (events.js:129:20)
    at WebSocket.<anonymous> (C:\FOO\node_modules\plugapi\bin\src\client.js:691:17)
    at WebSocket.emit (events.js:110:17)
    at Receiver.ontext (C:\FOO\node_modules\plugapi\node_modules\ws\lib\WebSocket.js:798:10)
    at C:\FOO\node_modules\plugapi\node_modules\ws\lib\Receiver.js:473:18
    at Receiver.applyExtensions (C:\FOO\node_modules\plugapi\node_modules\ws\lib\Receiver.js:360:5)
    at C:\FOO\node_modules\plugapi\node_modules\ws\lib\Receiver.js:462:14

What does it mean? What is causing it? How can I avoid it?

It can be a lot of reasons why that happens.

Are you running that bot only once, I've had issues with my bot not shutting down properly and running it more than once causes the session is undefined?

Which plugAPI version are you running? It's recommended to run the latest version.

Try deleting the cookies.tmp file in the node_modules/plugapi folder, that's the cache file we uses to save session information.

Are you using the same account on the bot and the site?

I've seen this error sometimes when I accidentaly log in with the same account I'm using for the bot on plugDj. Some other times, happens randomly.
I'm using the latest version.
I'll try deleting that file.

That's why, you can't sign on the same account twice. The error just means you've signed in more than once either running the bot twice or accidentally signing in on the browser


Node Info Screen UI revamp

especially the URI list needs a good representation:

Verified this issue on dev app v2.0.70(437)


fix the instruction of the end to end demo.

What this PR does / why we need it:
Some nits:

The e2e demo may fail without linux-headers installed.
The Gstreamer command may fail if the camera-logs dir does not exist.

Special notes for your reviewer:
If applicable:

[x] this PR contains documentation
[ ] this PR contains unit tests
[ ] added code adheres to standard Rust formatting (cargo fmt)
[ ] code builds properly (cargo build)
[ ] code is free of common mistakes (cargo clippy)
[ ] all Akri tests succeed (cargo test)
[ ] inline documentation builds (cargo doc)
[ ] version has been updated appropriately (./version.sh)

Thank you for the fixes! Can you add the same updates to the respective parts to the raspPi demo?

Thank you for the fixes! Can you add the same updates to the respective parts to the raspPi demo?

Thank you for the fixes! Can you add the same updates to the respective parts of the raspPi demo?

The rspi demo doc is updated.

Thank you for the fixes! Can you add the same updates to the respective parts of the raspPi demo?

The rspi demo doc is updated.


Scope applies to existing roles as well

Please mention that if you add a Global Admin (or any other role) this will limit this person to only the scope (based on our experience 28/06/2022)
With a wrong dynamic query, you can lock everyone out.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 11702e8d-98ba-b314-13cf-4c27963dcafd
Version Independent ID: 9d2cb191-a0c7-abee-36ba-1f4079d357bd
Content: Administrative units in Azure Active Directory - Microsoft Entra
Content Source: articles/active-directory/roles/administrative-units.md
Service: active-directory
Sub-service: roles
GitHub Login: @rolyon
Microsoft Alias: rolyon

@Oppedijk
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

Hi @Oppedijk
Thanks for your feedback. I sent it to the team. They weren't completely sure about your comment.
Can you be more specific about the steps you followed and the issue you ran into so that they can try to reproduce?
thanks

Start with a user (in Department A) with several permanent Global Roles:

User Admin
Exchange Admin

Create Administrative unit

Add all users of Department A (including admin)
Add admin as eligible Teams Admin

Observe that now the admin cannot perform any actions on Global Level anymore (e.g. modify exchange distribution list)
Delete the Administrative unit
Observe that the user is no longer a member of the administrative unit
Observe that he still has no Exchange permissions to modify distribution list
Observe that he is still eligible as a Teams Admin on the Administrative unit when looking at PIM roles

Hi @Oppedijk
Thanks for the detailed steps. Here is the behavior we see. Can you try in your environment?
Start with user1 with the following permanent roles:

User Admin
Exchange Admin

Create a new administrative unit

Add user1 to administrative unit
Add user1 as eligible Teams Admin with administrative unit scope

Observe that user1 still has the following permanent roles:

User Admin
Exchange Admin

Observe that user1 is now eligible for the following role:

Teams Admin

Remove Teams Admin role assignment and delete administrative unit
(Before you delete an administrative unit, you should remove any role assignments)
Observe that user1 still has permanent User Admin and Exchange Admin roles
thanks

Hi @Oppedijk
Let us know if you see different behavior.
thanks

#please-close


Get error on windows  - 'rm' is not recognized as an internal or external command,

First of all I think this can be very helpful for someone how just want to start working with Lerna and TS, thank you for this project.
I kind of missing some full instruction to make it work... maybe I missed it...
anyway - whenever I run Lerna run build - I get this error "'rm' is not recognized as an internal or external command,"
What can i do?

Hey @zamirdan, rm was used as part of the clean scripts which run before building the packages. Since you're using Windows where rm is unavailable the script was throwing. I replaced the command with the rimraf package so if you pull in the latest master it should work now. Thanks for opening the issue!


GitHub Action to lint Python code with ruff

Ruff supports over 500 lint rules and can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing (in Rust) tens or hundreds of times faster than any individual tool.
The ruff Action uses minimal steps to run in ~5 seconds, rapidly providing intuitive GitHub Annotations to contributors.

:books: Documentation preview :books:: https://datasette--2056.org.readthedocs.build/en/2056/

https://github.com/simonw/datasette/actions/runs/4664796647/jobs/8300596121?pr=2056 it's pretty fast - that finished in 9s.

Here are the failures: https://github.com/simonw/datasette/actions/runs/4684460653/jobs/8300630794?pr=2056

Cool - and now https://github.com/simonw/datasette/pull/2056/files is showing me those inline annotations:

OK, I'm sold - this is a really neat improvement.
One thing to change in the PR: right now it runs pip install --user ruff on every commit, which hits PyPI to install the package.
I prefer to avoid hitting PyPI every time, so I like to use the GitHub Actions cache. My usual pattern for that looks like this:
https://github.com/simonw/datasette/blob/5890a20c374fb0812d88c9b0ef26a838bfa06c76/.github/workflows/test-pyodide.yml#L16-L21
Then a separate command that runs pip install ... will benefit from that cache.
Are you OK to make that change?

Ruff (written in Rust, not Python) is a 23MB executable so the time to download and pip install it dwarfs its runtime.
Let's run ruff with and without GitHub Actions pip cache to see the relative performance.
There are two great problems in computer science:

Naming things
Cache invalidation
Off-by-one errors

For 2., https://github.com/actions/setup-python#caching-packages-dependencies is vital reading.
Only exactly pinned requirements can be cached.  Currently in setup.py the only pinned dependencies are:

Sphinx==6.1.3
furo==2023.3.27
black==23.3.0
blacken-docs==1.13.0  # but unpinned elsewhere in setup.py

This means that there will be very few cache hits in the current actions.  See the link below to print out cache hits.
https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#cache-hit

PyPI uses Fastly's CDN to quickly serve content to end-users, allowing us to minimize our hosting infrastructure and obscure possible downtime.

https://pypi.org/sponsors

I would be shocked if Fastly does not have CDN nodes in the same datacenters where GitHub Actions run so GHA requests to download ruff probably never hit a PyPI server.

Status?


[docs] create video tutorials for the documentation

What is your Scenario?
Our documentation does not contain any video tutorials. Video content can be beneficial to our user base.
What are you suggesting?
Create video content
What alternatives have you considered?
No response
Additional context
No response

See also: https://github.com/DevExpress/testcafe/issues/7191

We don't plan to address this issue in the near future. Feel free to reopen the ticket if the issue is important for you.


Flutter web - DB 81 DE BB instead of icon

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
This is not reproducible and I can't tell you how to reproduce the problem, but I hope that with the details described below you will be able to determine what is causing the problem.
Sometimes strange images with text "DB 81" and "DE BB" are observed instead of icons:

More details:

it happen on the deployed web page only. I have never observed this in debug mode
it only happens sometimes and only on some browsers, i.e. one user observed an error in Firefox, but in Chrome it was OK, and at the same time on the other computer it was also OK in Firefox
it concerns only specific icons (Icons.signpost_outlined and Icons.calendar_month). Only these icons are sometimes displayed incorrectly. After replacing Icons.signpost_outlined with Icons.timeline, I did not observe the error on the second one.

Expected results
Below is a view of how the mentioned icons are displayed correctly:

Actual results

Code sample
Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[!] Flutter (Channel unknown, 3.3.8, on Ubuntu 22.04.3 LTS 6.2.0-37-generic, locale en_US.UTF-8)
    ! Flutter version 3.3.8 on channel unknown at /home/adams/flutter-stable
    ! Upstream repository unknown
    • Framework revision 52b3dc25f6 (1 year, 1 month ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /home/adams/Android/Sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /home/adams/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2021.2)
    • Android Studio at /home/adams/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code
    • VS Code at /snap/code/current
    • Flutter extension version 3.78.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 22.04.3 LTS 6.2.0-37-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 120.0.6099.109

[✓] HTTP Host Availability
    • All required HTTP hosts are available

Hi @aseremak
I also can't reproduce this issue with those two icons.

it only happens sometimes and only on some browsers, i.e. one user observed an error in Firefox, but in Chrome it was OK, and at the same time on the other computer it was also OK in Firefox

It could only occur on a specific browser version. Please ask your user for this information if possible.
Also, I see you are using an old Flutter version. The latest stable is 3.16.4, please try upgrading to this version and sending a test app to your user to see if the issue persists or not.

Hi @huycozy

It could only occur on a specific browser version. Please ask your user for this information if possible.

I will ask this user and others who have the same problem and I will come back with the data in a few days.

Also, I see you are using an old Flutter version. The latest stable is 3.16.4, please try upgrading to this version and sending a test app to your user to see if the issue persists or not.

I have to use this version because subsequent versions have a crucial issue https://github.com/flutter/flutter/issues/129182

I have to use this version because subsequent versions have a crucial issue https://github.com/flutter/flutter/issues/129182

It would be helpful if you could check this issue temporarily to see if it's fixed on a new Flutter version or not.


Logic error in ItemsRepeater?

Describe the bug
I'm currently porting ItemsRepeater to Avalonia (https://github.com/AvaloniaUI/Avalonia/pull/2603) and we were occasionally getting an IndexOutOfRangeException. I'm not 100% sure this is a problem in the WinUI code or if I've messed something up porting it to C#, but I thought I'd open this issue to check with you.
Stacktrace:
System.ArgumentOutOfRangeException
  HResult=0x80131502
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Arg_ParamName_Name
  Source=System.Private.CoreLib
  StackTrace:
   at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Avalonia.Layout.ElementManager.GetLayoutBoundsForDataIndex(Int32 dataIndex) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\ElementManager.cs:line 175
   at Avalonia.Layout.FlowLayoutAlgorithm.RaiseLineArranged() in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\FlowLayoutAlgorithm.cs:line 518
   at Avalonia.Layout.FlowLayoutAlgorithm.Measure(Size availableSize, VirtualizingLayoutContext context, Boolean isWrapping, Double minItemSpacing, Double lineSpacing, ScrollOrientation orientation, String layoutId) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\FlowLayoutAlgorithm.cs:line 107
   at Avalonia.Layout.UniformGridLayout.MeasureOverride(VirtualizingLayoutContext context, Size availableSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\UniformGridLayout.cs:line 403
   at Avalonia.Layout.VirtualizingLayout.Measure(LayoutContext context, Size availableSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\VirtualizingLayout.cs:line 37
   at Avalonia.Controls.ItemsRepeater.MeasureOverride(Size availableSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Controls\Repeater\ItemsRepeater.cs:line 284
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 516
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 317
   at Avalonia.Layout.Layoutable.Arrange(Rect rect) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\Layoutable.cs:line 354
   at Avalonia.Layout.LayoutManager.Arrange(ILayoutable control) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 196
   at Avalonia.Layout.LayoutManager.ExecuteArrangePass() in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 147
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass() in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Layout\LayoutManager.cs:line 90
   at Avalonia.Controls.WindowBase.HandleResized(Size clientSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Controls\WindowBase.cs:line 266
   at Avalonia.Controls.Window.HandleResized(Size clientSize) in D:\projects\AvaloniaUI\Avalonia\src\Avalonia.Controls\Window.cs:line 562
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in D:\projects\AvaloniaUI\Avalonia\src\Windows\Avalonia.Win32\WindowImpl.cs:line 700
   at Avalonia.Win32.Interop.UnmanagedMethods.DefWindowProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
   at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in D:\projects\AvaloniaUI\Avalonia\src\Windows\Avalonia.Win32\WindowImpl.cs:line 759

From my reading of the code, it's possible that this loop can be iterated 0 times if both conditions fail:
https://github.com/microsoft/microsoft-ui-xaml/blob/master/dev/Repeater/FlowLayoutAlgorithm.cpp#L304-L305
In this case, m_lastRealizedDataIndexInsideRealizationWindow is updated expecting that the loop was iterated >= 1 time:
https://github.com/microsoft/microsoft-ui-xaml/blob/master/dev/Repeater/FlowLayoutAlgorithm.cpp#L415-L418
This causes m_lastRealizedDataIndexInsideRealizationWindow  to be set to an incorrect value.
In Avalonia, I fixed the problem we were seeing by only updating the value if the loop was iterated: https://github.com/AvaloniaUI/Avalonia/pull/2603/commits/6f0befabdbf76fd97d936494fdf8f6e50cfe947e
I'm not 100% sure this is the correct fix, but it seems to have worked.
Steps to reproduce the bug
I've tried to reproduce the error in WinUI but I've been unable to so far.
Version Info
Current master: 7897ef32a4fd874d91a1e3be3d15a9186fffc068

Closing this as it looks like the problem was caused by a mistake in porting.


TX Resubmission: the wallet has to periodically resubmit unmined transactions to the network within the expiry window

the wallet has to periodically resubmit unmined transactions to the network within the expiry window
this becomes even more critical with TEX support (multiple transactions)

special separate case: unmineable transactions should be also resubmitted within the expiry window

UX needs to be determined for this case because we need spending keys when constructing a replacement transaction - "This transaction wasn't successful, would you like to resubmit it?"

Intial requirements we agreed on:

every 4 blocks - we should resubmit unmined unexpired transactions (after 10 resubmissions, some transactions expire and will not be a part of the set anymore)
rerun this query at every block height, resubmit 4 blocks from the block when it was created

Resolved in #1315


header-buttons

Home button with log-in and register links

I created a new branch but it's not publishing? Hopefully my code is up.


DOCUMENTATIONS: Document ChatCompletionClient Methods & Exceptions

The Ask
Write XML Documentation that pops up when using the method in Visual Studio through intellisense.  You should only document the exceptions that the method throws and explanation of exception in their corresponding files. For example:
NOTE: Example is for CompletionsClient, you should adjust this for ChatCompletions

        /// <exception cref="CompletionClientValidationException" />
        /// <exception cref="CompletionClientDependencyException" />
        /// <exception cref="CompletionClientServiceException" />
        ValueTask<Completion> PromptCompletionAsync(Completion completion);

    /// <summary>
    /// This exception is thrown when a validation error occurs while using the completion client.
    /// For example, if required data is missing or invalid.
    /// </summary>
    public class CompletionClientValidationException : Xeption
    {
       // code goes here...
    }

NOTE: Don't forget to take out the Exceptions sections of corresponding feature in the README.md. This is how it looks like for Completions:

How to claim this issue?

Post on this issue a comment that says: "I claim this issue"
You will be given 24 hours to complete the issue - if no PR is opened within 24 hours someone else will claim it
If you have an open PR but is inactive for more than 24 hours from the last review comment we will shutdown your PR

Measures of Success
Attach a screenshot of how it is showing the prompt in acceptance test and/or integration test projects where the method was used. Here is an example:

Make sure #302 is closed and added to main branch.

I claim this issue


How to remove red asterix when marked as required false.

when marking the rich text typed object false, there is still a red asterix indicating the field is required.

it appears there is a property for required passed in


Duplicate style rules from lib styles after upgrading to Angular 13

Which @angular/* package(s) are the source of the bug?
compiler, upgrade
Is this a regression?
Yes
Description
We are running an Angular application leveraging third-party stylesheet provided by our company. As in most common angular applications, we have a global stylesheet in which we import the aforementioned dependencies.
After upgrading to Angular v13 and its toolchain, we noticed an unexpected increase in the production mode bundle size. Inspecting the build stats, we found out that such increase was concentrated in the main styles.css file. With a deeper inspection in the minified file, we found out that many of the global imports were duplicated in the output stylesheet.
For us, this is a regression, since before the upgrade this duplication did not occur.
The link below brings to a Github repository where we demonstrate the issue with a simple @angular/material import. The branches are organized as follows:
master -> Angular 12, works as expected
feature/angular-13 -> Angular 13, duplicate entries in built style.css
We can also provide the unminified versions of the built styles.css bundles (v12 and v13, ready to be compared). Built from the same sources, the v13 indeed does have duplicate rules, while the v12 does not.
Please provide a link to a minimal reproduction of the bug
https://github.com/ibanjo/angular13-duplicate-styles-issue
Please provide the exception or error you saw
No exception, just an unexpected increase in the bundle size due to duplicate style rules. Console output from the sample repo below:

Angular 12

PS > ng build
- Generating browser application bundles (phase: setup)...Compiling @angular/core : es2015 as esm2015
Compiling @angular/animations : es2015 as esm2015
Compiling @angular/common : es2015 as esm2015
Compiling @angular/animations/browser : es2015 as esm2015
Compiling @angular/platform-browser : es2015 as esm2015
Compiling @angular/platform-browser-dynamic : es2015 as esm2015
Compiling @angular/platform-browser/animations : es2015 as esm2015
√ Browser application bundle generation complete.
√ Copying assets complete.
√ Index html generation complete.

Initial Chunk Files               | Names         |      Size
main.ce1d0611fa8de52d8f95.js      | main          | 194.64 kB
styles.b13c2c4cfb1815fefd68.css   | styles        |  71.65 kB
polyfills.f81649056b4914575a05.js | polyfills     |  36.21 kB
runtime.bcb3b17df8495b345ab5.js   | runtime       |   1.04 kB

                                  | Initial Total | 303.54 kB

Build at: 2022-02-11T13:42:10.679Z - Hash: 1a56c9818bf52b36e80f - Time: 61261ms

Angular 13

PS > ng build
√ Browser application bundle generation complete.
√ Copying assets complete.
√ Index html generation complete.

Initial Chunk Files           | Names         |  Raw Size | Estimated Transfer Size
main.7ff4bf4936dcd108.js      | main          | 195.44 kB |                54.27 kB
styles.87b5ac7b92a3d96a.css   | styles        |  86.85 kB |                 7.55 kB
polyfills.ef5829611190e658.js | polyfills     |  36.24 kB |                11.49 kB
runtime.c2f9f224e2630afd.js   | runtime       |   1.06 kB |               601 bytes

                              | Initial Total | 319.59 kB |                73.90 kB

Build at: 2022-02-11T13:56:49.018Z - Hash: 27ead51cbfcaddf0 - Time: 35328ms

Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 13.2.3
Node: 16.13.0
Package Manager: npm 8.1.0
OS: win32 x64

Angular: 13.2.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router

Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1302.2
@angular-devkit/build-angular 13.2.2
@angular-devkit/core 8.3.29
@angular-devkit/schematics 8.3.29
@angular/cli 13.2.3
@schematics/angular 8.3.29
ng-packagr 13.2.1
rxjs 6.5.3
typescript 4.5.5

Anything else?
No response

While I haven’t tried locally yet I noticed that the indigo theme is being referenced twice.

https://github.com/ibanjo/angular13-duplicate-styles-issue/blob/f66e1634276944ebb2c0e8170d6a79c101fea412/angular.json#L37
https://github.com/ibanjo/angular13-duplicate-styles-issue/blob/f66e1634276944ebb2c0e8170d6a79c101fea412/src/styles.scss#L12

Hi @alan-agius4. You have definitely got a point. Nevertheless, this still sounds as a regression, since with the v12 toolchain the duplication did not occur. Same code, different toolchain, different results.

@ibanjo, yeah this seems like an issue with esbuild. Let's continue tracking this https://github.com/evanw/esbuild/issues/2016.


SLO Plugin SLO CRUD

Finish up the implementation of the SLO CRUD API, by combining all the downstream SD & metric configuration pieces with the cortex admin rule loading.

Tuesday & Wednesday:

Simplify the data an SLO holds into :

  string name = 1;
  string datasource = 2;
  string monitorWindow = 3; // 7d, 28d or 30d
  string budgetingInterval = 4; // in the format 5m, 1h etc..
  Target target = 5;
  repeated Label labels = 6;
  repeated Alert alerts = 7;

Implement CRUD SLO api for monitoring datasources

Fixed bugs in yesterday's implementation:

Update works in multi cluster env, (was leaving old rule group in original cluster)
CreateSLO / UpdateSLO was not applying metadata & alerting rule groups, just recording rule groups
DeleteSLO actually deletes the sub group rules, not a generic non-existent rule group with the SLO id

Friday :

Complete refactored API implementation design to use an interface mapper so implementations can stay separate
Cleaned up & streamlined SLO API further

Fixed budgeting as intervals durations & did dynamic MWMB SRE windows from arbirtary intervals
Added some better error codes to slo error code abstraction in shared.go
Further streamline the interfaces for SLO CRUD logic & their implementations.
SLOs autodetect what datasources (i.e. opni monitoring & opni logging) are available in the API calls


monit: 5.10 -> 5.19.0

Motivation for this change
monit disables SSLv23 now by default, see

https://mmonit.com/monit/changes/
https://lwn.net/Vulnerabilities/691497/

also related to https://github.com/NixOS/nixpkgs/issues/18856
Things done

[ ] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Pushed to 16.09.


I've been watching Dan's Redux tutorials on egghead and remember one advice that if parent component doesn't use some data but need it just to pass to children - don't do it. Use connect over child component that need this data.
 I thought this is commonly used approach but recently I was implementing "mini twitter" project as test assignment to the company which use redux in its project and that's why I want to work there.
 Is that true?
Here is my code if someone want to take a look https://bitbucket.org/amorphius/minitwitter/overview
So, the reason it was recognized as bad code is that there are too many connect's in the code.
Where is happy medium?

We used to say that having less connected components is better in the earlier versions of docs but I didn’t anticipate how much of a cargo cult that would become. 😞 Yes, connecting every component is often an overkill, but so is putting everything at the top! Connecting just for the sake of getting dispatch is especially harmless so you shouldn’t feel bad about doing this often.
Your code looks absolutely fine to me. 👍

Thank you. At least I have now strong argument that my code is fine and probably get job in better company :)
But still I can't imaging scenario where connect is overkill. How to develop this skill to know which rule I have to break either pass data from parent control that does not use this data to child control or to have another connect in the code (especially if it reads small chunk of data from the store)?
What kind of problems will arise with many connect's in the app?

Redux's subscriber notification process is a simple loop that runs every subscriber callback, so that's obviously O(n).  In theory, if subscriber callbacks are doing something complex, or if the number of subscribers grows very large, that could become a performance issue.
In practice, it's probably not much of a concern.  I suspect you'd have to have several thousand active subscriptions, with many actions dispatching a second, before it would realistically become a problem.  I don't know of any specific benchmarks at the moment that I could point to to verify that, though (unless maybe the recent MobX/Redux comparison would relate).
Overall, I think you should be safe following the classic "make it work, make it right, make it fast" approach.  Write code that makes your application's features work properly.  Look at what you've written and adjust the structure if needed so it makes more sense.  If it seems slow, measure and benchmark, and fix the parts that are actually slow.

h


Problem with lzfse_decode_buffer_with_scratch

When checking return value of lzfse_decode_buffer (which calls lzfse_decode_buffer_with_scratch), I'm supposed to treat dst_size as error:
if (status == LZFSE_STATUS_DST_FULL)
    return dst_size;

But I've encountered a situation, when the last line of lzfse_decode_buffer_with_scratch:
return (size_t)(s->dst - dst_buffer); // bytes written

also returns dst_size! Which must not be treated as error.
The current workaround is returning 0 instead of dst_size, but it can be a special handling e.g. extra error parameter.

Is this also related to #44 ?

TLDR: It's related but does not solve the issue because there's an unhandled corner case.
I withdrew that commit as there is an unhandled corner case (*). Sorry.
I'm not sure I have any good answers for you but here are my two cents. Most of which I suspect you already know.
Within the context of lzfse_decode_buffer my understanding is that the return value, let's call it ret, can communicate three outcomes:

Success. Here ret reflects the number of bytes written into the destination buffer.
Destination buffer is too small. Here ret equals the size of the destination buffer.
Decode error. Here ret equals 0. This is not explicitly documented but we can see the relevant code here.

The issue is that ret is overloaded. It's not always possible to assign an outcome based on ret alone.
For example, let's take a ret value of zero. This could mean:

Success. Where we've decoded a zero-length input file.
Destination buffer is too small. Where we've passed a zero-sized destination buffer.
Decode error. Where we've passed invalid data.

Although we can exclude scenario 2 by not passing in zero-sized buffers, we still cannot differentiate between scenarios 1 and 3 (*). We need more information. At some level, we need to tweak the API. One such suggestion is here.


Bitsearch would elevate the content quality to new dimensions

Hello developer(s) of torrentino,
I very much love your add-on and I am using it almost every day. In most cases the catalogued sources are high quality enough. I am regularly looking for Dolby Vision content in 4k. I am relatively new to real-debrid but I noticed that cocoscrapers on Kodi (Fen) almost always finds higher quality torrents than torrentio (also considering the uncached ones from torrentio).
The latest example of this was with the animated movie "Deep Sea" (2023) where Cocoscrapers found a 9gb DoVi and a 16gb Blu-ray version while torrentio only found some 2gb 1080p versions of the movie. The main difference there was that Cocoscrapers also includes bitsearch.to while torrentio doesn't.
This lack of bitsearch very apparent with all content since often 50% of all links are fetched from bitsearch. Bitsearch also constantly delivers higher quality movies in every single instance I have checked.
It takes away a lot of the user experience to have to download the Bitsearch movies to RD in Kodi first and then having to wait for it to finish before being able to watch it in Stremio.
Is there a reason why bitsearch isn't included in the torrentio list?
It would elevate the content quality to an enormous degree if it was included. With bitsearch included Torrentio would overtake Kodi in the last missing aspect as well: content quality.
Sincerely Chakra

There were higher resolution sources for this specific movie, but using kitsu catalog since this is anime and there was no mapping from kitsu to imdb.
I'm not planning adding any DHT crawlers atm for reason outlined several times before - https://github.com/TheBeastLT/torrentio-scraper/issues/127

Is there anything I can do to add this kitsu catalog to Torrentio?
From what I understand the reason for not adding DHT crawlers seems to be the bad categorisation. Why does Cocoscrapers get away with the data bitsearch provides?
Can I do something that would make the implementation of bitsearch possible? I only have limited experience with Java, advanced VBA and some AHK.

Is there anything I can do to add this kitsu catalog to Torrentio?

There is an addon called Anime Kitsu

Why does Cocoscrapers get away with the data bitsearch provides?

It works in a bit of a different way. Torrentio indexes all torrents it scrapes, and most kodi addons search in the providers based on a keyword. Torrentio needs to assign some imdb id to each torrent it finds, and when categorization is bad sometimes you have non movie titles (porn especially) in movies categories and then it might assign some movie id that looks similar.

Can I do something that would make the implementation of bitsearch possible? I only have limited experience with Java, advanced VBA and some AHK.

This is beyond scope of this issue, but I'd recommend going through https://github.com/Stremio/stremio-addon-sdk and see if your skill would allow you to create an addon for this.

Thank you for your explaination.
I tried around for a bit and wanted to try what would happen if I manually added the "udp://tracker.bitsearch.to:1337/announce" as provider in magnetHelper.js and in filter.js. Basically to see how bad the miscategorization issue would be. Sadly I got stuck at not being able to run the addon locally. Similar to issue #113.
The whole server hosting stuff is unfamiliar to me and my current skill level doesn't allow me to experiment further.
Would it be possible to add bitsearch as an optional provider (similar to the foreign language providers) to torrentio [maybe with an extra porn warning?] and therefore let only people who don't care for some accidental porn results enable it?


Add documentation for Remote Reindex SPI extension

This issue is to track the addition of documentation for remote reindex SPI extension(#547) once the public documentation is available.

Moving this to the documentation-website repo.


AI gives up mid game

I encontered this bug while replicating the situation described in the first TODO of the ai module file, where the ai would not take the shortest path to victory.
Basically what I discovered is that if the board is in the state described:

And you then enable the X's ai, the new ai will not play and the game will end immediatly:

Yeah, I don't really know what it should do in case it can't find any move where it would at least tie. Just make a losing move anyway? Probably. That would not end the game in such a weird manner at least.

I think the AI should at least finish the game, for consistency. And if it is sure it will lose, it should at least try to stay alive for as long as possible.


Local storage feature to save user scores

Closes #33
Before explaning what has been implemented,
I took some time to think about what we actually want to save. All previous scores? Or just the highest score only.
If user was got a right answer by mere guessing and get 10 out of 10 for example, they might lose interest to challenge themselves. So what if we store all game scores and add another function to pick the highest score from localStorage. And later on we can show them the Average grade, not just the highest score?!
This idea just came to my mind but please let me know if you have different opinion 😄
(We can also think of limiting the number of game score to be only last 10 games if the tiny storage size is a concern)

Function to save new score in localStorage

I called the function above in Model but I am still not sure if this was the best place. 😅

Function to get the highest score of previously played games.

Please let me know what you think!
And it is my first time using localStorage after watching some videos so mind my poor skills lol

Thanks for working on this! I think you've made a good start to this feature, and it looks like you've gotten the hang of using localStorage.getItem() and localStorage.setItem() to access items in localStorage 👍
localStorage
One thing to note - our application is not the only code that has access to localStorage. Other plugins or browser extensions could also access it, you could even store values to it from the browser's console. This means that our check for localStorage.length will not always reliably return only the number of scores we've stored in localStorage 😅 Similarly, using localStorage.keys(n) to get the "nth" key is also not guaranteed to only return only keys we've put there.
A good way of separating the data we need for our project from other things stored in the localStorage is to put it under one key, e.g.:
const musicAppScoresKey = 'musicAppScores';
const data = localStorage.getItem(musicAppScoresKey);

This also helps us limit the times we access localStorage, which makes it a bit better for performance, and less likely we encounter an exception when accessing localStorage.
Note that if what you want to store is an object or an array, you'll have to convert it to JSON first, e.g.:
const musicAppScoresKey = 'musicAppScores';

const scores = {"Score 1": 10, "Score 2": 3}; // object
const stringifiedScores = JSON.stringify(scores); // string

localStorage.setItem(musicAppScoresKey, stringifiedScores);

and also parse it from JSON when you access it:
const musicAppScoresKey = 'musicAppScores';

const rawScoresData = localStorage.getItem(musicAppScoresKey); // the raw data is a string
const scores = JSON.parse(rawScoresData); // the parsed data should be the object/array you stored previously

I also have a small suggestion about how we store the scores 😅 I noticed that the keys (e.g. "Score 1", "Score 2") is used to keep track of which round the score came from, and increments with each round. Rather than use an object (which doesn't preserve order) to store our scores, could we use an array, since arrays are inherently ordered? That way we could determine which round the score came from by its index in the array, and it would also make getting the highest/average score a little easier. Let me know what you think!
Storing scores
In terms of where the logic for storing to localStorage should be, the code isn't that complex right now, so keeping it in Game is alright. But you could also argue that "storing things" isn't really "game-related logic" 😄

If you really want to separate concerns, click here to read more...
You could also create a `Storage` class, and place all the localStorage-related functionality inside. Abstracting the storage logic into a class could also mean that if we ever decide to use a different storage method (e.g. posting the data to a backend server), we could more easily swap out the `Storage` class.
You could have a simple Storage class that looks something like:
class Storage {
  #storageMethod;

  constructor() {
    this.#storageMethod = window.localStorage;
  }

  get(key) {
     const rawData = this.#storageMethod.getItem(key);
     return JSON.parse(rawData);
  }

  set(key, data) {
    const stringifiedData = JSON.stringify(data);
    this.#storageMethod.setItem(key, stringifiedData));
  }
}

Since we also have an EventsManager, instead of calling the methods from within Game, you could then also have it communicate with Storage with events.

...otherwise I noticed that this comment is getting way too long so I'm cutting it short here 🙈 I think this could be a really good task to work through together if you'd be up for it! Otherwise we could also keep the logic inside Game and leave this as something for the future 😄

First of all, thank you so much for your efforts in writing long feedback. I am always excited to read your valued opinion.

I also have a small suggestion about how we store the scores 😅 I noticed that the keys (e.g. "Score 1", "Score 2") is used to keep track of which round the score came from, and increments with each round. Rather than use an object (which doesn't preserve order) to store our scores, could we use an array, since arrays are inherently ordered? That way we could determine which round the score came from by its index in the array, and it would also make getting the highest/average score a little easier. Let me know what you think!

I think saving scores as an array is a brilliant idea especially if we want to use it for features we discussed before.
I have probably read about converting to JSON in the Python Crash Course book but didn't remember much. This is an amazing opportunity to review.
And about creating the Storageclass, this feels like the way to go! As you said, we might want to change the storage method in the future as our app expands (haha). I would love to work on it together.

Why don't I just delete this branch and work on this issue from the beginning again?

Is there anything else we should double-check here or we could merge this PR? 😄

Is there anything else we should double-check here or we could merge this PR? 😄

I think the logical next step here would be to determine and display the user's last high score, but that could be worked on in a separate pull request. What do you think about merging this and let's create a follow up issue for that?


Youtube VP9 format found with incorrect bitrate, causes 'bestvideo' choice to be wrong

Given:
$ youtube-dl -vF https://www.youtube.com/watch?v=wRjEBYuSg8o
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-vF', 'https://www.youtube.com/watch?v=wRjEBYuSg8o']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2015.09.03
[debug] Python version 3.4.3 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-70767-gd24af70, ffprobe N-70767-gd24af70, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] wRjEBYuSg8o: Downloading webpage
[youtube] wRjEBYuSg8o: Downloading video info webpage
[youtube] wRjEBYuSg8o: Extracting video information
[youtube] wRjEBYuSg8o: Downloading DASH manifest
[youtube] wRjEBYuSg8o: Downloading DASH manifest
[info] Available formats for wRjEBYuSg8o:
format code  extension  resolution note
140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 23.17MiB
171          webm       audio only DASH audio  135k , vorbis@128k (44100Hz), 16.51MiB
141          m4a        audio only DASH audio  257k , m4a_dash container, aac  @256k (44100Hz), 46.52MiB
160          mp4        256x144    DASH video  126k , avc1.4d400c, 15fps, video only, 20.46MiB
278          webm       256x144    DASH video  132k , webm container, vp9, 1fps, video only, 14.28MiB
242          webm       426x240    DASH video  287k , vp9, 1fps, video only, 28.23MiB
133          mp4        426x240    DASH video  341k , avc1.4d4015, 30fps, video only, 44.81MiB
243          webm       640x360    DASH video  569k , vp9, 1fps, video only, 53.93MiB
134          mp4        640x360    DASH video  619k , avc1.4d401e, 30fps, video only, 70.07MiB
244          webm       854x480    DASH video  936k , vp9, 1fps, video only, 99.39MiB
135          mp4        854x480    DASH video 1149k , avc1.4d401f, 30fps, video only, 136.68MiB
136          mp4        1280x720   DASH video 2293k , avc1.4d401f, 30fps, video only, 279.76MiB
247          webm       1280x720   DASH video 3630k , vp9, 1fps, video only, 209.67MiB
13           3gp        unknown    small
17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3
36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3
5            flv        400x240    small
43           webm       640x360    medium ,  vorbis, vp8.0
18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E
22           mp4        1280x720   hd720 ,  mp4a.40.2, avc1.64001F (best)

Youtube-dl thinks that format 247 is the highest quality format and will choose to download it over formnat 136 (given that ffmpeg is in the path and it's looking to satisfy bestvideo+bestaudio), but this is incorrect as the format 136 stream has a higher bitrate.  And in fact both bitrates are wrong; this video has a duration of 1530 seconds, so the fmt 247 stream has a bitrate of 1149 kbit/s and the fmt 136 stream has a bitrate of 1533 kbit/s.  I notice that it lists the bitrate of the fmt 135 stream as 1149 kbit/s, so I suspect there could be a parsing error somewhere.
This seems random and unpredictable.  The above video was the first in a series.  Here is the second video of the series, uploaded by the same user (presumably with the same settings, resolution, bitrate, etc.) just two days later:
$ youtube-dl -vF https://www.youtube.com/watch?v=9TUsPJpTna8
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-vF', 'https://www.youtube.com/watch?v=9TUsPJpTna8']
[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2015.09.03
[debug] Python version 3.4.3 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-70767-gd24af70, ffprobe N-70767-gd24af70, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 9TUsPJpTna8: Downloading webpage
[youtube] 9TUsPJpTna8: Downloading video info webpage
[youtube] 9TUsPJpTna8: Extracting video information
[youtube] 9TUsPJpTna8: Downloading DASH manifest
[youtube] 9TUsPJpTna8: Downloading DASH manifest
[info] Available formats for 9TUsPJpTna8:
format code  extension  resolution note
140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 27.66MiB
171          webm       audio only DASH audio  134k , vorbis@128k (44100Hz), 19.62MiB
141          m4a        audio only DASH audio  257k , m4a_dash container, aac  @256k (44100Hz), 55.53MiB
160          mp4        256x144    DASH video  121k , avc1.4d400c, 15fps, video only, 24.39MiB
278          webm       256x144    DASH video  166k , webm container, vp9, 1fps, video only, 17.10MiB
242          webm       426x240    DASH video  237k , vp9, 1fps, video only, 33.46MiB
133          mp4        426x240    DASH video  269k , avc1.4d4015, 30fps, video only, 53.41MiB
243          webm       640x360    DASH video  459k , vp9, 1fps, video only, 63.60MiB
134          mp4        640x360    DASH video  628k , avc1.4d401e, 30fps, video only, 70.32MiB
244          webm       854x480    DASH video  805k , vp9, 1fps, video only, 116.96MiB
135          mp4        854x480    DASH video 1149k , avc1.4d401f, 30fps, video only, 138.19MiB
247          webm       1280x720   DASH video 1917k , vp9, 1fps, video only, 239.89MiB
136          mp4        1280x720   DASH video 2220k , avc1.4d401f, 30fps, video only, 289.14MiB
13           3gp        unknown    small
17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3
36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3
5            flv        400x240    small
43           webm       640x360    medium ,  vorbis, vp8.0
18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E
22           mp4        1280x720   hd720 ,  mp4a.40.2, avc1.64001F (best)

This time youtube-dl will correctly choose fmt 136 over fmt 247, but only by accident, because the fmt 136 stream really has a bitrate of 1328 kbit/s, not 2220 kbit/s as reported.
The fps values are also consistently wrong for the VP9 formats.

Bitrate is taken from DASH manifest that is wrong most of the time.

You can do something about it  — you can ignore the bitrate listed and calculate it from the size and duration, both of which you have.  The duration is in the manifest as the mediaPresentationDuration attribute of the <MPD> element, and the file size is in the yt:contentLength attribute of the <BaseURL> element (which you already must parse since it's printed in the table above.)


Netlify does not support multiValueHeaders in Functions, but netlify dev does

Hey Netlify team,
Y'all rock! :heart: I ran into an issue with multi-value headers in Netlify Functions and wanted to hear your thoughts.
- Do you want to request a feature or report a bug?
Report a bug.
- What is the current behavior?
netlify dev supports responding with multiValueHeaders in Netlify Functions. Deployed on Netlify, responding with multiValueHeaders is not supported.

multiValueHeaders are ignored on Netlify: https://multi-value-headers.netlify.app/.netlify/functions/multi-value-headers
Content-Type should be application/json and My-Custom-Header should be header123
plain headers work: https://multi-value-headers.netlify.app/.netlify/functions/headers
both work in netlify dev
Looks like support for multiValueHeaders was introduced here: #487

- If the current behavior is a bug, please provide the steps to reproduce.
Create a Netlify Function with the following code:
exports.handler = function(event, context, callback) {
  const response = {
    body: JSON.stringify({ message: 'Hello World' }),
    statusCode: 200,
    multiValueHeaders: {
      'Content-Type': [ 'application/json' ],
      'My-Custom-Header': [ 'header123' ]
    }
  }
  callback(null, response)
}

You can also use this bare-bone repository to reproduce the issue: https://github.com/FinnWoelm/netlify-multi-value-headers
Deploy on Netlify and the headers will be ignored. Run netlify dev and the headers will be present.
- What is the expected behavior?
netlify dev and Netlify should be consistent. Ideally, Netlify should support multiValueHeaders, too.
- Local Environment Information
────────────────────┐
 Environment Info   │
────────────────────┘

  System:
    OS: Linux 5.4 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
  Binaries:
    Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
    npm: 6.13.7 - ~/.nvm/versions/node/v12.14.1/bin/npm
  Browsers:
    Firefox: 76.0.1
  npmGlobalPackages:
    netlify-cli: 2.51.0

netlify-cli/2.51.0 linux-x64 node-v12.14.1

Cross-referencing this thread: https://community.netlify.com/t/go-lambdas-differences-with-aws-lambdas-prevents-me-from-using-algnhsa/1249/7
Post by futuregerald:

hi @stefanmaric, thank you sooo much for digging in to this. You’re correct. We don’t use API gateway, we use our own, and it seems we don’t yet have support for MultiValueHeaders. I’ve gone ahead and filed an issue about this for our team to look at. I don’t anticipate a fast turnaround, but we’ll let you know when we have more info.

Thanks for opening this issue @FinnWoelm ! I think this issue is caused because we've not upgraded our internal type definitions for Lambda responses in a while. I'm going to transfer this issue to a private repository later today so we can triage it. I don't think it should be hard to fix. Since there is a thread in community, we'll send updates there.

@calavera, thank you for the reply and context! That's super helpful and great to hear.
You may have already seen it, but there's another issue related to the internal API gateway regarding cookies in the function response header: Multiple Set-Cookie headers cause netlify lambda to throw an error. From everything I understand it's very much related to this issue, so both will probably end up being solved by an upgrade of the internal type definitions.
I'll keep my eyes out on the community thread for updates. Let me know if/how I can help in any way! Really appreciate the great work you do!


[Bug] Unable to consume messages orderly for ordered message while using RocketMQ 5 client

Before Creating the Bug Report

[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.

[X] I have searched the GitHub Issues and GitHub Discussions  of this repository and believe that this is not a duplicate.

[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment
Unbuntu 20.04
RocketMQ version
RocketMQ 5.2
JDK Version
JDK 21
Describe the Bug
When attempting to consume messages in order using the RocketMQ 5 client with a 2 master no any slaves, it is observed that the consumer is unable to consume messages sequentially.
Steps to Reproduce
Create FIFO topic
./mqadmin updateTopic -c DefaultCluster -t FIFOTopic -o true -n <IP_ADDRESS>:9876 -a +message.type=FIFO

Producer Code, Write in Kotlin

import cn.hutool.core.lang.generator.SnowflakeGenerator
import org.apache.rocketmq.client.apis.ClientConfiguration
import org.apache.rocketmq.client.apis.ClientServiceProvider
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.util.concurrent.atomic.AtomicLong

fun main() {

    val log: Logger = LoggerFactory.getLogger("OCP")
    val provider = ClientServiceProvider.loadService()

    val endpoints = "rmq5-broker-1.middle:8081;rmq5-broker-2.middle:8081"
    val clientConfiguration = ClientConfiguration.newBuilder()
        .setEndpoints(endpoints)
        .build()

    val topic = "FIFOTopic"
    val tag = "tag-2"

    val producer = provider.newProducerBuilder().setTopics(topic).setClientConfiguration(clientConfiguration).build()

    val atomicLong = AtomicLong()
    val snowflakeGenerator = SnowflakeGenerator()
    val messageGroup = "OrderedGroup-1"
    try {
        val ts = System.currentTimeMillis()
		//
        repeat(30) {
            val id = snowflakeGenerator.next()
            val curIndex = atomicLong.incrementAndGet()
            val message = provider
                .newMessageBuilder()
                .setTag(tag)
                .setKeys(id.toString())
                .setTopic(topic)
                .setMessageGroup(messageGroup) // Set MessageGroup For FIFO
                .setBody(("$ts - $curIndex").toByteArray())
                .build()

            val receipt = producer.send(message)

            log.info("Send message: $curIndex - $id - ${receipt.messageId}")
        }
    } catch (ex: Exception) {
        log.error("Send message error", ex)
    }
}

The producer side seems to be correctly setting the message group for ensuring ordered message delivery.
Messages are being sent to the specified topic with message group OrderedGroup-1.

Consumer Code

import cn.hutool.core.thread.ThreadUtil
import org.apache.rocketmq.client.apis.ClientConfiguration
import org.apache.rocketmq.client.apis.ClientServiceProvider
import org.apache.rocketmq.client.apis.consumer.ConsumeResult
import org.apache.rocketmq.client.apis.consumer.FilterExpression
import org.apache.rocketmq.client.apis.consumer.FilterExpressionType
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.nio.charset.StandardCharsets
import java.util.concurrent.ConcurrentLinkedQueue
import java.util.concurrent.TimeUnit

fun main() {
    val log: Logger = LoggerFactory.getLogger("ORC")

    val provider = ClientServiceProvider.loadService()
    val endpoints = "rmq5-broker-1.middle:8081;rmq5-broker-2.middle:8081"
    val clientConfiguration = ClientConfiguration.newBuilder()
        .setEndpoints(endpoints)
        .build()

    val topic = "FIFOTopic"
    val tag = "tag-2"
    val topicToTag = mapOf(topic to FilterExpression(tag, FilterExpressionType.TAG))

	//
    val cq = ConcurrentLinkedQueue<String>()

    provider.newPushConsumerBuilder()
        .setClientConfiguration(clientConfiguration)
        .setSubscriptionExpressions(topicToTag)
        .setConsumerGroup("OrderConsumerGroupV3")
        .setMessageListener {
            val msg = StandardCharsets.UTF_8.decode(it!!.body)
            cq.offer(msg.toString())
            ConsumeResult.SUCCESS
        }.build()

    ThreadUtil.sleep(10, TimeUnit.SECONDS)

    log.info(cq.joinToString("\n"))

    ThreadUtil.sleep(1, TimeUnit.HOURS)
}

The consumer side is using a ConcurrentLinkedQueue to store received messages temporarily for logging purposes.
Messages are being consumed from the topic FIFOTopic with tag tag-2.
After a waiting period of 10 seconds, the received messages are logged using cq.joinToString("\n").

What Did You Expect to See?
Te messages should be consumed in the order they were sent. However, the consumer is not able to achieve this expected behavior.
What Did You See Instead?
Messages are not consumed in the order in which they were sent?
16:55:02.686 [main] INFO ORC --<PHONE_NUMBER>102 - 1
1712134499102 - 2
1712134499102 - 3
1712134499102 - 4
1712134499102 - 6
1712134499102 - 5
1712134499102 - 7
1712134499102 - 10
1712134499102 - 11
1712134499102 - 12
1712134499102 - 9
1712134499102 - 8
1712134499102 - 13
1712134499102 - 14
1712134499102 - 15
1712134499102 - 16
1712134499102 - 17
1712134499102 - 21
1712134499102 - 18
1712134499102 - 19
1712134499102 - 22
1712134499102 - 23
1712134499102 - 20
1712134499102 - 24
1712134499102 - 25
1712134499102 - 26
1712134499102 - 27
1712134499102 - 28
1712134499102 - 29
1712134499102 - 30

Additional Context
From the dashboard, we can see the message store in the same message queue.

And From the http api /message/queryMessageByTopicAndKey.query?key=xxx&topic=FIFOTopic, we can get the message details. The message with index 6 arrived at the broker later than the message with index 5. but 6 is consume before than 5.

rocketmq currently only supports sequential consumption for a single queue

Need to set consumer group as order consumption mode

@3424672656

Need to set consumer group as order consumption mode

From the doc : https://rocketmq.apache.org/zh/docs/featureBehavior/03fifomessage and souce code , I can't find the api for order consumption mode? Can you give me more help?

rocketmq currently only supports sequential consumption for a single queue

You mean rocketmq 5?

rocketmq currently only supports sequential consumption for a single queue

Need to set consumer group as order consumption mode

From the doc : https://rocketmq.apache.org/zh/docs/featureBehavior/03fifomessage and souce code , I can't find the api for order consumption mode? Can you give me more help?

Need to set consumer group as order consumption mode

Need to set consumer group as order consumption mode

You mean that if using RocketMQ version 5 and requiring a first-in-first-out (FIFO) ordering queue, I must configure the topic with only one message queue?

Configure your consumer group as order with "-o" option.
./mqadmin updateSubGroup -c DefaultCluster -n <IP_ADDRESS>:9876 -g OrderConsumerGroupV3 -o true

Configure your consumer group as order with "-o" option.
./mqadmin updateSubGroup -c DefaultCluster -n <IP_ADDRESS>:9876 -g OrderConsumerGroupV3 -o true

This is my original shell that from official document. I have used -o true for the topic creation.
./mqadmin updateTopic -c DefaultCluster -t FIFOTopic -o true -n <IP_ADDRESS>:9876 -a +message.type=FIFO

So this cause of the problem can be ruled out.

I found the same problem. I use the Rust client. First I thought it was a client bug. But later I use grpcurl to send the same messages and I got the same result. The Rust client surpport batch send. I only found this problem in batch send api. When use batch send. not only the order is wrong, also the keys are wrong, all the messages in the same batch will have the key of the first message of the batch. and in the batch send scenario, the message are put in different queue randomly.


fix sample: 01-basic-loading-the-kernel.ipynb

the spec has been changed.
kernel.Config.AddAzureTextCompletionService(
"text-davinci-003",                  // Azure OpenAI Deployment Name
"https://contoso.openai.azure.com/", // Azure OpenAI Endpoint
"...your Azure OpenAI Key...",       // Azure OpenAI Key
Motivation and Context

Description

Contribution Checklist

[ ] The code builds clean without any errors or warnings
[ ] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
[ ] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with dotnet format
[ ] All unit tests pass, and I have added new tests where possible
[ ] I didn't break anyone :smile:

fixed


Fixed Pkg.test()

Codecov Report

Merging #14 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   96.53%   96.53%
=======================================
  Files           2        2
  Lines         173      173
=======================================
  Hits          167      167
  Misses          6        6

Continue to review full report at Codecov.

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

@iamed2  any objections to merging this?