Excessive memory usage from preallocating seen HashMap

Thanks for reporting a bug! Please include all of the following:
(1) A description of the issue. A screenshot is often helpful too.

(2) A copy of what you're diffing. If you're diffing files, include
the before and after files. If you're using difftastic with a VCS
repository (e.g. git), include the URL and commit hash.
https://files.cnblogs.com/files/yudongdong/script_out.zip?t=1690611718&download=true
(3) The version of difftastic you're using (see difft --version) and
your operating system.
0.49.0

Your URL doesn't work for me, I just get an error with 禁止访问. Could you attach the files to the task, or email me at<EMAIL_ADDRESS>with the files?

Looks like the size_hint passed to Dijkstra needs to be capped a sensible value, or we try to allocate an absurdly large hashmap.


plex issue, though not kube-plex specific, around nfs and /config becoming corrupt

I've learned the hard way that plex has issues with using an nfs share as its config folder.  The plexinc/pms-docker image notes that the issue is around file locking not being enabled by default with nfs.
In my storageClass nfs mount options I'm using 'hard' and 'nfsvers=4.2', yet I still watch in amazement as my plex server stops working after awhile and seems to only come back to a working condition by deleting the deployment, erasing the config pvc, recreating the pvc, and restarting.
My nfs server and all my cluster nodes are running the latest centos-8-stream.
If you guys are using NFS for your config mount, what mount options are you using (on both server and client side)?  If you are using something else, what has worked for you for an onprem storage solution to store your /config on as a network share?

My configuration is on a iSCSI volume (backed by https://github.com/ressu/synology-csi) and aside from CSI isssues, the configuration is stable and works as expected.
But I do recall some mentions of issues if database is on NFS. There are some mentions of locking issues in the discussion there, but if your issues are resolved by simply recreating the PVC (effectively remounting the volume) then locking is an unlikely cause. Locking issues would show up as data corruption instead.
Have you tried rebooting the node? While it is disruptive to the other pods running on the node, it would confirm whether this is a mount issue or an issue somewhere else.

It isn't fixed by remounting, only by deleting the pvc, recreating the pvc,
and mounting the new pvc.  Definitely corruption.  The issues occur within
and hour or two of the initial discovery and loading of the available media
files into the libraries.  I've started over several times with different
mount options with no luck.
My main share is off a 2019 windows server that I am mounting on a Linux
system which uses it for an nfs export.  I then am using that nfs share for
dynamic provisioning in the cluster.  It seems to work for everything so
far, except for plex and nextcloud.  I am concerned everything else I have
recently set up will all become corrupted as well.  Looks like I need a
better solution.  Looking for ideas though I wasn't expecting a sudden
expense...
On Sat, Sep 25, 2021, 4:22 AM Sami Haahtinen @.***>
wrote:

My configuration is on a iSCSI volume (backed by
https://github.com/ressu/synology-csi) and aside from CSI isssues, the
configuration is stable and works as expected.
But I do recall some mentions
https://www.reddit.com/r/PleX/comments/ff4a59/plex_hangs_with_library_and_database_on_nfs/
of issues if database is on NFS. There are some mentions of locking issues
in the discussion there, but if your issues are resolved by simply
recreating the PVC (effectively remounting the volume) then locking is an
unlikely cause. Locking issues would show up as data corruption instead.
Have you tried rebooting the node? While it is disruptive to the other
pods running on the node, it would confirm whether this is a mount issue or
an issue somewhere else.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ressu/kube-plex/issues/19#issuecomment-927100477, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEHXQ7IMV4EHV2OVMFNS2KLUDWPGPANCNFSM5ESWC5HA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Oh, so you need to delete the data to get everything back running. Got it.
I'm not sure how locking with Windows 2019 works, so you could try setting mountOptions in the persistent volume definition to local_lock=all. Local locking will override any NLM mechanisms in place and handle the locking on the kubernetes node. This should fix the issue, but you should avoid read-write mounting the same volume on multiple machines since locking isn't respected on other machines.
On the upside, the way my fork of kube-plex is built avoids mounting configuration on anything but the main Plex pod.


Update to tip of sony/nmos-cpp master

Adds support for HSTS and OCSP in the Registry and mock Node (see hsts_ and ocsp_ settings in config.json)
Adds support for BCP-006-01 (JPEG XS) in the mock Node (see video_type setting in config.json)
Adds support for controlling which senders and receivers are created in the mock Node (see senders and receivers settings in config.json)
Bumps versions of some dependencies (Boost 1.80.0, nlohmann/json 3.11.2, json-schema-validator 2.2.0, openssl 1.1.1s)

@garethsb Thanks for spotting all the mistake - hopefully this will close it


Crash on start up

See log: https://pastebin.com/GXmBbW5m
Has something to do with the gamerule

Try to add fabric api mod. That is responsable for the gamerule.

That worked but you should warn that the mod requires fabric-api


sveltekit netlify build fails

Netlify build fails. I am using  npm version 6.14.13 and LTS node version v14.16.0.
I am not sure where node version 12.18.0 is coming from....
My svelte.config.js looks as below, locally I am able to build for production
@type {import('@sveltejs/kit').Config} */
import adapter from '@sveltejs/adapter-netlify';
const pkg = require('./package.json');
const config = {
kit: {
adapter: adapter(), // currently the adapter does not take any options
target: '#svelte'
}
};
export default config;
Netlify build logfile:
1:38:41 PM: Build ready to start
1:38:43 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
1:38:43 PM: build-image tag: v3.7.6
1:38:43 PM: buildbot version: cb3d235979bae64f617d34524cb2e8a9de68153f
1:38:43 PM: Fetching cached dependencies
1:38:43 PM: Failed to fetch cache, continuing with build
1:38:43 PM: Starting to prepare the repo for build
1:38:44 PM: No cached dependencies found. Cloning fresh repo
1:38:44 PM: git clone https://github.com/katgolek/netlify-test
1:38:45 PM: Preparing Git Reference refs/heads/main
1:38:45 PM: Parsing package.json dependencies
1:38:46 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus 'build/' in the Netlify UI
1:38:46 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus 'functions/' in the Netlify UI
1:38:46 PM: Starting build script
1:38:46 PM: Installing dependencies
1:38:46 PM: Python version set to 2.7
1:38:47 PM: v12.18.0 is already installed.
1:38:48 PM: Now using node v12.18.0 (npm v6.14.4)
1:38:48 PM: Started restoring cached build plugins
1:38:48 PM: Finished restoring cached build plugins
1:38:48 PM: Attempting ruby version 2.7.1, read from environment
1:38:49 PM: Using ruby version 2.7.1
1:38:50 PM: Using PHP version 5.6
1:38:50 PM: Started restoring cached node modules
1:38:50 PM: Finished restoring cached node modules
1:38:50 PM: Installing NPM modules using NPM version 6.14.4
1:38:52 PM: npm ERR! code ENOTSUP
1:38:52 PM: npm ERR! notsup Unsupported engine for<EMAIL_ADDRESS>wanted: {"node":"^12.20 || ^14.13.1 || >= 16"} (current: {"node":"12.18.0","npm":"6.14.4"})
1:38:52 PM: npm ERR! notsup Not compatible with your version of node/npm<EMAIL_ADDRESS>1:38:52 PM: npm ERR! notsup Not compatible with your version of node/npm<EMAIL_ADDRESS>1:38:52 PM: npm ERR! notsup Required: {"node":"^12.20 || ^14.13.1 || >= 16"}
1:38:52 PM: npm ERR! notsup Actual:   {"npm":"6.14.4","node":"12.18.0"}
1:38:52 PM: npm ERR! A complete log of this run can be found in:
1:38:52 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-05-25T11_38_52_642Z-debug.log
1:38:52 PM: Error during NPM install
1:38:52 PM: Creating deploy upload records
1:38:52 PM: Build was terminated: Build script returned non-zero exit code: 1
1:38:52 PM: Failing build: Failed to build site
1:38:52 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
1:38:52 PM: Finished processing build request in 9.423917579s

As the error message says, you need to use a newer version of Node. Netlify lets you control what version you get instead of their default.

Thanks, it helped, I wasn't aware I can change Netlify default version

As the error message says, you need to use a newer version of Node. Netlify lets you control what version you get instead of their default.

could you walk me through how to do this? thanks

As the error message says, you need to use a newer version of Node. Netlify lets you control what version you get instead of their default.

could you walk me through how to do this? thanks

https://answers.netlify.com/t/specifying-a-node-version/9701

Set a NODE_VERSION and NPM_VERSION as environment variables in build settings.
Add a  .nvmrc file to the site’s base directory in your repository and state your node version there for example 14.16.0.
https://docs.netlify.com/configure-builds/manage-dependencies/

Add a .nvmrc file to the site’s base directory in your repository and state your node version there for example 14.16.0.
Can you give an example of this?

Add a .nvmrc file to the site’s base directory in your repository and state your node version there for example 14.16.0.
Can you give an example of this?

I had the same problem after upgrade:
Installation section in README warns explains it:
https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify#installation


AS3 does not support none persistence methods

Do you already have an issue opened with F5 support?
Github Issues are consistently monitored by F5 staff, but should be considered as best effort only and you should not expect to receive the same level of response as provided by F5 Support. Please open an case with F5 if this is a critical issue.
ISSUE TYPE

Bug Report

AS3 BUILD/ VERSION

3.11.0

BIGIP VERSION

<IP_ADDRESS>

SUMMARY

AS3 should not force persistence on Virtual Servers by removing a "none" option

STEPS TO REPRODUCE

[
    {
        "path": "/PartitionA/AppName/serviceMain/persistenceMethods",
        "op": "add",
        "value":[
				"none"
                ]}]

EXPECTED RESULTS

ltm virtual PartitionA/AppName/serviceMain {

 persist none
}

ACTUAL RESULTS

{
    "code": 422,
    "errors": [
        "/PartitionA/AppName/serviceMain/persistenceMethods/0: should be equal to one of the allowed values [\"cookie\",\"destination-address\",\"msrdp\",\"source-address\",\"tls-session-id\"]"
    ],
    "declarationFullId": "",
    "message": "declaration is invalid"
}

ltm virtual PartitionA/AppName/serviceMain {
    persist {
        Common/source_addr {
            default yes
        }
    }
}

You should be able to use an empty array to accomplish this.
"persistenceMethods":[]


Redirect www.ballotapi.com hompage to this github repo

http://www.ballotapi.com/ doesn't exist yet, so it would probably be best to have apache 302 Redirect to this repo when you hit the homepage.

Done for https://ballotapi.org/


Dumping facts to /tmp/stockpile.json

Stockpile to now dump facts to /tmp/stockpile.json by default

This looks good to go


Refactor basemaps.py and add tests

@giswqs, I'm going to keep this open until I've made it completely through basemaps.py - I anticipate a couple more PRs for it.

Sorry. The Issue was automatically closed when referenced in a PR.

Bummer that it does that. With our internal review system I'm used to being able to link issues to pull requests and optionally designate as "fixes" to close the issue(s).
I looked briefly for changing the default behavior, but it does not appear to be an option: https://github.com/orgs/community/discussions/23476
It also seems there is not a parent --> child or "blocked by" issue hierarchy system.

After more than three years, GitHub still has not implemented this simple feature. Unbelievable!

App to compare 250 map layers; the provider sectioning in dropdown is kind of nice: https://mc.bbbike.org/mc/
Putting this here as a bookmark, the UI would not actually be handled by basemaps.py probably.

Looks nice! They also have Google basemaps🤓

:) It's the "development only tiles" though... they make it so hard!


feat: using error component #854

Ticket
Closes https://github.com/clevercanary/data-browser/issues/854
Reviewers
@.
Changes

Removing the use of TempError comonent
Using new Error component from data-explorer package

Definition of Done (from ticket)
QA steps (optional)
Known Issues

@frano-m I'm having some problems testing this, I'm getting an error related to the Error component. Do you have any idea what might be causing it?

@BruceRodrigues, the Error component is now merged in data-explorer-ui 0.21.0 and is on main. Can you retest and re-submit this for review if it looks ok? Thanks! D

The branch was updated and tested.

Sorry @BruceRodrigues can you see if this PR is still required and if so rebase it and test?

Hey @NoopDog, this is still necessary. Currently, this is the ErrorComponent we're using for data-browser

and this PR will change it to

However, I have found an issue with this component, if you click to "To Homepage" the error component is still presented. I've investigated a little bit about what causing this and to fix it we would need to change some things on ExploreState, so I would like to check first if this should be done already, and if so, should I do it on this PR?


508: Fix: Bump paambaati/codeclimate-action v3.1.0 -> v3.2.0

Ticket #508
Description
The paambaati/codeclimate-action GithHub Actions workflow runner v3.1.0 suddenly broke (which maybe means that its maintainers are not pushing immutable tags?). From the README as of today:

Warning
Please upgrade to v3.1.1 (or higher) immediately. v3.1.0 was recently broken inadverdently, and the only fix is to upgrade your action to v3.1.1 or higher. Please see #626 for more details.

This PR bumps the runner from the breaking v3.1.0 tag to v3.2.0 accordingly.
Screenshots / Demo Video
Testing
The new version will be tested once this PR is opened.
Checklist

[X] Provided ticket and description
[X] Your PR title contains the ISSUE ticket number e.g "86: ..."
[ ] Provided screenshots/demo
[X] Provided testing information
[ ] Provided adequate test coverage for all new code
[X] Added PR reviewers
[ ] Ensure at least 1 review before merging

Fixes #508


Very long build times for anything besides a trivial specification

Hello,
This is more of a question than an issue. My build times are extremely long for anything besides a trivial RecordFlux specification. Often times, I run out of memory. I've tried removing parallel compilation to (presumably) consume less memory but it takes forever  (hour++) for just a trivial (in my opinion) example.
The specification I'm trying to model has a general format for messages, and then I use type refinement based on some fields in the common part. After implementing the specification for one of the refinements, and just a placeholder for a second, the build times seem to increase exponentially. I should mention that there are many conditional fields and so the transition logic between each field has many guard conditions.
Is this expected? Should we be using a (extremely) beefy server to build anything that uses RecordFlux generated code? Are we using the wrong tool here? Maybe this is documented somewhere some of these limitations but I can't find them.

Hi Daly,
This is not a known problem. Typically, the compilation takes only a couple of seconds on a modern workstation, even for code generated from a complex specification. In the past, we have observed that certain compiler flags can negatively affect the compilation time, but the resulting compilation time was always still in the order of minutes, not hours.
Which toolchain are you using? Do you use specific compiler flags? Could you provide a small reproducer, where this issue can be observed?

Thanks for the quick reply. It seemed off to me too - I expect a few seconds to a few minutes to build. I can put together a reproducer and send to you this week.
Here are the compiler flags I am running with at the moment (I use Alire to manage my projects):
"-Og" -- Optimize for debug
,"-ffunction-sections" -- Separate ELF section for each function
,"-fdata-sections" -- Separate ELF section for each variable
,"-g" -- Generate debug info
,"-gnatwa" -- Enable all warnings
,"-gnatw.X" -- Disable warnings for No_Exception_Propagation
,"-gnatVa" -- All validity checks
,"-gnaty3" -- Specify indentation level of 3
,"-gnatya" -- Check attribute casing
,"-gnatyA" -- Use of array index numbers in array attributes
,"-gnatyB" -- Check Boolean operators
,"-gnatyb" -- Blanks not allowed at statement end
,"-gnatyc" -- Check comments
,"-gnaty-d" -- Disable check no DOS line terminators present
,"-gnatye" -- Check end/exit labels
,"-gnatyf" -- No form feeds or vertical tabs
,"-gnatyh" -- No horizontal tabs
,"-gnatyi" -- Check if-then layout
,"-gnatyI" -- check mode IN keywords
,"-gnatyk" -- Check keyword casing
,"-gnatyl" -- Check layout
,"-gnatym" -- Check maximum line length
,"-gnatyn" -- Check casing of entities in Standard
,"-gnatyO" -- Check that overriding subprograms are explicitly marked as such
,"-gnatyp" -- Check pragma casing
,"-gnatyr" -- Check identifier references casing
,"-gnatyS" -- Check no statements after THEN/ELSE
,"-gnatyt" -- Check token spacing
,"-gnatyu" -- Check unnecessary blank lines
,"-gnatyx" -- Check extra parentheses
,"-gnatX" -- Enable GNAT Extensions

I should mention I'm using a Debian based docker container run on a Mac M1 (so the Debian container is an arm64 architecture, running natively and not using Rosetta). This isn't an issue normally: I have great performance developing in Ada/SPARK with this setup. I should also mention that the issue is also reproduced in our pipeline: we use GitLab internally and even on their beefier amd64 shared runners it was taking 1 hour++ (and burning our CI minutes :( ).
I'm using the following version of gnat:
GNAT 13.2.0
Copyright (C) 1996-2023, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm using the latest version of RecordFlux from pypi: 0.14.0.
I'll make a reproducer that is a bit simpler than what I have but still demonstrates what is happening.

Here is a very basic example: this reproducer will only take a couple of minutes to build for me, but it shows the issue starting to creep in. Maybe I am not using the generated code properly and that is the issue.
To really expose my issue, I can add in more conditionals on the transitions and more fields in the messages to really highlight it (and make it more similar to the real messages we are trying to model). I'll hold off on that if this reproducer is good enough.
Let me know, thanks!
reproducer.tar.gz

Thank you for the reproducer. A build time of a couple of minutes is much longer than we have seen with much more complicated specifications. We will investigate and let you know when we know more.

Thanks!
And to be clear: I trimmed this down quite a bit from the real application we are building. The message structure is similar but larger and more complicated and building takes 1 hour++.

The long compilation time is caused by the use of the -gnatX flag. When the flag is removed, your reproducer builds in less than a second. It is unexpected that -gnatX has such a severe impact and I have informed the compiler team about the problem. For now, the only workaround I can see is not to use -gnatX.

Ahhhh thanks! Doh!

I should mention the same issue occurs with -gnat2022, so it's not just the -gnatX GNAT extensions.

Also, to avoid creating another issue, I've had problems with some more compiler switches:

GNAT style checks fail. I tried to run the generated files through the pretty printer to fix some of them but the GNAT pretty printer crashes. I've raised an issue for that one: https://github.com/AdaCore/libadalang-tools/issues/29. For now, I use sed to prepend pragma Style_Checks (Off); to every generated file. I'm using the Alire validation profile to run these checks.

-gnatwq causes issues for some of the generated code. For example (from the reproducer): recordflux-build/generated/rflx-variant_two-data.adb:628:52: warning: equality should be parenthesized here [-gnatwq].

-gnatw.a causes issues in the generated code. For example (not from the reproducer but from my own specs): warning: in instantiation at rflx-rflx_message_sequence.ads:54 [-gnatw.a] and warning: check will fail at run time [-gnatw.a]. The line it is pointing to is here:

  procedure Initialize (Ctx : out Context; Buffer : in out RFLX_Types.Bytes_Ptr) with
    Pre =>
      (not Ctx'Constrained
       and then Buffer /= null
       and then Buffer'Length > 0
       and then Buffer'Last < RFLX_Types.Index'Last),
    Post =>
      (Has_Buffer (Ctx)
       and Valid (Ctx)
       and Buffer = null
       and Ctx.Buffer_First = Buffer'First'Old
       and Ctx.Buffer_Last = Buffer'Last'Old
       and Ctx.First = RFLX_Types.To_First_Bit_Index (Ctx.Buffer_First)
       and Ctx.Last = RFLX_Types.To_Last_Bit_Index (Ctx.Buffer_Last)
       and Sequence_Last (Ctx) = Ctx.First - 1),
    Depends =>
      (Ctx => Buffer, Buffer => null);

Cheers!

GNAT style checks fail. I tried to run the generated files through the pretty printer to fix some of them but the GNAT pretty printer crashes. I've raised an issue for that one: gnatpp crashes when setting -c3 to format commments and comment has no characters libadalang-tools#29. For now, I use sed to prepend pragma Style_Checks (Off); to every generated file. I'm using the Alire validation profile to run these checks.

I already have seen some style check warnings in your reproducer. These warnings were caused by the use of -gnatyc ("Check comments, double space.") which enforces a different spacing than -gnatyC ("Check comments, single space.") that we use for our code. We already use pragma Style_Checks to prevent such issues, but as this pragma is placed after the license header, GNAT still complains about the spacing there. We consider moving the pragma Style_Checks to the top of the file to prevent this issue. Did you see any other style issues?

-gnatwq causes issues for some of the generated code. For example (from the reproducer): recordflux-build/generated/rflx-variant_two-data.adb:628:52: warning: equality should be parenthesized here [-gnatwq].

I cannot reproduce the issue with RecordFlux 0.15.0. Please check if upgrading RecordFlux solves the issue for you.

-gnatw.a causes issues in the generated code. For example (not from the reproducer but from my own specs): warning: in instantiation at rflx-rflx_message_sequence.ads:54 [-gnatw.a] and warning: check will fail at run time [-gnatw.a]. The line it is pointing to is here:

  procedure Initialize (Ctx : out Context; Buffer : in out RFLX_Types.Bytes_Ptr) with
    Pre =>
      (not Ctx'Constrained
       and then Buffer /= null
       and then Buffer'Length > 0
       and then Buffer'Last < RFLX_Types.Index'Last),
    Post =>
      (Has_Buffer (Ctx)
       and Valid (Ctx)
       and Buffer = null
       and Ctx.Buffer_First = Buffer'First'Old
       and Ctx.Buffer_Last = Buffer'Last'Old
       and Ctx.First = RFLX_Types.To_First_Bit_Index (Ctx.Buffer_First)
       and Ctx.Last = RFLX_Types.To_Last_Bit_Index (Ctx.Buffer_Last)
       and Sequence_Last (Ctx) = Ctx.First - 1),
    Depends =>
      (Ctx => Buffer, Buffer => null);

I have seen this warning when using -gnatVo. The only workaround I know is to not enable this switch. The bug does not exist in recent GNAT Pro releases. Only the FSF GNAT 13 seems to be affected, so it could make sense to report the issue to the FSF.

Awesome - thanks for the response! We are using 0.14.0 version of RecordFlux so I'll update today and check again. Cheers!

After updating to 0.15.0 I can confirm that the -gnatwq has been addressed and the -gnatw.a seems to have also gone away. (The installation issue I had raised in another issue is also fixed!).
Thanks for everything!

 I'm glad to hear that most of your issues have been resolved in the new version. We will probably also fix the style check problem soon.

The style check warnings for the license header have been fixed in fbecae098ca0213bdc886c249ac99a3905e13e4b.

The long compilation time is caused by the use of the -gnatX flag. When the flag is removed, your reproducer builds in less than a second. It is unexpected that -gnatX has such a severe impact and I have informed the compiler team about the problem. For now, the only workaround I can see is not to use -gnatX.

Has any progress been made here? It's not just -gnatX: it's any Ada2022 flag. I don't have a good workaround at the moment for code written to use Ada2022 to also make use of RecordFlux ... I just can't build it at all. Thanks!

The fix is currently in progress. Unfortunately, it appears to be a difficult problem and it is not yet clear how long it will take to complete.
As a workaround you could try to set the -gnatX or -gnat2022 flag on a per-file basis in the project file, but this will only help for files that don't use RecordFlux directly.

The fix is currently in progress. Unfortunately, it appears to be a difficult problem and it is not yet clear how long it will take to complete.
As a workaround you could try to set the -gnatX or -gnat2022 flag on a per-file basis in the project file, but this will only help for files that don't use RecordFlux directly.

Thanks for the response! And glad to hear it is in progress :). I'll try your suggestion, I wasn't sure how to mix and match the two to be honest. The combinations I had tried so far weren't working as I expected. I'll try out your suggestion! The alternative which I think will work is to build my RecordFlux project as a separate library and link it.

So adding pragma Ada_2012 to all the generated code solves the problem! I think that would be a good thing to include automatically as part of the rflx generate command so that others don't run into the issue. It is true either way that the code doesn't compile with Ada2022+ so probably a nice informative thing to put for now!

So adding pragma Ada_2012 to all the generated code solves the problem! I think that would be a good thing to include automatically as part of the rflx generate command so that others don't run into the issue. It is true either way that the code doesn't compile with Ada2022+ so probably a nice informative thing to put for now!

Great to hear and thanks for reporting back! Adding that pragma to the generated code should be easy to do. I created an internal ticket for that.

Awesome - thanks!


Improves handling of intermittently specified bit_offset

Previously, beginning of the packet was "floating" in the
sense that the bit start position depended on how many bits
total were specified. This reasonably allows the omission
of fields (so that the definition does not fill the whole
packet), but that the definition would span to the end of
the packet. Implicitly, what was omitted would be assumed
to be the header (or more).
We've run into the situation where the length of a packet
might change at some point, but the change adds more
fields to the end of the packet... while the existing
structure of the packet remains the same.
Given the described, floating behavior of ccsdspy, the
same packet definition would not work. One initial idea
was to fix the start of the packet by specifying exactly
the start of the packet... eg. first bit_offset = 0.
This caused problems when leaving the rest of the
bit_offsets unspecified because, even though the first
packet would be at the start, the remaining would
misalign due to the counter variable not taking the
fixed start into account.
This commit improves handling of intermingled packet
definitions where some fields may have bit_offset
specified and other may not (ie bit_offset = None).

Looks good to me. Let's fix that minor style issue and then I will merge.

Thanks!

Would you update PyPI as well? :)

Done!


Replace gulp-util

gulp-util is deprecated:
https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
Remove gulp-util using the following API replacements:

gutil.File => https://www.npmjs.com/package/vinyl
gutil.replaceExtension => The .extname property on Vinyl objects or https://www.npmjs.com/package/replace-ext
gutil.colors => https://www.npmjs.com/package/ansi-colors
gutil.date => https://www.npmjs.com/package/date-format
gutil.log => https://www.npmjs.com/package/fancy-log
gutil.template => https://www.npmjs.com/package/lodash.template
gutil.env => https://www.npmjs.com/package/minimist
gutil.beep => https://www.npmjs.com/package/beeper
gutil.noop => https://www.npmjs.com/package/through2
gutil.isStream => Use the .isStream() method on Vinyl objects
gutil.isBuffer => Use the .isBuffer() method on Vinyl objects
gutil.isNull => Use the .isNull() method on Vinyl objects
gutil.linefeed => Use the string '\n' in your code
gutil.combine => https://www.npmjs.com/package/multipipe
gutil.buffer => https://www.npmjs.com/package/list-stream
gutil.PluginError => https://www.npmjs.com/package/plugin-error

Nothing we can do, because this comes from:
C:\Users\xmr\Desktop\grunt\grunt-contrib-imagemin>npm ls gulp-util
<EMAIL_ADDRESS>C:\Users\xmr\Desktop\grunt\grunt-contrib-imagemin
`--<EMAIL_ADDRESS>  `--<EMAIL_ADDRESS>    `--<EMAIL_ADDRESS>      `--<EMAIL_ADDRESS>        `--<EMAIL_ADDRESS>          `--<EMAIL_ADDRESS>

Doh!


Minor grammatical updates

Category

[X] Content fix
[ ] New article
Related issues: None

What's in this Pull Request?
Minor grammatical updates

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/community/contribute.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

thx Chris, appreciated. Good to get Finglish polished.


CQL import and export

This PR adds the ability to import CQL files (temporarily replacing the ability to import ELM files, until we figure out how to make that work) and includes the CQL in the exported CPG output.
Imported CQL is immediately sent to the CQL-to-ELM webservice. (no error handling yet) Any boolean-valued definitions are identified and stored as criteria. (If the ELM doesn't have return types, then it will import everything. Note also that the entire CQL is stored, because we don't know what other functions might be defined in there that the boolean functions reference)
CQL is exported as follows:

Criteria constructed in the builder are included in the "main" Library, which is the one linked in PlanDefinition.library
Criteria imported from CQL are exported as another Library, referenced in CQL in the "main" Library
Applicability conditions in CPG are always the name of a defined statement. We should mark these as "text/cql.name" but typescript doesn't like that so instead we should reference the library function directly, ex Lib0123.DefinedThing instead of just DefinedThing

So for instance, assume you have a CQL library "utils.cql" with one function: "IsMale".

Import this CQL library
Create a pathway and a branch on the pathway
Transition 1 on the branch = IsMale
Transition 2 on the branch = create a new Criteria for Gender: Female
Add an action to both nodes after the branch
Export the pathway as CPG

You should see 2 Libraries, containing base-64'ed CQL.
The main library will contain something along the lines of:
library LIBabcdefg version '1.0'

using FHIR version '4.0.0'

include "utils" version '1.0' called utils

context Patient

define "IsMale": utils.IsMale

define "female": Patient.gender.value = 'Female'

The second library will contain the exact contents of utils.cql.
Based on some experimentation, this approach will work in cqf-ruler. (reviewers please try it out, if possible. that may require messing with the PlanDefinitions so there are no nested PlanDefs until we get that working)

Took a look through - haven't tested yet. Only issue I see off the bat is the additional libraries. Do we need to make the main library point to them or will CQF Ruler automatically consume them all. CPG IG constrains library to be 0..1

From my testing cqf-ruler seemed to import everything nested as needed. Starting with something that this branch can export, as of now the only thing that needs manual post-processing is the "text/cql.name" thing. But I'm looking into how to make that work.

To reviewers: if you want to try out the exported CPG in cqf-ruler, A) make sure that all transitions actually lead somewhere and the target action has something on it like a medication or procedure request, and B) modify the exported top-level PlanDefinition so that each action points to an ActivityDefinition instead of to another PlanDefinition in the definitionCanonical field.

So you're totally right about the existing preloaded ELM criteria -- this does kind of make them useless. But just putting a CQL file into the criteria folder won't work with the existing Service Implementation which expects everything to be JSON. I'll have to think about what the best way to make that work is. I'm open to suggestions

Ok the last commit deleted a bunch of things that we aren't actually using anymore (most of the cql-to-elm and static CQL resources). The important thing is that it now loads the demo CQL from the public/static/cql folder as fixtures, instead of loading any ELM.

This is probably beyond the scope of this PR, but how do we want to handle duplicate criteria?  I can upload the same criteria multiple times and see something like:

which also appears in the criteria selection when authoring a pathway:

This is an edge case, but something to consider as part of the design.  Not necessarily looking for an answer, but just wanted to bring it up because I'll forget otherwise...

Yeah let's make a separate task for identifying duplicates. We could start with something simple like "nothing can have the same name" but there could easily be false positives with that so not a permanent solution.

Yeah let's make a separate task for identifying duplicates. We could start with something simple like "nothing can have the same name" but there could easily be false positives with that so not a permanent solution.

Created PATHWAYS-367 for this.

I'm assuming this isn't trivial so I can make a new task but wanted to bring it up now:
When I upload the following CQL file the TumorSize definition is loaded
library "Tumor-Size-2cm-and-Under" version '1.0.0'
using FHIR version '4.0.0'
include "CDS_Connect_Commons_for_FHIRv400" version '1.0.1' called C3F

valueset "Tumor Size VS": '2.16.840.1.1137<IP_ADDRESS>6.554'

context Patient
define "Tumor Size":
  C3F.QuantityValue(C3F.MostRecent([Observation: "Tumor Size VS"])) <= 2 'cm'

But as soon as I add another statement only the 2cmAndUnder statement is imported.
library "Tumor-Size-2cm" version '1.0.0'
using FHIR version '4.0.0'
include "CDS_Connect_Commons_for_FHIRv400" version '1.0.1' called C3F

valueset "Tumor Size VS": '2.16.840.1.1137<IP_ADDRESS>6.554'

context Patient
define "Over2cm":
  C3F.QuantityValue(C3F.MostRecent([Observation: "Tumor Size VS"])) <= 2 'cm'

define "2cmAndUnder":
  exists([Observation: "Tumor Size VS"])

If I update the file above to use
define "Over2cm":
  exists([Observation: "Tumor Size VS"])

then both statements are imported.
I'm assuming the issue here is that no types are included in the ELM for the C3F version but as soon as the second statement is included the ELM has a type and its not boolean for the first statement since the C3F library was not included in the translation. So I think the solution here is to require C3F to be imported with this library but that would require more checks on upload. Perhaps for now we just include the CDS connect libraries so when we convert to ELM they are automatically included?

Yeah that really gets to the broader question of importing CQL that references another library. Without having that referenced C3F library I think you could make the argument that the first CQL library isn't even valid. (There must be some warnings or errors generated by the cql-to-elm webservice)
My preference would be to make that another task because I think it will need some thought to get everything right, in terms of UI and data model. (for example, if library A references library B, can you upload A then B? Or does it have to be B then A? Or do you have to upload them together in a single zip file or something? Is someone uploading CQL going to know how they depend on one another?)

Yes I agree completely. Created PATHWAYS-369


Private locks on most structs with locks

#401
State still has a public lock for iterating over stuff like guilds and channels because something like putting a lock on Ready seems unnecessary

@gogitops can you please remove all of your reviews from this repository, they're essentially spam.  Unfortunately github doesn't seem to provide me a way of doing it otherwise I would delete them all.

@bwmarrin deleted comments on all PRs in this org. Bot went a bit wild by accident. Fix has been implemented. Won't happen again.

Thank you @gogitops  :) Much appreciated.


Remove Narrowing for ServiceModels

This change simplifies the process of creating models in the ServiceModel by removing the trait check. The model is now directly instantiated using the 'make' method, which improves code readability and execution efficiency.

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

Comparison is base (b36a95a) 100.00% compared to head (072c7c0) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #64   +/-   ##
===========================================
  Coverage     100.00%   100.00%
+ Complexity        94        93    -1
===========================================
  Files             11        11
  Lines            218       216    -2
===========================================
- Hits             218       216    -2

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


docs: fix typo in setSaturation function

It says 'The lightness range...' where it should say 'The saturation range...'. 😊

Thanks @markoradak and congrats on your first contribution to the library!


Async version of app code (is this good?)

I wanted to make the server code for my app asynchronous so that I could try making a Nodejs app of it.  I know ASIO doesn't support WebAssembly, but wanted to know if there was at least a workaround for this.  If there is one but it's too hard, then I'll make it a Nodejs app but won't also try to port it to WebAssembly.  I still want an async version of the code so it'll be easier to run it through Nodejs.
I've tried converting the server code so far.  If I also need to convert the client code, let me know.  Anyways, I've put the changed code up on Gist.  Here's the link: https://gist.github.com/DragonOsman/d00ea7ec3d49c128ad7789293f156a09 .  Please let me know if I've made any mistakes.  The apikey and accesskey need to be given to the app as environment variables so that it'll work correctly.  I've given them as arguments to `session's constructor.  Is that a good idea?

I have no idea about any of that, sorry

Well, right now I just need to know how to convert it from sync to async.  I tried compiling the version I just came up with but it had errors.
The link for the code is the same as in the OP; I just updated it.  The errors I got were:
currency_converter.cpp:178:75: error: no matching function for call to ‘handle_request(std::__shared_ptr_access<const std::__cxx11::basic_string<char>, (__gnu_cxx::_Lock_policy)2, false, false>::element_type&, std::remove_reference<boost::beast::http::message<true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char> > >&>::type, session::send_lambda&, const char&, const char&)’
   handle_request(*doc_root_, std::move(req_), lambda_, *accesskey, *apikey);
                                                                           ^
currency_converter.cpp:83:6: note: candidate: template<class Body, class Allocator, class Send> void handle_request(boost::beast::string_view, boost::beast::http::request<Body, boost::beast::http::basic_fields<Allocator> >&&, Send&&, const char*, const char*)
 void handle_request(boost::beast::string_view doc_root, http::request<Body, http::basic_fields<Allocator>> &&req,
      ^~~~~~~~~~~~~~
currency_converter.cpp:83:6: note:   template argument deduction/substitution failed:
currency_converter.cpp:178:56: note:   cannot convert ‘*((session*)this)->session::accesskey’ (type ‘const char’) to type ‘const char*’
   handle_request(*doc_root_, std::move(req_), lambda_, *accesskey, *apikey);
                                                        ^~~~~~~~~~
currency_converter.cpp: In member function ‘const json& cache_storage::query(const std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >&, const char*)’:
currency_converter.cpp:816:17: error: ‘connect’ is not a member of ‘boost::asio’
    boost::asio::connect(socket, results.begin(), results.end());
                 ^~~~~~~
currency_converter.cpp:816:17: note: suggested alternatives:
In file included from /usr/include/netinet/in.h:23:0,
                 from /usr/include/netdb.h:27,
                 from /usr/local/boost_1_68_0/boost/asio/error.hpp:28,
                 from /usr/local/boost_1_68_0/boost/asio/detail/impl/posix_mutex.ipp:24,
                 from /usr/local/boost_1_68_0/boost/asio/detail/posix_mutex.hpp:73,
                 from /usr/local/boost_1_68_0/boost/asio/detail/mutex.hpp:25,
                 from /usr/local/boost_1_68_0/boost/asio/detail/service_registry.hpp:20,
                 from /usr/local/boost_1_68_0/boost/asio/impl/execution_context.hpp:20,
                 from /usr/local/boost_1_68_0/boost/asio/execution_context.hpp:408,
                 from /usr/local/boost_1_68_0/boost/asio/detail/scheduler.hpp:21,
                 from /usr/local/boost_1_68_0/boost/asio/system_context.hpp:19,
                 from /usr/local/boost_1_68_0/boost/asio/impl/system_executor.hpp:22,
                 from /usr/local/boost_1_68_0/boost/asio/system_executor.hpp:129,
                 from /usr/local/boost_1_68_0/boost/asio/associated_executor.hpp:21,
                 from /usr/local/boost_1_68_0/boost/beast/core/detail/bind_handler.hpp:15,
                 from /usr/local/boost_1_68_0/boost/beast/core/bind_handler.hpp:15,
                 from /usr/local/boost_1_68_0/boost/beast/core.hpp:15,
                 from currency_converter.cpp:17:
/usr/include/x86_64-linux-gnu/sys/socket.h:126:12: note:   ‘connect’
 extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
            ^~~~~~~
In file included from /usr/local/boost_1_68_0/boost/asio/detail/socket_ops.hpp:336:0,
                 from /usr/local/boost_1_68_0/boost/asio/detail/socket_holder.hpp:20,
                 from /usr/local/boost_1_68_0/boost/asio/detail/reactive_socket_accept_op.hpp:24,
                 from /usr/local/boost_1_68_0/boost/asio/detail/reactive_socket_service.hpp:30,
                 from /usr/local/boost_1_68_0/boost/asio/basic_socket.hpp:40,
                 from /usr/local/boost_1_68_0/boost/asio/basic_socket_acceptor.hpp:20,
                 from /usr/local/boost_1_68_0/boost/asio/ip/tcp.hpp:19,
                 from currency_converter.cpp:20:
/usr/local/boost_1_68_0/boost/asio/detail/impl/socket_ops.ipp:473:5: note:   ‘boost::asio::detail::socket_ops::connect’
 int connect(socket_type s, const socket_addr_type* addr,
     ^~~~~~~

I have it on a Linux VM as well, and this is a build attempt from there.
Anyway, yeah, could someone help me with this?

@djarek So if it's hard to port code using Asio to WebAssembly since Asio doesn't support it, it should at least be possible, shouldn't it?  I can either try this or just turn my C++ code into an Addon for Node.js if that'll be easier (I just don't know where to look to figure out if I can easily port my code or not).  I'm talking about using Google's Node.js V8 engine, the same engine that powers Node.js and is written in C++.  I could try to learn to use that.  What do you think?

In theory, it should be possible to port ASIO over to WebAssembly and use Node's APIs as the backend for ASIO's implementation. However, that might prove to be very difficult and I think using Node's APIs directly is the better choice, unless you have an extensive codebase and porting your code requires more effort than porting ASIO.

Never mind, then.  I'll try to ask someone at the Node developer team when I get to it.

I'm going to ask for help here on updating my code to have it use asynchronous networking functions.  I want to call std::thread directly like I already am instead of indirectly via std::bind, though, so please help me out with that too (last time I tried it, I had errors because of the port, address and socket objects).
Do I need to change it entirely to use the asynchronous HTTP server and client examples, or is there a way to do this without having to do that?

I just changed the server code in my C++ app to the async version.  I need help on the client code, though.  I've uploaded the .cpp file my currency_converter repository on GitHub; here's the link to the .cpp file itself.
My function where I make the client request to the currency API for the conversion rates looks like this:
// This function queries the currency API after making sure
// that the stored result(s) is/are old enough
// It also makes a new query to the API if needed
const json &cache_storage::query(const std::map<std::string, std::string> &query_data, const char *accesskey, const json &sentry)
{
	auto found = m_cache.find(query_data);
	boost::beast::error_code ec;
	try
	{
		if (found == m_cache.end() || (std::chrono::steady_clock::now() - found->second.first) > m_duration)
		{
			std::string host{ "apilayer.net" }, api_endpoint{ "/api/live" },
				key{ accesskey }, source{ query_data.at(std::string("from_currency")) }, currency_param{ query_data.at(std::string("to_currency")) };
			std::string target;
			if (query_data.at(std::string("from_currency")) != "USD")
			{
				target = api_endpoint + "?access_key=" + accesskey + "&source=" + source + "&currencies=" + currency_param + "&format=1";
			}
			else
			{
				target = api_endpoint + "?access_key=" + accesskey + "&currencies=" + currency_param + "&format=1";
			}
			std::string port{ "80" };
			int version = 11;

			// The io_context is required for all IO
			boost::asio::io_context ioc;

			// These objects perform our IO
			tcp::resolver resolver{ ioc };
			tcp::socket socket{ ioc };

			// Look up the domain name
			const auto results = resolver.resolve(host, port);

			// Make the connection on the IP address we get from a lookup
			boost::asio::connect(socket, results.begin(), results.end());

			// Set up an HTTP GET request message
			http::request<http::string_body> req{ http::verb::get, target, version };
			req.set(http::field::host, host);
			req.set(http::field::content_type, "application/json");
			req.set(http::field::accept, "application/json");
			req.set(http::field::user_agent, BOOST_BEAST_VERSION_STRING);

			// Send the HTTP request to the remote host
			http::write(socket, req);

			// This buffer is used for reading and must be persisted
			boost::beast::flat_buffer buffer;

			// Declare a container to hold the response
			http::response<http::string_body> res;

			// Receive the HTTP response
			http::read(socket, buffer, res, ec);
			found = m_cache.insert_or_assign(found, query_data, std::make_pair(std::chrono::steady_clock::now(), json::parse(res.body())));
		}
		return found->second.second;
	}
	catch (const std::exception &e)
	{
		std::cerr << "Line 708: Error: " << e.what() << '\n';
	}
	catch (const boost::beast::error_code &ec)
	{
		std::cerr << "Line 712: Error: " << ec.message() << '\n';
	}
	return sentry;
}

I need to know how to convert this to the client version correctly.  I noticed that the request and response stuff is done in the session class, so I want to ask: will it be okay to put the code for checking whether the query I want to make has already been made, and to make a new one if it's not inside the map or if the one in there is an hour old, inside the session class somewhere?  What should I for this?  I'm thinking that the client code may also need to be async for the app to work better as a C++ Addon for Node.

Hmm...you're supposed to already know how to use Asio, especially the asynchronous parts. This is stated in the documentation:
https://www.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/introduction.html#beast.introduction.requirements
You would probably make faster overall progress if you paused your work on this beast program, and instead focus your energies on learning Asio's asynchronous interfaces. Then once you have mastered that, you should be able to answer the questions you have asked here, and you can apply that knowledge to your beast programs.


es6 class inheritance

It would be great if noble-device can be used with es6 features such as classes and promises

Hi @maxnowack,
Do you think this would be a breaking change, and force users to upgrade to a newer Node.js version?
Feel free to submit a PR with a proposal to get the discussion started ...

I don't think that this will be a breaking change. Basically we have to move the prototype changes from the inherit util directly to the NobleDevice prototype.
Is there a reason why the changes are currently done in this way?

Ah, these are static, not prototype methods. I'll submit a PR ;)

Closing this for now, please open a PR to continue the discussion.


Readme has wrong examples-build-properties description

The description of examples-build-properties in the readme does not explain format of the configuration and the example makes no sense. Looks like the example was copy-pasted from examples-exclude.

The EXAMPLES_BUILD_PROPERTIES is printed without the first {
https://github.com/ArminJo/arduino-test-compile/blob/3e6885559e60747266c85c396584d696cba6da5b/arduino-test-compile.sh#L190

THANKS,
readme is fixed.

also the json is not parsed correctly, use jq instead of regex.

what means "not correctly", it works for all my tests.

The EXAMPLES_BUILD_PROPERTIES is printed without the first {
is fixed

You can not specify a yaml object as argument to the action as it is suggested by the updated readme:
Your workflow file was invalid: The pipeline is not valid. .github/workflows/push.yml (Line: 40, Col: 13): A mapping was not expected

https://github.com/Legion2/CorsairLightingProtocol/runs/543092637?check_suite_focus=true#step:4:99 here is the output of my workflow and the first { is not printed

It also happens in your workflow https://github.com/ArminJo/Arduino-RobotCar/runs/542840082?check_suite_focus=true#step:3:112

The trailing { was fixed a few mitutes ago
https://github.com/ArminJo/Github-Actions/runs/543130754?check_suite_focus=true#step:4:93

You can not specify a yaml object as argument to the action as it is suggested by the updated readme:
Your workflow file was invalid: The pipeline is not valid. .github/workflows/push.yml (Line: 40, Col: 13): A mapping was not expected

Can you be more specific?

I tried the examples-build-properties syntax as described in the readme:
examples-build-properties:
 WhistleSwitch:
    -DDEBUG
    -DFREQUENCY_RANGE_LOW
  SimpleFrequencyDetector:
    -DINFO

https://github.com/Legion2/CorsairLightingProtocol/blob/f6ba148ba2efea0ac8030bb91e6a657601f9a403/.github/workflows/push.yml#L39-L46
and got the error
https://github.com/Legion2/CorsairLightingProtocol/runs/543117357?check_suite_focus=true

I seems, that directly specifying at with: is not possible.
in the readme there is:
examples-build-properties: ${{ toJson(matrix.examples-build-properties) }}
or it is specified in the include section.
        include:
...
            examples-build-properties:
              WhistleSwitch:
                -DDEBUG
                -DTRACE

I found no way to specify it directly 👎

I found it :-)
Use escaped double quotes.
examples-build-properties: "{ \"WhistleSwitch\": \"-DDEBUG -DFREQUENCY_RANGE_LOW\", \"SimpleFrequencyDetector\": \"-DINFO\" }"

I used singe quotes and then it worked:
examples-build-properties: '{"DebugSketch": "-DDEBUG -DVERBOSE -DPRINT_COMMAND=true -DPRINT_RESPONSE=true -DPRINT_LOOP=true -DPRINT_UPDATE=true"}'

https://github.com/Legion2/CorsairLightingProtocol/blob/arduino-test-compile/.github/workflows/push.yml#L39

can you update the readme, because the current example syntax does not work

What exactly is wrong?

When applying the configuration as shown in the readme directly in the with: section of the action it won't work:

But the readme doesn't tell you that. It should contain information about the json format used to encode this information.

Now I see

Thanks! I hope it is clearer now.


Support for container adapters

It would be great if the macro had support for container adapters std::stack, std::queue and std::priority_queue assuming these weren't left out for some specific reasons

Sounds good. They were not left out for some specific reason.


Remove the PSSession when finished using it?

From the doc [Connect to Exchange Online PowerShell using multi-factor authentication](https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps) we can connect to the Exchange Online with command:
Connect-EXOPSSession
Or
Connect-EXOPSSession -Credential $cred
I found that a session has been imported after connecting to the Exchange Online, you can get it by cmdet Get-PSSession and it will return:
Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability

1 WinRM1          outlook.offi... RemoteMachine   Opened        Microsoft.Exchange       Available
So I have a question here, once we finished to use it need we remove the session manually by cmdlet Remove-PSSession? As I know, there are session limitations for connecting to Exchange Online?
Another question is that when I using cmdlet:
Connect-EXOPSSession -Credential $cred
to connect Exchange online, it will use the credentials in $cred for authenticating. It is still modern authentication, right? From Fiddler I saw it called lohgin.windows.net.
Thanks
-Justin

@officedocsbot assign @yogkumgit

@Justin-Shi Thank you for your feedback.

We have a note in the document now which exactly talks about disconnecting the session and the PS cmdlet to run to disconnect (Get-PSSession | Remove-PSSession).

This is still modern Authentication and This module doesn't work with basic auth.

Thanks again for your feedback.
Sri

@msbemba  Thank you very much for the contribution and sharing this explanation. @Justin-Shi
Hope this comment is helpful for you. If you see a documentation update is required, please feel free to open an issue for the same. We proceed here to close it. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.


API: allow rechunk to evenly split into N chunks

What does this PR implement?
The ability to find the chunksize to evenly chunk an array. For example, say I want to split my array of length 1010 into about 20 chunks. What chunk size is best for that? And what if I want don't mind if I have 19 or 21 chunks?
References issues/PRs
This PR is motivated by https://github.com/dask/dask-blog/pull/66, which is running a comparison benchmark at https://github.com/stsievert/dask-hyperband-comparison/pull/3.
When following a modification of Dask-ML's HyperbandSearchCV docs, I have this code:
>>> n_params = 75
>>> n_epochs = 200
>>> n_chunks = n_epochs / n_params

I would like to chunk two NumPy training arrays of length 45,000 into n_chunks evenly sized chunks, or close to it. This PR provides the implementation to find the chunk size that's best (number of chunks close to n_chunks, and they're all equally sized):
>>> y_train = np.random.uniform(size=45_000)
>>> chunksize = da.even_chunksize(len(y_train), n_epochs / n_params)
>>> y_train2 = da.from_array(y_train, chunks=chunksize)
>>> y_train2.chunks
((22500, 22500, 15000),)

[x] Tests added / passed
[x] Passes black dask / flake8 dask

Hrm, this is close enough to something like x = x.rechunk() that I would be inclined to see if something like that would work for your use case.  If we do go in this direction we'll have to figure out an API and semantics that make sense for multiple dimensions.
Do you have a strong need to specify the exact number of chunks, or would something like x = x.rechunk("100 MiB") work?

Do you have a strong need to specify the exact number of chunks?

Yes. I slightly reformulated HyperbandSearchCV's rule-of-thumb. Now, it recommends a floating point number of chunks; in the benchmark I'm running for https://github.com/dask/dask-blog/pull/66, 2.666 chunks are recommended. The new rule-of-thumb avoids the user modifying HyperbandSearchCV's input parameters to make sure the input arrays chunk evenly.*

this is close enough to something like x = x.rechunk()

I think X.rechunk(n_chunks=(3, -1)) is a better API for a 2D array X to have 3 chunks in the 1st dimension and no chunks in the second dimension. I'll push that change.
* The HyperbandSearchCV example say "Approximately 300 parameters were desired; 299 was chosen to make the Dask array chunk evenly" in a footnote.

It seems like there are two policies for how to split:

Use a provided chunksize to start, and then leave any extra dangling off the end, like (100, 100, 20)
Try to get even chunk sizes like (110, 110)

And there are two ways to specify roughly the size of chunk that we want

A size in bytes, like "10 MiB"
A number of chunks, like 100

It feels slightly unclean to correlate these two "Oh hey, if you want even chunk sizes then make sure to use the n_chunks keyword, but if you want to have rigid chunk sizes with some extra overlap, then specify a number of bytes".  These two things seem unrelated to me.  I think that instead we should consider how to handle this more generally.  It would be good to get some other array computing folks in on this conversation (@rabernat @jakirkham  maybe?)
@stsievert if you're in a rush with this you might also consider pushing this into dask-ml, where we don't have to be quite as rigorous as in dask-array.

What happens if one encounters a number that is just not evenly divisible (like 7)?

It feels slightly unclean to correlate these two [chunk size and if chunk size is even across chunks]

Would replacing n_chunks with a flag to balance the sizes of the chunks resolve this issue?
>>> x = np.arange(220)
>>> y = da.from_array(x).rechunk(chunks=100, approx=True)
>>> y.chunks
(110, 110)

This would also resolve my issue in the Hyperband use case.

What happens if one encounters a number that is just not evenly divisible (like 7)?

You mean if the length of the Dask Array is 7? I just pushed a change that will do the following:
>>> y = da.from_array(np.arange(7)).rechunk(n_chunks=2)
>>> y.chunks
((4, 3),)

Larger prime numbers like 2129 have this behavior:
>>> da.from_array(np.arange(2129)).rechunk(n_chunks=7).chunks
((305, 305, 305, 305, 305, 305, 299),)

I've pushed an example of what I think @mrocklin means in https://github.com/dask/dask/pull/6420#issuecomment-661247275. It's still rough. But now this test passes:
def test_balance_basics():
    x = da.from_array(np.arange(220))
    balanced = x.rechunk(chunks=100, balance=True)
    unbalanced = x.rechunk(chunks=100, balance=False)
    assert unbalanced.chunks[0] == (100, 100, 20)
    assert balanced.chunks[0] == (110, 110)

I haven't looked at this yet, but in general I like the idea of a balance= keyword. This is on my TODO list for tomorrow.  Sorry for the delay.

I've simplified the implementation significantly. The tests still pass without modification. Now, I have this docstring:

balance : bool, default=False
If True, try to make each chunk to be the same size.
Reduce the number of chunks by one if there will be any small leftover chunks.  This allows using x.rechunk(chunks=len(x) // N, balance=True) to split into N chunks even if there are leftover small chunks.

I think I could make this change because I specify a threshold for "small chunk sizes" and I have modified the signatures for my new function _balance_chunksizes. Now the input and output are a tuple of chunk sizes.
Thanks for the suggestion @mrocklin; now the code is much simpler.

It seems like this is ready for a merge. Can you confirm @stsievert? @mrocklin in case you have any last comments.

It's definitely ready for another review. From my POV, it's also ready for merge.

From my POV, it's also ready for merge.

I agree. I don't really see what the harm is in merging it since it's an isolated change.

I'm going to merge this unless there are any dissenters.


[CORS] Normalize internationalized domain names when adding to CORS

Follow up to https://github.com/aspnet/CORS/pull/170. CorsPolicyBuilder should normalize IDNs to use punycode. This would match the format browsers send for IDN urls.

cc @mkArtakMSFT for triage

@blowdart, what are your thoughts regarding this? Do you think this is something we should try and take in 2.2 or is this something we can postpone?

It's a good idea, where would you normalize though? Would you allow people to add unicode domains when configuring cors server side, then change it internally on add?

I'll let @javiercn and/or @pranavkm to answer that question.

Would you allow people to add unicode domains when configuring cors server side, then change it internally on add?

Yup. We got a PR to do some normalization \ lower case the input URI as part of the policy builder. Presumably we would do something similar here.

Seems like a good idea to me. I have no preference for 2.2 or later.

@pranavkm We should be careful here. URIs are case sensitive and we shouldn't normalize them or treat them in a case insensitive way.
When the URI is puny code, don't we "un puny code it " before it gets to us?

Domains are not case sensitive.
In this case the value comes from the origin header, not the host header, so it's still encoded.


Endpoint for checking username availability isn't working anymore

Hey the endpoint used for checking username availability (https://cdn.syndication.twitter.com/timeline/profile.json) isn't working anymore, from what i've seen in the code i assume this endpoint wasn't rate limited, i'd like to ask if you know of any other endpoint similar to this one that allows to check usernames availability without getting IP rate limited, thanks.

What is your telegram or discord crime?


[5.2] Validation performance optimisation

The use case for testing performance is that I'm uploading a large excel file, convert it to array, validate the array before saving into the database.
The array looks like:
array:7 [
  "products" => array:257 []
  "product-sizes" => array:257 []
  "product-size-ingredients" => array:1142 []
]

Inside the validator we flatten the data to the dot.format and iterate over the results in multiple areas in the code, like in the validateDistinct, validateArray, and initializeAttributeOnData.
The issue here is that we hit all the flattened records even the ones that don't belong to the attribute we're checking, and this is causing a huge performance issue.
This PR grabs only the required attribute values before flattening them with Arr::dot, so based on the example above if I'm validating products.code is distinct I'll only iterate over products only, not the whole data.

Sometimes the data is nested:
Validator::make(
    [
        'foo' => [
            'bar' => [['baz' =>1], ['baz' =>2]],
            'cc'
        ],
        'bb'
    ],
    ['foo.bar.*.baz' => 'distinct']
);

Here we only need to flatten $data['foo']['bar'] for the check, and Arr::only was only working for single dimensional arrays, so I modified Arr::only to accept dot-keys and used the explicit part of the attribute name foo.bar to get only this data before passing it to Arr:dot.

UPDATE:
The Arr::only method was left untouched, and a new method was added to the Validator extractData().

I'm not sure it's a safe idea to bring dot notation in Arr::only.

Currently Arr class makes use of data_*() helper only in Arr::pluck, and I think it would be better to not bring in more.
Somehow related: #12626.

To be more consistent your Arr::only should use Arr::get/has instead, but precisely because of the #12626 above I'm not sure that would work.
I think the best solution might be to not touch Arr::only and add a new protected method in Validator for this.

Well giving it a deep thought I find the new addition to array_only is quite useful, maybe the method itself can be left alone but it'd be nice to have another method that outputs an array of only the keys you need using dot notation.
I'm thinking of API response for example, maybe you want to present ['parent'] and ['other_parent']['child1'] only for example.

Indeed it would be useful, I only say I think this goes outside of the scope of Arr.
Just some idea for later, creating some new class Illuminate\Support\Data, and moving into it all the heavy, "swiss-knife" functions, namely data_get/set() to begin with. These functions are a fundamental part of the framework and are presented as simple helpers, it looks a bit wrong to me.

I see, maybe a Data::only() method in that class instead of Arr::only(). Let's see what Taylor thinks of the matter.

@vlakoff updates were made. Thanks for the notes.

Because of the getExplicitAddress's just above in Validator, there could not be *, but there could be dots.

Would it be possible for people to bypass validation by passing missing as their value? Could that possibly be exploited in any way?

What did the before / after benchmarks look like on this?

@taylorotwell If the value passed was __missing__ the end result of extractData() will be an empty array. I believe an empty array of data is not harmful, maybe we should leave the value as null instead of __missing__.

@taylorotwell doing a very basic benchmarking, applying the distinct rule on 1,656 array items exceeded 30 seconds of execution. Applying the change and only passing the data the rule needs dropped it to 8 seconds.
The test is on an array that looks like:
array:7 [
  "products" => array:257 []
  "product-sizes" => array:257 []
  "product-size-ingredients" => array:1142 []
]

The rules are:
[
    'products.*.id' => 'required|distinct',
    'product-sizes.*.id' => 'required|distinct',
]

The difference in execution time is that before we pass all the data to the distinct rule to check for only the ones we need:
 $data = Arr::where(Arr::dot($this->data), function ($key) use ($attribute, $attributeName) {
            return $key != $attribute && Str::is($attributeName, $key);
        });

The change is:
$attributeData = $this->extractData($explicitAddress);
        $data = Arr::where(Arr::dot($attributeData), function ($key) use ($attribute, $attributeName) {
            return $key != $attribute && Str::is($attributeName, $key);
        });

Here extractData will only bring products when validating for products, and product-sizes when checking for product sizes. product-size-ingredients will never be passed to the validator method because we don't need it.

Just as a suggestion, how about this:
protected function extractData($attribute)
{
    static $missing;
    $missing || $missing = random_bytes(64);

    $results = [];

    $value = Arr::get($this->data, $attribute, $missing);

    if ($value != $missing) {
        Arr::set($results, $attribute, $value);
    }

    return $results;
}


Restore "Tips for efficient configuration" in Zowe v2 docs

In the Zowe v1 docs, we included "Tips for efficient configuration" in our article about team config (in technical preview at the time):
https://docs.zowe.org/v1.28.x/user-guide/cli-using-global-profile-configuration/#tips-for-efficient-configuration
These tips included "Command option order of precedence" and "Tips for using the base profile".
This information, particularly the list of the CLI's order of precedence, is still useful info for Zowe v2, but I can't find it in our docs anymore:

Explicit command-line option values
Environment variables
Service type profiles
Base type profiles
Default option value

@t1m0thyj -- There's a How command preference works article now. Is this what you're looking for? There's also How Zowe CLI uses configurations, which seems to cover the same or similar topic.
Should we edit this content in any way? Add more content? Restore content? Please le me know.

Thanks, not sure why I had trouble finding this - maybe I was dumb or it was related to indexing problems we had with the docs-site until recently 😅
The tips for "Command option order of precedence" are present in the article you linked 👍 Also I found similar content to "Tips for using the base profile" here so I think this is good to close 😸


Fix for passing dot as splitcharacter to RegExp constructor

Issue:
When the locale of the DatePickerInput component is set to "de" (German), the functionality to add an automatic date separator ("." in the case of the German locale) is broken. Instead of appending a dot to the first two characters entered, the input gets changed to a single dot. Subsequently, any numbers entered are concatenated without the proper separator.
Solution:
I found the usage of the RegExp constructor to create regular expressions. One of the supported date separator is . (dd.mm.yyyy). The dot character is a metacharacter in regular expressions which needs to be escaped if it is being passed into the RegExp constructor. In this code block, it was not escaped. Hence the code
new RegExp('.', 'g')

yielded a different regex than the expected one.
Fixes DatePickerInput component breaks automatic date separator when setting locale to "de"

@pragatheeswarans I'm don't fully understand of what is going on but LGTM!


data_snapshot-GOCI-2181.py needs to be put under version control and migrated to codon

See https://docs.google.com/document/d/1w1AZl0rZtYMhvf2pqc3LVeeYfCYrJxj2gmEFcqKhwUg/edit# for more details. This script runs weekly, but is not under version control. We should add it to the gwas-utils repo and set up a the crontab on codon to schedule it.

Strong dependency on database and secrets stored on filesystem.

Refactoring and placing in gwas-utils

It does work but in a fundamentally unportable way, in that it appends to a file that lives on the filesystem. Will migrate that file for now, but this could be rewritten in future so that it can be run from anywhere (ideally using the curation API)

Cron setup on for spotbot on codon - confirm working at next scheduled execution

@earlEBI Please could you let me know if this is working correctly - the next run will be on Sunday. I have deactivated the current (old) implementation and activated the new one.

@jdhayhurst yes, I received both data release and curation snapshot emails on Sunday as usual, thank you


QnAMaker middleware lacks the Middleware suffix (vs LuisRecognizerMiddleware)

Users are looking for consistency in naming to help develop and help guide development of their own middleware.

+1
Do you have opinions how how we should names these things? It seems cumbersome to continually add "Middleware" to everything, I think the price is worth the cost, as having "Middleware" makes it very obvious what's going on and (at least in .Net) the additional typing is worth is.
On the other had, we could be more specific:

ReceiveMiddleware
SendMiddleware
[...]

My inclination is just to use "Middlware" as the suffix. 👍

I agree @cleemullins. I think adding the suffix Middleware is better than without.
This also seems to fall in line with Microsoft's other documentation on implementing common types. https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces


Psuedoclasses don't mix well with unsafeChild

I have the following ScalaCSS.  I'm trying to change the style of 'inner' when 'outerStyle' is hovered on.
  val outerStyle = style(
    cursor.none,

    &.hover(
      cursor.pointer,
      unsafeChild("inner") {
        display.block
      }
    )
  )

// I thought this would generate:
  .outerStyle {
    cursor: none;
  }

  .outerStyle:hover {
    cursor: pointer;
  }

  .outerStyle:hover .inner {
    display: block;
  }

// But instead it generates the hover on the .innner:
  .outerStyle {
    cursor: none;
  }

  .outerStyle:hover .inner {
    cursor: pointer;
  }

  // Note the hover is moved onto the .inner unsafeChild instead of on .outerStyle
  .outerStyle .inner:hover {
    display: block;
  }

What's interesting is the cursor style does get applied in the right place.  The same hover condition is treated differently whether there is a unsafeChild mixed in.

https://github.com/AVSystem/scalacss/commit/5328dbb815922fadb3cdd127bc13b9e6caf8f27e - probably it's solution of described problem.

#68 fixes this


How to set padding/margin or any space between y-axis lines.

I want to set padding b/w y-axis lines. I tried with chart scale but not working well. Can anyone help me on this.
I am attaching an image for your reference of what i required

@benmccann
My stack overflow question
https://stackoverflow.com/questions/62196748/how-to-add-padding-space-b-w-y-axis-lines-in-line-charts-using-charts-js-lib


Add a mini contribution guide

I dare anyone to not find typos in this new README.rst

Looks good to me.

After checks pass, I'm merging this ;)


Add error handling for transients

We got this error:
PHP Fatal error:  Uncaught SoapFault exception: [HTTP] Error Fetching http headers in rvrn/etap-mailchimp.php:37 Stack trace:
thrown in rvrn/etap-mailchimp.php on line 37
Null message body; hope that's ok
And this is even right after checking for soap errors. So add another try/catch wrapper for this error condition.

This is a fine example of your work.


match2-cancel in processFlows

I have included the match2-cancel in processFlows and I'm adding the restrictions for who can trigger the process now - Please have a look from line 2008 where I have attempted to add restrictions showing that only MemberA or MemberB can trigger the Match2 moving to cancelled state.

I have a question how to include this restriction on DemandA and DemandB - would we want to ad d a restriction that either of the members can move the demands to the cancelled state?

I have made the change as discussed above.
My other issue is about cancelling the demands - I presume we also want to restrict who can do that. Please have a look at 1708-1728 and 1868-1887 where I have tried to include such restrictions for the demands.


refactor: expose swagger UI to enable OAuth2 try-it-out in upstream applications

Summary
This is a Proof-of-Concept to attempt a fix to some issues in an upstream repository (konnect-portal). The issue is that for client-side-only OIDC "Try It Out" authorization, one needs to be able to initialize oauth with certain values available.
More info!
For SPA-based requests to the /authorize endpoint, one needs to invoke the following (where swaggerUI is an instance that has already been initialized.
swaggerUI.initOAuth({
          usePkceWithAuthorizationCodeGrant: true,
          additionalQueryStringParams: {
            nonce: Math.random().toString(36).substring(7)
          }
        })

Rather than initializing that within spec-renderer (really within swagger-ui-web-component), I think the better move is to allow more flexibility and to expose #instance so that folks can call it from the consuming application.
Open to differing opinions, this is just how we got things working for our use case: https://gist.github.com/andrewwylde/d47c94c7629a81a0232ac80ef862e788

@andrewwylde can you add your team to the CODEOWNERS for this package? https://github.com/Kong/public-ui-components/blob/57142b2efffa5ef98fe3383489b95b96a7b7101d/CODEOWNERS#L40

@andrewwylde can you add your team to the CODEOWNERS for this package?
https://github.com/Kong/public-ui-components/blob/57142b2efffa5ef98fe3383489b95b96a7b7101d/CODEOWNERS#L40

https://github.com/Kong/public-ui-components/pull/1266


training details

Hi,nice work，sorry to bother you, I am very interest in your work.  would you share more training details for me? such as lr, bs, loss function & loss tricks，epoch or max iteration and some  other training tricks you think important, most of all， how is the training data organized, what augment have been made to the data set? My e-mail is<EMAIL_ADDRESS>Looking forward your early reply!   THX!!!

Hi,  I'm interested in your work too. Would you share the training details and the organization for training  dataset for me? My e-mail is<EMAIL_ADDRESS> I'm looking forward your early reply!

hi, I'm interested in your work too. Would you share the train code? My e-mail is<EMAIL_ADDRESS>Looking forward your early reply,thanks.

hi, I'm interested in your work too. Would you share the train code? My e-mail is<EMAIL_ADDRESS>Looking forward your early reply,thanks.

Do you have the interest of reproducing it together with me ? my QQ is<PHONE_NUMBER>..

Hi, I'm interested in your work too. Would you share the training details and the organization for training dataset for me? My e-mail is<EMAIL_ADDRESS>I'm looking forward your early reply!

Have you reproduced this paper? I hope someone can discuss VSOD with me .. my QQ is<PHONE_NUMBER>


steamPackages: make customisable

Motivation for this change
I wanted to use steamPackages.steam-runtime with a newer src while using the rest of my current packages and without another local Nixpkgs checkout.
Things done
steamPackages is now a package scope via lib.makeScopeWithSplicing. The source was already rather in a customisable shape, so that made things easier.
Additionally, the argument steamPackagesAttr is now exposed and used as .${steamPackagesAttr} where .steamPackages was previously used hardcoded (in the value expression for steam-runtime-wrapped-i386).

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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 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

[x] Fits CONTRIBUTING.md.

Amazing!
Are there comprehensive docs of what you did and why somewhere?


Add API route to get all the matches

There is not an api enpoint to retrieve a list of all matches, (or a selection of them), only matches from events.

This will get added, but, out of curiosity, what are you planning on doing with this data?

Added in commit fcf3133994a6cdd67bc34a82236e4d730a00b854


Fix log filteris for IP conditions.

Our log filter mechanism for IP addresses was broken. This fixes the
matching mechanism so it compares IP addresses with log fields
correctly.
Fixes #6405

The LogFilterIP::is_match mechanism stopped working at some point in the past. That is what the linked issue observes.  I fixed this by addressing the warning in the comment that was in that function:
    // This is bad, we abuse the fact that the initial layout of LogFieldIpStorage and IpAddr
    // are identical. We should look at converting the log stuff to use IpAddr directly.

Those structures have diverged such that they do not match between each other anymore. I thus converted the use of LogFieldIp* types to IpAddr. @SolidWallOfCode : you wrote that code (and the comment) initially. Can you please verify that what I'm doing here is what you had in mind?

This is a bit ambitious for fixing this bug. Converting the logging code to IpAddr can be a separate PR. I'll close this PR for now and simply convert to IpAddr in the LogFilterIP code.


Creds provider

Pull Request check-list
Please make sure to review and check all of these items:

[ ] Does $ tox pass with this change (including linting)?
[ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
[ ] Is the new or changed code fully tested?
[ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
[ ] Is there an example added to the examples folder (if applicable)?
[ ] Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Please provide a description of the change here.

Codecov Report

Merging #16 (441a4a8) into master (2cea637) will decrease coverage by 13.02%.
The diff coverage is 94.92%.

:exclamation: Current head 441a4a8 differs from pull request most recent head 5e27e1f. Consider uploading reports for the commit 5e27e1f to get more accurate results

@@             Coverage Diff             @@
##           master      #16       +/-   ##
===========================================
- Coverage   92.20%   79.17%   -13.03%
===========================================
  Files         111      113        +2
  Lines       28751    28865      +114
===========================================
- Hits        26509    22854     -3655
- Misses       2242     6011     +3769

Impacted Files
Coverage Δ

redis/client.py
88.41% <ø> (-0.65%)
:arrow_down:

redis/cluster.py
18.81% <ø> (-71.04%)
:arrow_down:

redis/connection.py
86.44% <83.33%> (-0.47%)
:arrow_down:

redis/credentials.py
89.28% <89.28%> (ø)

tests/test_credentials.py
96.29% <96.29%> (ø)

redis/__init__.py
90.90% <100.00%> (+0.43%)
:arrow_up:

redis/commands/bf/commands.py
98.37% <100.00%> (ø)

redis/commands/core.py
82.00% <100.00%> (-0.11%)
:arrow_down:

tests/test_asyncio/test_bloom.py
99.57% <100.00%> (ø)

tests/test_asyncio/test_commands.py
98.39% <100.00%> (+<0.01%)
:arrow_up:

... and 23 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Make quotes consistent

Related: https://github.com/denoland/deno-gfm/pull/66, https://github.com/denoland/dotland/pull/2755.


VS Code launch.config to debug single test spec

In the documentation for debugging with vscode, add a suggested vscode launch.json config that allows you to only run/debug the open test spec.
Adding ${relativeFile} as an arg means vscode will only run the open spec file - this would be a common scenario when debugging tests, rather than waiting for all other tests to run before your debugger reaches the test that you are trying to debug.

Not stale


issue with getting token

Hi, I'm using a Redmi Note 13 Pro + that comes with MIUI 14, I followed the process in readme and after running mitool and logging in, I got this:

Tried with or without a cable connected to a PC, tried with both universal and ARM64 versions, got the same result.
Seems like the unlocking is not proceeding because of this, and I'm not sure what to do.
Settings in dev options:

I did install the api app.
My purpose was to unlock the bootloader, and I opened the Termux app in system, so I'm not under fastboot.
After getting {"R":"","S":"OK"} and pasting the link, account_info.txt was updated with wb_value, but missing token or product, I assumed the message I got was from line 143 of un-lock.py, and I think maybe it got stuck inside check_mode() since nothing more gets printed to the console...

the region in the account is an EU country - maybe it is EU all along in the response.
product yes, token no.
and if it's the same mechanism of fastboot getvar, I printed all var before (seen below), and no token could be found.
getvar all.txt
saw a tutorial of another tool saying one must add account in developer options for their tool to work - I'm getting that's for getting token, but as shown in previous screenshot, Xiaomi is not letting ppl do that.
I tried to make a complaint to the customer services, but honestly am not keeping a high hope.

Amazing...I heard of the server thing, just didn't expect that they're only shutting specific areas.
I don't think the server would be "repaired", like I hinted before Xiaomi was doing it on purpose - from what I read, the notification has been like that since November 2023.
I'll try to see if I can make another account.
adb reboot bootloader for this model would still go straight into fastboot, and adb reboot fastboot would go in fastbootD, well... :)


python311Packages.lnkparse3: 1.3.3 -> 1.4.0

Diff: https://github.com/Matmaus/LnkParse3/compare/refs/tags/v1.3.3...v1.4.0
Changelog: https://github.com/Matmaus/LnkParse3/blob/1.4.0/CHANGELOG.md
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 297380 run on x86_64-linux 1

6 packages built:

donpapi
donpapi.dist
python311Packages.lnkparse3
python311Packages.lnkparse3.dist
python312Packages.lnkparse3
python312Packages.lnkparse3.dist


Unhandled Exception: AVPlayerItem.Status.failed

Using audioplayers package in a flutter app throws an exception on IPad Pro (4th gen) IOS 15.5.
The audio playing is normal at first. After a few times playing from a source, audio stops playing and the following exception gets thrown.
Exception
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: AVPlayerItem.Status.failed
#0      MethodChannelAudioplayersPlatform._doHandlePlatformCall (package:audioplayers_platform_interface/method_channel_audioplayers_platform.dart:174)
#1      MethodChannelAudioplayersPlatform.platformCallHandler (package:audioplayers_platform_interface/method_channel_audioplayers_platform.dart:147)
#2      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:404)
#3      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:397)
#4      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:380)
#5      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:377)
#6      _invoke2.<anonymous closure> (dart:ui/hooks.dart:190)
#7      _rootRun (dart:async/zone.dart:1426)

Versions
- audioplayers: ^1.0.1
- Dart 2.17.5
- Flutter 3.0.4

Everything works just fine on my android devices.
Flutter code used to play the sounds
class SoundPlayer {
  final _audioPlayer = AudioPlayer();

  void playSound(AudioPlayEnum audioPlay) {
    if (audioPlay == AudioPlayEnum.correct) {
      _audioPlayer.play(AssetSource('sounds/correct.mp3'), volume: 1.0);
    }

    if (audioPlay == AudioPlayEnum.wrong) {
      _audioPlayer.play(AssetSource('sounds/wrong.mp3'), volume: 1.0);
    }

    if (audioPlay == AudioPlayEnum.select) {
      _audioPlayer.play(AssetSource('sounds/select.mp3'), volume: 1.0);
    }
  }
}

+1
Happens when running an app on a Simulator. Latest Xcode.

I wonder if there's any feedback on this bug?

+1
Happens when running an app on a Simulator. Latest Xcode, latest Flutter stable channel.

Have you checked with physical devices, also which platform?

I didn't check with a physical device yet. The platform is macOS Monterey x64.

It also happens on a physical device (audioplayers: ^1.0.1 / iPhone 12 mini)

same here
audioplayers: 1.0.1, iPhone 13 Pro(iOS 15.5)

@AriDevC seems to be happening on real devices…

I think it will be fixed this problem use with playerId.
final player = AudioPlayer(playerId: "test");
player.play(file);

same problem here

This happens when the file doesn't exist.
final file = 'file:///Users/tmp/asdf.m4a'
final player = AudioPlayer(playerId: "test");
if (File(source).existsSync()) {
   player.play(file);
}else{
   print('file not exists');
}

I'm having the same issue with IOS - Running on android studio chipmunk 2021.2.1 Patch 1, iPhone 11 Pro Simulator, Flutter 2.10.5 (stable).
Attempting to play an audio file from firebase storage URL. Works fine on Android simulators.

Hey community, can you help out with a Pull Request here? It's easier than you think. We are lacking of ios / mac devices :)

Is anyone working on this? Can I go for it?

I can't replicate this. Using Flutter 3.0.5, iOs 16.0, Dart 2.17.6. I'm downloading iOs 15.5 and I'll see if I can replicate that

Any update on this @lucagonzalez ?

any updates?

same error, any update?

+10

I published an app to the app store back then with this bug. All the sounds in the app worked just fine. So I think you guys don't have to worry much until it's fixed.

I published an app to the app store back then with this bug. All the sounds in the app worked just fine. So I think you guys don't have to worry much until it's fixed.

For me, I've noticed that the official example was working on my Mac while my code wasn't, as per https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#unsafe-http-when-playing-remote-urls, I added necessory entry in Info.plist as well, but it still didn't make any progress
So I created a new empty project and decided to compare my code with the offcial code manually, finally, I found that the following files of the offcial example has one more entry than mine: macos/Runner/Release.entitlements, macos/Runner/Release.entitlements
By adding following lines in both file:
		<key>com.apple.security.network.client</key>
		<true/>

the issue finally gets solved
also worth noticing is that you have to provide correct url to play, if the url is incorrect, will encounter the same error
https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#other-errors-when-playing-remote-urls

For me, I've noticed that the official example was working on my Mac while my code wasn't, as per https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#unsafe-http-when-playing-remote-urls, I added necessory entry in Info.plist as well, but it still didn't make any progress So I created a new empty project and decided to compare my code with the offcial code manually, finally, I found that the following files of the offcial example has one more entry than mine: macos/Runner/Release.entitlements, macos/Runner/Release.entitlements By adding following lines in both file:
		<key>com.apple.security.network.client</key>
		<true/>

the issue finally gets solved
also worth noticing is that you have to provide correct url to play, if the url is incorrect, will encounter the same error https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md#other-errors-when-playing-remote-urls
UPDATE: iOS: just add following into ios/Runner/Info.plist:
		<key>NSAppTransportSecurity</key>
		<dict>
			<!--Include to allow all connections (DANGER)-->
			<key>NSAllowsArbitraryLoads</key>
			<true/>
		</dict>

I was hopeful, but unfortunately, this didn't fix the issue for me. It's very odd that this package worked just fine a couple of months ago.
I confirm the file exists on the device - _recordingFilePath: /var/mobile/Containers/Data/Application/48712F32-4D83-48AE-A971-6C1C1D531A55/Documents/goalAudio.aac
But then when it goes to play the file with the same file path I get flutter: Unexpected platform error: AVPlayerItem.Status.failed
On iOS only which makes me think it's some kind of permission issue?

I have been trying to figure out why I have been getting this error for a few months now when trying to play certain Asset files on my iPhone 8 (works fine on Android).
flutter: Unexpected platform error: AVPlayerItem.Status.failed

For me it only happened on one or two of my audio files, but not the rest. The only difference between them was that the ones that worked were .wav files, which I created and exported from Audacity, and the ones that didn't work were .mp3 file, which I got from a coworker who sent them from his phone over Discord.
I finally realized that the original audio files that my coworker had sent me were actually .m4a file extension, but when I downloaded them from Discord it "converted"  them to .mp3 which must have somehow corrupted them or something. Even other audio processing software wouldn't open up the converted .mp3 files.
Ultimately I fixed the problem by removing the .mp3 files from the project, and having my coworker AirDrop the original audio files to me, which preserved the .m4a extension. When I added these to the project and played the asset with the correct file extension it worked like a charm.
  final audioPlayer = AudioPlayer();
  audioPlayer.setSourceAsset('audio/sound_effect.m4a');
  audioPlayer.resume();

I'm not sure if this is what other people are dealing with, but it finally fixed the issue for me. If you are getting your audio from the internet somehow, check and make sure then the download process isn't changing the file extension.

I have been trying to figure out why I have been getting this error for a few months now when trying to play certain Asset files on my iPhone 8 (works fine on Android).
flutter: Unexpected platform error: AVPlayerItem.Status.failed

For me it only happened on one or two of my audio files, but not the rest. The only difference between them was that the ones that worked were .wav files, which I created and exported from Audacity, and the ones that didn't work were .mp3 file, which I got from a coworker who sent them from his phone over Discord.
I finally realized that the original audio files that my coworker had sent me were actually .m4a file extension, but when I downloaded them from Discord it "converted" them to .mp3 which must have somehow corrupted them or something. Even other audio processing software wouldn't open up the converted .mp3 files.
Ultimately I fixed the problem by removing the .mp3 files from the project, and having my coworker AirDrop the original audio files to me, which preserved the .m4a extension. When I added these to the project and played the asset with the correct file extension it worked like a charm.
  final audioPlayer = AudioPlayer();
  audioPlayer.setSourceAsset('audio/sound_effect.m4a');
  audioPlayer.resume();

I'm not sure if this is what other people are dealing with, but it finally fixed the issue for me. If you are getting your audio from the internet somehow, check and make sure then the download process isn't changing the file extension.

Unfortunately, I tried all different file extension types. The only thing that worked for me was having to switch to the flutter_sound package and downgrade to several major versions.
It's very odd that every sound-playing package I've tried has the same issue.

For me, this issue happened in both the simulator and on a real device when playing from an asset file, both mp3 and m4a. Turns out I had some spaces in my sound filename, removing the spaces fixed it on both the sim and real device.

Closing in favor of #1494


missing theme options after cloning the website (files and db) to staging server

help appreciated

Sorry, but we can't help with server issues. That's beyond the scope of our project.

I appreciate the feedback but I don't think it is a server issue. I think the documentation on migrating the sites powered by Redux is insufficient. Regards.

These docs are beta. We need to update them, hah.

:-)


feat: add aptly sync command

Codecov Report

Merging #29 (0338c25) into main (9b73939) will increase coverage by 1.44%.
The diff coverage is 44.82%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
+ Coverage   26.38%   27.83%   +1.44%
==========================================
  Files           7        8       +1
  Lines         360      388      +28
==========================================
+ Hits           95      108      +13
- Misses        265      280      +15

Impacted Files
Coverage Δ

src/wakemebot/cli.py
0.00% <0.00%> (ø)

src/wakemebot/ops2deb.py
59.09% <59.09%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Don't require vulkan installation to query devices.

LGTM

make sure build error isn't spurious

make sure build error isn't spurious

It's an issue with the vulkan driver on our CI runner. I'm checking out some linux issues tonight so I'll dev on the runner VM and fix it up