Bug with "CATransform3D"

I want tot get "CATransform3D" but write "catrasn" - it doesn't suggest the word I need but suggests something like "CATransform3DTranslate".
It is even worse than standard behaviour because if you are mistaken then xCode hides autocomplete. But with your plugin I even don't see what is wrong because it always substitutes with an item it considers as a correct one.

"catrasn" should not suggest the word you want (say CATransform3D), because you mistaken this. Also compatible for mistaken word feature may lead to very low match rate for exact word we want. BTW, for CATransform3D you can type catr3, cat3, ct3 and something like these.

I was mistaken in just 2 letters and it doesn't suggest a correct word. But in the same time it suggest a correct word for more wrong cases. So I just wrote about it and you are free to do something with it or ignore it. But anyways it is the mistake!

FYI, there is an option in plugin options under experimental to "correct word order". It allows you to make one mistake of switching the order of two matched substrings.
E.g. rangemake will match both CFRangeMake and NSMakeRange.
And catrasn will match CATransform3D.
Although this significantly decreases the score for the item (so it might still disappear from the list because of thresholds) and I am still figuring out how to make scoring better.


Add .NET Core support.

Fixes #271.

Add .NET Core support by duplicating PCL profile 259 output to dotnet folder.

- Use NuSpec.ReferenceGenerator to manage the dependencies for dotnet group.

@FlorianRappl Please take a look.  Let me know if you don't want to add the NuSpec.ReferenceGenerator to the project.  I can remove it, and only include changes to the dependency group, the version number bump, and the Package.ps1.
I've tested it using a dnx console application project. It is working as expected.

All in all this looks fine. Two things though:

Is this reference really required? If it is not, I would not add it. I consider this a tool, hence it should be downloaded / installed via, e.g., chocolatey. In Node.js there are two different kinds of dependencies: development and runtime dependencies. In .NET no such difference has been made, which makes it hard to mark this dependency as a development dependency.
Any reason for the version change? Usually, all project specific commits go into devel until a release point is used. If only the package script and the NuGet spec had been changed a PR into master would be fine, otherwise a PR into devel is needed for consistency.

Thanks for your efforts - much appreciated! :+1:

Is this reference really required?

Yes I agree that it is a tool and not required in the project.  It is probably designed in this way so that people can have the nuspec updated automatically when they develop and new dependencies are introduced.  Not that much useful for stable project.  I remove it.

Any reason for the version change?

I had thought that you might want a version bump with the newly added .NET Core support.  Anyway I revert the version change.
Thanks for reviewing!

Perfect, thanks a lot for your contribution! Awesome work :ok_hand:

Please let us know when a new NuGet Package is available.  Thanks!

Hi @jeremymeng - thanks again for your support. I just wanted to notify you that AngleSharp v0.9.5 has been released yesterday; and of course your changes have been included!

Thank you @FlorianRappl !
/cc @jchannon @thecodejunkie

Awesome!!
On Thursday, 17 March 2016, Jeremy Meng<EMAIL_ADDRESS>wrote:

Thank you @FlorianRappl https://github.com/FlorianRappl !
/cc @jchannon https://github.com/jchannon @thecodejunkie
https://github.com/thecodejunkie
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/AngleSharp/AngleSharp/pull/283#issuecomment-197963671


Add a meaningful pull request template

Q
A

Bug fix?
no

New feature?
no

BC breaks?
no

Deprecations?
no

Tests pass?
n/a

Fixed tickets
none

License
MIT

Doc PR
sulu-io/sulu-docs#180

TODO

[x] Update the contributing docs

Description
This PR adds a meaningful pull request template, which defines a structure to encourage high quality PRs, which are understandable for new collaborators at every time. This supersedes and closes #2021 too.
The license is required to make sure all contributions are licensed under MIT.
Another solution would be to require signing contribution license agreements, but IMHO the license line in the PR should be preferred.
Purpose
Most of the PRs in this repo have less or no description at all. Thus it is very hard to follow the changes as an outside collaborator. And as @webmozart is already questioning most of the issues and pull requests to add a meaningful description, this is the next logical step.

@patkar i have already started a pull-request template https://github.com/sulu-io/sulu/pull/2021 maybe we can "combine" them

in my opinion this template is very good. @webmozart @chirimoya @danrot what do you think?

@patkar Is the license field really necessary? Sulu is licensed as MIT, so if somebody contributes code it's automatically MIT too (I am not a law expert, but this would make sense to me).
I would also omit Tests pass, that's what the PR checks are for. Whatever is written in there doesn't mean anything because of that.
And I wouldn't put the options ([yes|no]) into the template. Same goes for the text under description and purpose, because it is very annoying to delete them for every PR being created.

@danrot but i think you should think about what writing and we see that it hasn´t worked very good until now. we should give it a try and the template is also not only for us which know what todo when we create a PR its also like @patkar says for third-party developer which maybe contribute only once and don´t want to read an annoying doc to know what they should write into a PR. so +1 for remove license but -1 for remove example data.

The license field should make sure, contributed code is MIT. Without it, this is no clear and it doesn't matter if the project is MIT. Symfony does the same.
The tests pass field in the checklist is more dedicated to a yes/no for the new tests created and covered in the code of the PR. If no, it triggers a TODO to get the tests or rather the code right. See the documentation PR.
The table is in use for Symfony day by day.
The example/help text is a help for first timers, which encourages quality pull requests, but also for daily committers. Thereby you have to rethink to submit good descriptions and co while deleting the help text every time :neckbeard:

Fixed the typos and checklist examples :)

The license is actually really important. Just because the project is MIT, that doesn't automatically make each contribution MIT AFAIK.
I added an alternative proposal in #2085.

Ok, when thinking about it, the license is ok, it also doesn't need to be touched anyway. And I like @webmozart approach better, because it is a lot shorter :-)

Actually removed the tests line, for the other points it's now a voting between those two templates :neckbeard:

ping @wachterjohannes @dantleech @chirimoya

we should go with one i like the approach to give instructions in the template.

@patkar thanks for your effort, but we will merge https://github.com/sulu-io/sulu/pull/2085. We prefer the simplicity and concise descriptions.


Revert dependency resolution memory improvements

This PR effectively reverts the following PRs:

#25105
#24906
#24828

The last one seems to be the root cause for #25416 and the other 2 are built on top of it.
This is not a confirmation that the revert needs to happen but a test to see if it is possible and passes CI.

@bot-gradle test this

I've triggered the following builds for you:

PullRequestFeedback build

@bot-gradle test QF

I've triggered the following builds for you:

QuickFeedback build

I've triggered a build for you. Click here to see all failures if there's any.


Error: Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.

Since we upgraded TestCafe to latest version 1.10.0, we are having the error "Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
It happens locally to all of our team members as well as in our CI/CD pipelines.
It's happening in Chrome, Firefox
Once we downgrade to version 1.9.4 which was the one we were using before, it works fine.
For the pipelines we use:
npx testcafe 'chrome:headless --no-sandbox' src/tests/smoke/ --disable-multiple-windows -e
Which is the one we were using forever.
Locally we use:
testcafe chrome src/tests/smoke  --disable-multiple-windows -e

Environment details:

testcafe version:                            1.10.0
node.js version:                             v14.4.0
command-line arguments:          testcafe chrome src/tests/smoke  --disable-multiple-windows -e
browser name and version:          Chrome 87.0.4280.88
browser name and version in CI:  Chrome 72.0.3626.121
platform and version:                   macOS 11.1.0
platform and version in CI:           Linux 0.0

Have the same issue, after some investigation, it seems that problem appear after new compiler (https://github.com/DevExpress/testcafe/pull/5607/files)
Now it takes much longer time to compile files (more than 2 minutes *default timeout for setting up connection")

Hello @russelldavis,
Please try to run tests without the --dev flag: testcafe chrome tests/repro.js. Unminimized TestCafe scripts may significantly slow tests' execution.

Hi @aleks-pro, I'm not using the --dev flag in any of the commands

Hi @willyestrada81 ,
Please accept my apologies. The previous comment was meant for another issue.
I have not managed to reproduce the issue. Can you please provide a sample project where we can reproduce it?


Fix Nightly Tests for Binaries

Description
This PR aims to fix nightly tests for binaries, that have been failing since 09/19.
One of the errors is because requirements file was not copied to the teat environment.
The other errors are due to numpy warnings treated as errors.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

@ThomasDelteil @larroy ping for review

@marcoabreu can you please review and merge. Thanks.


Update 2.0

Codecov Report

Merging #24 (787ea63) into master (e205843) will decrease coverage by 4.31%.
The diff coverage is 88.07%.

:exclamation: Current head 787ea63 differs from pull request most recent head be0d034. Consider uploading reports for the commit be0d034 to get more accurate results

@@            Coverage Diff             @@
##           master      #24      +/-   ##
==========================================
- Coverage   90.84%   86.53%   -4.32%
==========================================
  Files         109       86      -23
  Lines        4808     3788    -1020
==========================================
- Hits         4368     3278    -1090
- Misses        440      510      +70

Impacted Files
Coverage Δ

redengine/args/io.py
26.66% <ø> (ø)

redengine/args/secret.py
77.77% <ø> (ø)

redengine/core/__init__.py
100.00% <ø> (ø)

redengine/core/parameters/arguments.py
62.50% <ø> (-2.21%)
:arrow_down:

redengine/log/handlers.py
100.00% <ø> (ø)

redengine/parse/__init__.py
100.00% <ø> (ø)

redengine/pybox/io/read.py
44.44% <ø> (-55.56%)
:arrow_down:

redengine/tasks/__init__.py
100.00% <ø> (ø)

redengine/application.py
55.26% <55.26%> (ø)

redengine/session.py
84.38% <81.56%> (-10.09%)
:arrow_down:

... and 52 more

Continue to review full report at Codecov.

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


[ci] cherry-pick CI changes to multitop_dev

This bumps multitop_dev CI to align with master and remove dependency on Azure Pipelines.

The CI failure is unrelated -- newly added OTBN ones are passing, and the earlgrey verilator job was failing on Azure Pipelines on integrated_dev tip.


Azure data

This PR adds data needed and logging policies for defender for endpoint and some additional Azure data sources.
this a resubmit of #14 to try and get the "Allow edits from maintainer setting" working.

@yugoslavskiy  - not entirely sure why but I don't seem to be able to create the PR with "allow edits set" - perhaps because the source repo is under an org.


Fix for elliptic package SNYK Vulerability

Can we expect this vulnerability fixed?
https://security.snyk.io/package/npm/elliptic

That's not this package.

For reference, see also issue 95 and options listed there to mitigate vulnerability risk.


Cyberbullying Classification

@Niketkumardheeryan @invigorzz313
I would like to add Cyberbullying Classification. Please assign this issue to me.

@Niketkumardheeryan @invigorzz313 Kindly assign this issue.

@aishikaranjan the issue is assigned.


Update backend.yml

Engine: seatunnel-engine to seatunnel-zeta

Purpose of this pull request

Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
[ ] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

[ ] Update the release-note.

https://github.com/apache/incubator-seatunnel/pull/3919 You should do it in this PR


Extension System Testing

Context
#1833 is a huge PR.  It need significant testing. Here is an exhaustive checklist
Value and/or benefit
Ensure this PR is successful and all previous behavior is preserved.
### Tasks
- [ ] AWS basic deployment (custom vpc, gpu, spot)
- [ ] GCP deployment (custom vpc, gpu, preemptible)
- [ ] Azure basic deployment (custom vpc)
- [ ] Digital Ocean basic deployment
- [ ] cli command `init`
- [ ] cli command `guided init`  and all branches in the command
- [ ] cli command `dev`
- [ ] cli command `validate`
- [ ] cli command `keycloak`
- [ ] cli command `support`
- [ ] cli command `upgrade`
- [ ] cli environment variable handling for cloud providers and messaging
- [ ] cli setting secrets via environment variables `NEBARI_SECRET__a__b=asdf` -> `{"a": {"b": "asdf"}}` in `yaml`

When testing out a checklist item follow https://github.com/nebari-dev/nebari/issues/new?assignees=&labels=type%3A+release+🏷&template=testing-checklist.md&title=Testing+checklist+for+<version>.

Breaking up tasks:

stream for cli testing "framework"
stream for cloud testinging "framework"
schema fields all having descriptions and additional testing where needed. https://github.com/nebari-dev/nebari/pull/1833/files#diff-f7cda9f473c67dd06224a3ab445bb68065976dc6593511fab331179d60a50013R69 (stretch goal) not needed for this issue.

 For cloud deployments of Nebari typically only stages 01 and 02 need to succeed to properly destroy everything


[BUG] No password check when resharing with Vultiserver

Describe the bug
The password check does not happen when resharing with the Vultiserver included.
It just advances  and can't encounter the Server.
To Reproduce
Steps to reproduce the behavior:

Go to Reshare
Click on Reshare with Vultiserver
Do not enter password
See error

Expected behavior
Proper password check gets done.

Version 1.2.1

Fixed in #1324

QA done.

QA done.


Polyfill bug: calling watcher.watch on computed signal (before its latest value is computed) can prevent from getting its correct latest value afterward

Hello,
I have come across the following bug with the current polyfill implementation (0.1.0): if I call watcher.watch with a computed signal before reading its most up-to-date value, I can no longer get its correct up-to-date value:
  const signal = new Signal.State(0);
  const computedSignal = new Signal.Computed(() => signal.get());
  const watcher = new Signal.subtle.Watcher(() => {});
  expect(computedSignal.get()).toBe(0);
  signal.set(1); // let's update the signal on which computedSignal depends
  watcher.watch(computedSignal); // if this line is removed, the expectation on the following line is successful
  expect(computedSignal.get()).toBe(1); // this expectation fails with current polyfill implementation

Note that I have a use case for which it is important to call watch before calling get because I need the Signal.subtle.watched callback to be called before the signal is computed.

👍


Dunning does not reference the RentalPayment correcty / PK/FK not matching

Dunning has a FK relationship with RentalPayment by the RentalPaymentId
The RentalPayment has 2 fields in the Primary Key:

RentalPaymentId
RentalContractId

This will not work.
I think the RentalContractId in the RentalPayment entity should be a FK instead.

This has been fixed in the feature update last week


Prevent forms without groups being made live if groups are enabled

Previously, we were allowing forms without a group to be made live. Although these wouldn't be listed in groups and the forms index would've been unreachable, if a user had the url for an existing form they could have made the form live.
What problem does this pull request solve?
Trello card: https://trello.com/c/EsoNSIL4

Things to consider when reviewing

Ensure that you consider the wider context.
Does it work when run on your machine?
Is it clear what the code is doing?
Do the commit messages explain why the changes were made?
Are there all the unit tests needed?
Has all relevant documentation been updated?

Closing as superseded by #1282


How to differentiate scrolling direction

Within whileScrolling() callback, I'd like to differentiate x or y scrolling event, I didn't find a built-in method to identify it, how should I do that? or currently, it's impossible.

I have the same need.  Currently I have an array where I store the two last scrollPos but I need a more solid method. For the mousewheel I already have this solution https://github.com/malihu/malihu-custom-scrollbar-plugin/pull/527, but it does not handle using the scroll dragger the keyboard or whatever else.

More simply you can look at the value of this.direction in the whileScrolling callback :-)


Scroll up and down in the Sponsors table; images change sizes each pass

2013 Motorola Moto X, Android 5.1

waiting to get all images as png not svg


Interface fixes

Fixes #254:

interface support for multiple extends
Fix class with extends and implements

I tried adding a << shorthand for implements, but class A < B << C is currently treated as class A extends (B << C) and it seems a bit difficult to bypass (and maybe once we have operator overloading, we wouldn't want to?).  Let me know if you have thoughts on this.

Looks good!
Maybe some other symbol pair would make a good implements shorthand? <:, perhaps?


Close Account - "Account closed successfully" not displayed

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

Version Number: 9.0.1-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers<EMAIL_ADDRESS>**Issue reported by:**Applause - Internal Team
Action Performed:

Login to an account
Go to account settings > Security
Close Account

Expected Result:
"Account closed successfully" is displayed
Actual Result:
"Account closed successfully" not displayed
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/775d1080-4633-40fe-92ed-dcf9348207c2
View all open jobs on GitHub

Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
The root cause is all onyx data including closeAccount is cleared by pusher response when closing account here
https://github.com/Expensify/App/blob/34a80221441907a3f1f3d98abaeea91e2566e206/src/libs/actions/User.ts#L78-L80
Then we try to display the success message by fetching onyx data after request success here
https://github.com/Expensify/App/blob/main/src/pages/signin/LoginForm/BaseLoginForm.tsx#L277-L284
And there is no success message on Signin page since closeAccount is an empty object
What changes do you think we should make in order to solve the problem?
Update the data base to clear all onyx data but closeAccount data or remove the close account success message code block since it has no use.
What alternative solutions did you explore? (Optional)

Same root cause as https://github.com/Expensify/App/issues/44114


ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

Hi,
I trying import jax. However I faced a strange problem.
Please help with this import error on a fresh install.
>>> import jax
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jax/__init__.py", line 22, in <module>
    from .api import (
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jax/api.py", line 37, in <module>
    from . import core
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jax/core.py", line 31, in <module>
    from . import dtypes
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jax/dtypes.py", line 31, in <module>
    from .lib import xla_client
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jax/lib/__init__.py", line 53, in <module>
    from jaxlib import xla_client
  File "/home/dl-box/miyazaki/Quantized_UKR/.venv/lib/python3.8/site-packages/jaxlib/xla_client.py", line 39, in <module>
    from . import xla_extension as _xla
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

My PC OS Information is
> dl-box@DL-Box:~/miyazaki/$ cat /proc/version
Linux version 3.13.0-24-generic (buildd@batsu) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014
(.venv) dl-box@DL-Box:~/miyazaki/cat /etc/debian_version
jessie/sid
(.venv) dl-box@DL-Box:~/miyazaki/$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.6 LTS"
(.venv) dl-box@DL-Box:~/miyazaki/$ cat /proc/version
Linux version 3.13.0-24-generic (buildd@batsu) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014

My libstdc++6 is newest in this apt-get version.
(.venv) dl-box@DL-Box:~/miyazaki/Quantized_UKR$ apt-get --version
apt 1.0.1ubuntu2.24 for amd64 compiled on Oct 10 2019 22:48:21

I'm very beginner. and my PC is so old. If you have some adviece, please note me.

Thanks for the question!
In general, JAX has a similar set of system requirements to TensorFlow: https://www.tensorflow.org/install/pip#system-requirements because we depend on some components of TensorFlow. The minimum Ubuntu version required is 16.04. So I suggest upgrading your Linux installation.
You could also use something like Colab (colab.research.google.com) to run JAX for free in the cloud!


How to add metadata to an existing file which size is more than 5GB?

There is a 10G files in bucket, I want to add a metadata. I find a way to do it.
`Aws::S3::Model::CopyObjectRequest request;
request.SetBucket(strBuncket);
request.SetKey(strKey);
Aws::String strCopySource = (strBuncket + "/" + strKey);
request.SetCopySource(strCopySource);
Aws::Http::HeaderValueCollection metadata;
metadata.insert(std::pair<Aws::String, Aws::String>("new_metadata", "new_metadata_value"));
request.SetMetadata(metadata);
request.SetMetadataDirective(Aws::S3::Model::MetadataDirective::REPLACE);
auto outcome = client.CopyObject(request);`
But if a file which size is more than 5GB, CopyObject is failure.
So how to add metadata to an existing file which size is more than 5GB? Thanks

Hi @x081x , sorry for the late response.
Right now we don't have a way to add metadata to an existing object in s3, other than making a copy.
And, as for the larger objects, this is another limitation we have.
So, you have basically 2 options on what to do:

Download -> add metadata -> upload. This would require you to download to your local machine even if temporarily though, so it might not be the best solution.
Write your own version of a multi part copy.

On my side, I'll try and push for the multi part copy feature to be added.

Hi @KaibaLopez , thank your very much.


Fix Unix domain socket (UDS) paths for Mac OS X

This is an improvement over https://github.com/reactphp/socket/issues/92 that handles the new OSX-specific failure introduced by the initial fix for https://bugs.php.net/bug.php?id=74556.

For the reference: This fix builds on top of #100 which landed in v0.8.0. Both are actually work-arounds for bugs in PHP, the first of which has been fixed in PHP 7.1.7 and the second has just been merged today and is due in the next PHP release.

Would it be possible to release this as soon as possible? Would be nice to get UDS support into the wild without depending on dev-master.

For the reference: This work-around is no longer required in PHP versions 7.0.25+ and 7.1.11+ now that the fix is in via https://github.com/php/php-src/commit/843e492c6816fa18eff83a7a3e8c370531796912. This work-around does no harm and we'll keep this to support older PHP versions :+1:

@andig FYI https://github.com/reactphp/socket/releases/tag/v0.8.6 🎉


chore: add vscode cmake configuration

This sets the build directory to build/release for the "CMake Tools for Visual Studio Code" extension documented at https://vector-of-bool.github.io/docs/vscode-cmake-tools/settings.html#cmake-builddirectory.
It also sets the generator to make, since otherwise it tries Ninja which doesn't work.
Without these settings, the extension runs configure in a bad place at startup.
Summary
Screenshot of this in action:

Link to RFC or bug issue: N/A, this is not a bug nor a user-visible feature.

awaiting-review


Leading zero is truncated for day in New Zealand region where it shouldnt be.

🐛 Bug Report

Leading zero's in day component for regions such as New Zealand should not be truncated
https://share.cleanshot.com/RLcHSYq9
🤔 Expected Behavior
Leading zero should not be truncated

It is truncated when typed or selected from date picker
😯 Current Behavior
It truncates the leading zero

It shouldnt truncate the leading zero.
I can replicate on the top date picker on example site
https://react-spectrum.adobe.com/react-spectrum/DatePicker.html

💁 Possible Solution

🔦 Context

Enter a date. UX look / feel issue

💻 Code Sample
https://react-spectrum.adobe.com/react-spectrum/DatePicker.html
🌍 Your Environment
Incognito window.
https://react-spectrum.adobe.com/react-spectrum/DatePicker.html

Software
Version(s)

react-spectrum
Latest on demo site.

Browser
Chrome Version 114.0.5735.106 (Official Build) (arm64)

Operating System
MacOS 13.4

🧢 Your Company/Team
Ministry of Education

Web
🕷 Tracking Issue (optional)

This is how the browser's date formatter formats dates by default in the en-NZ locale:
new Intl.DateTimeFormat('en-NZ').format(new Date(2023, 0, 1))
// => "1/01/2023"

These formats come from the Unicode CLDR. You can see the format definition here: https://github.com/unicode-org/cldr/blob/main/common/main/en_NZ.xml#L39

Digging through this further, this seems like a bug in CLDR to me. It's weird that it has a leading zero for the month but not the day. I couldn't reproduce this in other locales like en-AU either. Going through the git blame in that xml file linked above seems to show that this has been the same format for over 20 years though. I'll see about filing an issue over there to get it fixed. But that might take some time to make its way into browsers and operating systems.
In the meantime, we could consider adding a prop to override the format to always include leading zeros. A similar prop was requested in #4247. The danger is that hard coding this in an app may override locale-specific preferences, so I think using unicode's defined formats by default and only overriding as a last resort would be our recommendation.

Hmm apologies for the confusion. Is there a way to configure it to add the leading zero. Rightly of wrongly for the time being we have standardised on short date format dd/mm/yyyy

oops you reply too fast. yeah our use case is an internal ish web application that is only intended for use in NZ so having a way to override the format (against standards) is probably not a big issue for us atm.


Is there similar component for Android ?

Is there similar component for Android ?

I have not seen one.


Problems loading the Documentation

Hello!!! This is not related to the gem, but I am getting an error when trying to access the documentation: developer-docs

Thanks in advance for looking into this!

yeah his website went down. I was just trying this CMS out and ran into this too.

Sorry guys, this weekend I will solve the problem! unfortunately the company who was providing the free hosting had problems with their services...
Cheers!

No problem at all!! Glad to hear you are already on it.
Thanks again for the help and the great CMS!
Good luck!

The site is up again! Thanks for working on this! Closing the issue


RFC: Allow boolean literals as cfg predicates

This RFC proposes allowing boolean literals as cfg predicates, e.g. cfg(true) and cfg(false).

Rendered

Also worth noting that, in addition to cfg(any()) meaning cfg(false), cfg(all()) means cfg(true) as well. So, both technically have easy versions, but I agree that true and false care clearer.

the RFC should mention somewhere that the raw identifiers r#true and r#false continue to work:
rustc --cfg false --check-cfg 'cfg(r#false, values(none()))' 1.rs
#     ^~~~~~~~~~~

// 1.rs
#![deny(warnings)]

#[expect(unexpected_cfgs)]
mod a {
  #[cfg(r#true)]
  pub fn foo() {}
}

mod b {
  #[cfg(r#false)]
  pub fn bar() {}
}

fn main() {
    b::bar()
}

Yes please. I'm always surprised I can't do cfg(false).
@rfcbot reviewed

Added a note about r#true/r#false

Also worth noting that, in addition to cfg(any()) meaning cfg(false), cfg(all()) means cfg(true) as well.

Mentioned this in a couple of places for completeness

probably should also mention cfg_attr for completeness

@rfcbot reviewed
In particular, now that we're warning about #[cfg(False)], #[cfg(FALSE)], etc., this is somewhat more pressing.

probably should also mention cfg_attr for completeness

speaking of which i suppose these are also available in Cargo.toml's and .cargo/config.toml's [target.<cfg>] sections.

Would changing Cargo need a separate PR? Currently, Cargo seems to accept these:
warning: unused manifest key: target.cfg(false).rustflags

so changing that could maybe break code - not sure if you can pass custom cfg values to Cargo itself?

not sure if you can pass custom cfg values to Cargo itself?

uh oh. according to rust-lang/cargo#5313 injecting a custom cfg via RUSTFLAGS is supported.

so changing that could maybe break code

I'm pretty sure adding new manifest keys is not considered a breaking change.

Also, it's worth noting that we've introduced and gated new well-known cfg (e.g. cfg(ub_checks)) before without edition gates. That doesn't itself justify doing so again, but in the case of Cargo's cfg not matching rustc's (does Cargo gate everything that rustc does?) I believe fixing the incongruity would be allowed as a bug fix even if it's technically breaking.

I agree we should just send bad news for anyone who was using cfg(false) and cfg(true) for any meaning beyond the obvious one.

current situation of cfg-like constructs

false
r#false

Rust language(#[cfg], cfg!, etc)
❌ `cfg` predicate key cannot be a literal
✅

rustc --cfg
✅
✅

rustc --check-cfg
❌ invalid `--check-cfg` argument: `false` is a boolean literal
✅

cargo [target.<cfg>]
✅
❌ failed to parse `r#false` as a cfg expression: unexpected content `#false` found after cfg expression

I think cargo should be made to accept raw identifiers, but this is indeed really out-of-scope for this RFC.

Thanks for this RFC, I've wanted this for awhile!
@rfcbot reviewed

Another future possibility that addresses the drawback: There could be an allow-by-default lint for using cfg(true|false), so you could #![deny(cfg_boolean_literal)] (or whatever it'd be called).

note that lint names should be plural if they are nouns

We discussed this in today's @rust-lang/cargo meeting. We confirmed that we generally want Cargo to implement every cfg that rustc does, to avoid confusion, and that we anticipate this being easy to implement.

Updated  the name to cfg_boolean_literals: (https://github.com/rust-lang/rust/pull/131034#discussion_r1780710463)

The team has accepted this RFC, and it's now been merged.
Thanks to @clubby789 for writing this up and pushing it forward.
For further updates, follow the tracking issue:

https://github.com/rust-lang/rust/issues/131204


samples/posix/gettimeofday get ZEPHYR FATAL ERROR

Describe the bug
gettimeofday in samples/posix/gettimeofday does not work as expected.
Networking setup is ensured by mqtt_publish sample which works fine.
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version zephyr-v1.0.0-0-g31d4e0e-dirty-20200714_234759-fv-az50-zephyr)
Booting from ROM..
*** Booting Zephyr OS build  ***
[00:00:00.030,000] <inf> net_config: Initializing network
[00:00:00.030,000] <inf> net_config: IPv4 address: <IP_ADDRESS>
[00:00:00.050,000] <err> os: EAX: 0x00000000, EBX: 0x002be216, ECX: 0x0013bfc0, EDX: 0x00133000
[00:00:00.050,000] <err> os: ESI: 0x00000000, EDI: 0x00000046, EBP: 0x0012ac71, ESP: 0x0013bfb8
[00:00:00.050,000] <err> os: EFLAGS: 0x00003fd2 CS: 0x0008 CR3: 0x00144000
[00:00:00.050,000] <err> os: call trace:
[00:00:00.050,000] <err> os: EIP: 0x00000000
[00:00:00.050,000] <err> os: unaligned frame ptr
[00:00:00.060,000] <err> os: >>> ZEPHYR FATAL ERROR 1: Unhandled interrupt on CPU 0
[00:00:00.060,000] <err> os: Current thread: 0x134280 (unknown)
[00:00:00.070,000] <err> os: Halting system

Please also mention any information which could help others to understand
the problem you're facing:

What target platform are you using? ( qemu_x86)
What have you tried to diagnose or workaround this issue?  (Networking setup is ensured by mqtt_publish sample which works fine.)
Is this a regression? If yes, have you been able to "git bisect" it to a
specific commit?  (zephyr version is <IP_ADDRESS>-rc2)
...

To Reproduce
Steps to reproduce the behavior:

west build -b qemu_x86 samples/posix/gettimeofday/
sudo west build -t run
See error

@bensenq Thank you for reporting this. If I am reading your report correctly, you are using Zephyr v<IP_ADDRESS>-rc2? This is not a supported version.
Are you able to reproduce this on current main branch?

@henrikbrixandersen ok, I'll have a try of main branch.
In 3.3.0-rc2, I found it's related to SNTP initialization. When disable CONFIG_NET_CONFIG_CLOCK_SNTP_INIT in prj.conf， the FATAL ERROR is gone.

@henrikbrixandersen ok, I'll have a try of main branch.

Please re-open if you can reproduce with a supported version.

@henrikbrixandersen ok, I'll have a try of main branch.
In 3.3.0-rc2, I found it's related to SNTP initialization. When disable CONFIG_NET_CONFIG_CLOCK_SNTP_INIT in prj.conf， the FATAL ERROR is gone.

using the latest version 8243429d7 on 3.6.0-rc2， still FATAL ERROR
$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: qemu32,+nx,+pae
SeaBIOS (version zephyr-v1.0.0-0-g31d4e0e-dirty-20200714_234759-fv-az50-zephyr)
Booting from ROM..
*** Booting Zephyr OS build v3.6.0-rc2-20-g8243429d7a4a ***
[00:00:00.030,000] <inf> net_config: Initializing network
[00:00:00.030,000] <inf> net_config: IPv4 address: <IP_ADDRESS>
[00:00:00.040,000] <err> os: Page fault at address 0x2704e8 (error code 0x10)
[00:00:00.040,000] <err> os: Linear address not present in page tables
[00:00:00.040,000] <err> os: Access violation: supervisor thread not allowed to execute
[00:00:00.040,000] <err> os: PTE: not present
[00:00:00.040,000] <err> os: EAX: 0x00000000, EBX: 0x00000000, ECX: 0x00000013, EDX: 0x00000000
[00:00:00.040,000] <err> os: ESI: 0x0013a12c, EDI: 0x0011b97a, EBP: 0x00000046, ESP: 0x0013a118
[00:00:00.040,000] <err> os: EFLAGS: 0x00000002 CS: 0x0008 CR3: 0x00141000
[00:00:00.040,000] <err> os: call trace:
[00:00:00.040,000] <err> os: EIP: 0x002704e8
[00:00:00.040,000] <err> os: unaligned frame ptr
[00:00:00.040,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:00.040,000] <err> os: Current thread: 0x125580 (unknown)
[00:00:00.050,000] <err> os: Halting system

@henrikbrixandersen ok, I'll have a try of main branch.

Please re-open if you can reproduce with a supported version.

Please re-open it.

does this sample must have a dns server on host?
I'm using wsl on windows, the dnsmasq servivce could be started as there is a conflict with windows dns service.


completed form frontend

All good. Just discussed with Matt on how to reconnect. Will open a new PR.

Great work! Sorry to hear about the Git issues. It's really coming along.


Integrate Azure Defender with Cluster API as an Azure Arc Connected Cluster using Kubernetes extensions

Integrate Azure Defender with Cluster API as an Azure Arc Connected Cluster using Kubernetes extensions

applied all the changes


Follow go mod versioning rules and update the module name

The reason this package doesn't include releases after v2.5.0+incompatible on pkg.go.dev is that the go.mod file was added between v2.5.0 and v.2.6.0 but the module name wasn't compatible with go module semver rules.
This updates the module name. This ensures that go get github.com/prometheus/prometheus will fetch v1.8.2 but
go get github.com/prometheus/prometheus/v2 will fetch v2.33.4
See https://research.swtch.com/vgo-import and https://go.dev/blog/v2-go-modules for more info.

Theres an active discussion on this topic going on on #8852 and I don't think we're reached a consensus yet on what we'd like to do.  I suggest you chip in there, and lets get this topic added to the dev summit next week to discuss.

Whoops, sorry for the noise. I tried searching through the issues but didn't find that one. Thanks for the pointer. Closing this and will wait for resolution on the current discussion.


Fix Issue in Roslyn MetadataReference Resolver

It seems that the custom metadata resolver that was added to the generator may not be working as expected. Some generated types are still not being resolved correctly, ie. https://github.com/microsoft/typespec/blob/main/packages/http-client-csharp/generator/TestProjects/Local/Unbranded-TypeSpec/src/Generated/Models/ModelWithFormat.cs#L15 (System.Uri) should just be generated Uri.
We should investigate if the resolver has a bug, or if it's not correct to use it for this scenario. If so, we will need an alternative to the resolver that doesn't add all the trusted assemblies on disk to the generated project.

We can close this issue if adding the reduce method resolves this problem: https://github.com/Azure/autorest.csharp/issues/4530.


Pull & Pop Return value update.

Corresponds to https://github.com/jagi/meteor-astronomy/issues/149

Thanks! merging


Some Q with Real_Acc & Fake_Acc

Hello sir
I don't understand how it (Real_Acc & Fake_Acc) connect with the image quality

There is no direct connection between accuracy and image quality. It just shows whether the training is stable.

There is no direct connection between accuracy and image quality. It just shows whether the training is stable.
Thanks for your reply
I trained the model, but I can't restore your accuracy. Maybe there is something wrong with my baseline. Can you provide me a baseline code？
DM-GAN is my basic research, your thoughts have helped me a lot. Thank you very much

There is no direct connection between accuracy and image quality. It just shows whether the training is stable.

Thanks for your reply
I trained the model, but I can't restore your accuracy. Maybe there is something wrong with my baseline. Can you provide me a baseline code？
DM-GAN is my basic research, your thoughts have helped me a lot. Thank you very much

There is no direct connection between accuracy and image quality. It just shows whether the training is stable.

Thanks for your reply
I hope to generate the sentences I input and compare the images before and after optimization, but it seems that your example_filename is not the place to control the input. How can I change it?
Thanks again.


Add Unit Default Test data elements to Export Endpoints

Add Unit Default Test data elements to Export Endpoint for both Official and Workspace views

Test Case: TC1138
Test Passed


[Bug] Tool call in group chat

Discovered by @yoadsn: There will be agents who are neither a proposer nor an executor of a tool, and they will raise an error when performing oai inference when seeing messages with tool flags.
Proposal: For agents who are neither the suggester nor the executor of a function/tool, the function/tool call/response message can be processed into plain text before sending to them by the group chat manager. Same for the groupchat's messages which will be used to perform speaker selection.
Originally posted by @sonichi in https://github.com/microsoft/autogen/issues/960#issuecomment-1890815045

After investigation, the described bug doesn't exist for sync group chat. There is indeed a bug for async group chat due to mismatch of the sync group chat. #1243 fixes that and add tests.


django-defender installation failed

I tray to install django-defender but I receive the following error
$ pip install django-defender
Collecting django-defender
Using cached django_defender-0.5.1-py2-none-any.whl
Collecting mockredispy<3.0,>=<IP_ADDRESS> (from django-defender)
Exception:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/utils/init.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/home/ubuntu/.local/lib/python2.7/site-packages/pip/utils/init.py", line 484, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/usr/lib/python2.7/zipfile.py", line 770, in init
self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file

@adrian-zumbler any update on this issue? Does it still not work for you?

closing due to lack of information, feel free to reopen if still an issue.


Fix handling wkt strings

Closes https://github.com/holoviz/hvplot/issues/1137
The issue was that rioxarray gets loaded after running the second cell, which triggered the first if clause, but we didn't handle WKT strings properly; this PR fixes that.
    def _process_crs(self, data, crs):
        """Given crs as proj4 string, data.attr, or cartopy.crs return cartopy.crs
        """
        if hasattr(data, 'rio') and data.rio.crs is not None:
            # if data is a rioxarray
            _crs = data.rio.crs.to_wkt()
            print("RIO")
        else:
            # get the proj string: either the value of data.attrs[crs] or crs itself
            _crs = getattr(data, 'attrs', {}).get(crs or 'crs', crs)
            print("NOT RIO")

Supersedes contaminated https://github.com/holoviz/hvplot/pull/1138
Note the notebook cell execution number

Thank you for finding the cause of the confusing behavior. Your changes stops the error, but I still find the behavior not to be ideal, e.g.,
import cartopy.crs as ccrs
import rioxarray
import xarray as xr
from hvplot.util import process_crs

crs = ccrs.RotatedPole(pole_longitude=177.5, pole_latitude=37.5)
ds = xr.Dataset(attrs={"crs": crs})

a1 = process_crs(ds.rio.crs.to_proj4())
a2 = process_crs(ds.attrs["crs"])

type(a1), type(a2)

Outputs: (cartopy.crs.PlateCarree, cartopy.crs.RotatedPole)
I think we should swap the order of the if statement.

Good catch! I believe if proj_is_latlong is making a wrong assumption that only PlateCarree is lat lon; rotated pole is also in latlong.
    A rotated latitude/longitude projected coordinate system
    with cylindrical topology and projected distance.


Add heroku.yml to deploy container to heroku

Resources: https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

assign me to this issue

Sure @dhananjay8968, I have assigned you the issue
Looking forward to your contribution 😄


Error: fetching tables failed:  sql: unknown driver "sqlite3" (forgotten import?)

PS E:\gopath\src\fdc\wg_server> gf gen model
path './app/model' is not empty, files might be overwrote, continue? [y/n]: y
Error: fetching tables failed:
sql: unknown driver "sqlite3" (forgotten import?)
I'm using sqlite as the database, and this problem occurs when I use the command gf gen model to generate the interface.
my database config is
[database]
type = "sqlite"
link = "app/model/wg_db.db"

@hijxyz Database sqlite and oracle are not support in gf gen model command in default as it needs cgo and gcc, you can manually make some changes to the source codes and do the building.


Mutually exclusive rules are both passing

I'm having an issue with a workflow setup in which I'm trying to set the number of reviewers on a PR. Here's the gitstream file:
# -*- mode: yaml -*-

manifest:
  version: 1.0

config:
  ignore_files:
    - 'yarn.lock'
    - 'back-end/server/schema.prisma'
    - 'back-end/server/schema.graphql'
    - 'shared/graphql/generated-types.ts'
is:
  small_pr: '{ branch | estimatedReviewTime <= 5 and files | length <= 20 }'
  medium_or_large_pr: '{ branch | estimatedReviewTime > 5 or files | length > 20 }'

automations:
  single_reviewer:
    if:
      - '{ is.small_pr }'
    run:
      - action: set-required-approvals@v1
        args:
          approvals: 1
  multi_reviewer:
    if:
      - '{ is.medium_or_large_pr }'
    run:
      - action: set-required-approvals@v1
        args:
          approvals: 2

This PR with only 1 file and only a few lines of code removed still requires 2 approvals.

Looking into the logs of the run, under the Evaluate Rules section, I see the following, which shows that both mutually exclusive rules have passed:
{
  "automations":
  {
    "gitstream/single_reviewer":
    {
      "if": [
        {
          "passed": "{ is.small_pr }"
        }
      ],
      "run":
      [
        { "action": "set-required-approvals@v1", "args": { "approvals": 1 } }
      ],
      "passed": true
    },
    "gitstream/multi_reviewer":
    {
      "if": [
        { "passed": "{ is.medium_or_large_pr }" }
      ],
      "run": [
        { "action": "set-required-approvals@v1", "args": { "approvals": 2 } }
      ],
      "passed": true
    }
  }
}

Shoudn't only one of them pass, given my config? Or is there something wrong with the way I have setup the is: checks?

hi @emcdaniel-sungage the main issue is the .cm syntax, you should use double currly braces {{ }}  for expressions instead of '{ and }'. It is also good practice to wrap sub expressions with parentheses ( and ) to make sure the order of evaluation is not wrong.

Note for others that may find this: I used the '{ syntax because it allowed YAML validators to pass. {{ did not for me, but it turns our { { does. YAML FTW?


Problem with elastic launch on slurm cluster

Bug description
Hi team,
I tried to use elastic launch with pytorch lightning on a slurm cluster (one node with multiple gpus). The script worked fine if I use interactive mode but id not work under submit mode. I followed the tutorial in https://lightning.ai/docs/pytorch/stable/accelerators/gpu_intermediate.html.
The error is like
[W socket.cpp:426] [c10d] The server socket has failed to bind to [::]:44927 (errno: 98 - Address already in use).
[W socket.cpp:426] [c10d] The server socket has failed to bind to ?UNKNOWN? (errno: 98 - Address already in use).
[E socket.cpp:462] [c10d] The server socket has failed to listen on any local network address.

There was no help to change the port number manually. I tried to remove the elastic launch part and it was fine. I also tried the official pyotrch tutorial and it was also no problem https://github.com/pytorch/examples/tree/main/distributed/ddp-tutorial-series
So I guess the issue is that both elastic launcher and pytorch lightning ddp have multiple calls for the port, which is in conflict. I am not sure if I need to set up something else. Thank you so much.
What version are you seeing the problem on?
v1.9, v2.0
How to reproduce the bug
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import os
from datetime import timedelta
import torch.distributed.launcher as dist_launcher
from torch.utils.data import Dataset, DataLoader, RandomSampler
import pytorch_lightning as pl
from pytorch_lightning.strategies.ddp import DDPStrategy
from pytorch_lightning.callbacks import Callback
from uuid import uuid4
import socket

# DEVICES = [0, 1, 2, 3, 4, 5, 6, 7]
DEVICES = [0, 1]

class SimpleModel(pl.LightningModule):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.layer = nn.Linear(2, 1)

    def forward(self, x):
        return self.layer(x)

    def training_step(self, batch, batch_idx):
        x = batch.float()
        print(x)

        y = self(x)
        loss = nn.MSELoss()(y, torch.zeros_like(y))

        self.log("train_loss", loss)
        return loss

    def configure_optimizers(self):
        return optim.SGD(self.parameters(), lr=0.01)

class RandomDataset(Dataset):
    def __getitem__(self, index):
        return torch.tensor(np.random.randint(0, 1000, 2))
        # return torch.tensor([index, index])

    def __len__(self):
        return 10

def train():

    dataset = RandomDataset()
    dataloader = DataLoader(dataset, batch_size=2, sampler=RandomSampler(dataset), num_workers=0)

    # Initialize the Lightning Module (your model)
    model = SimpleModel()

    # Initialize a trainer with DDP
    trainer = pl.Trainer(
        devices = DEVICES,
        accelerator="gpu",
        strategy="ddp",
        max_epochs=2,
    )

    # Start training
    trainer.fit(model, dataloader)

def elastic_train():

    elastic_parameters = dist_launcher.LaunchConfig(
            min_nodes=1,
            max_nodes=1,
            nproc_per_node=len(DEVICES),
            rdzv_backend="c10d",
            rdzv_endpoint= "localhost:12345", # this is the port that the trainer will use to communicate with the launcher
            run_id=f"perfect_track_{uuid4()}", # run_id just has to be globally unique
            max_restarts=0, # for fault tolerance; for testing set it to 0 (no fault tolerance)
            start_method="spawn",
        )

    dist_launcher.elastic_launch(elastic_parameters, train)()

if __name__ == "__main__":

    # No issues
    # train()

    # Problematic on slurm cluster
    elastic_train()

Error messages and logs
GPU available: True (cuda), used: True
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py:67: UserWarning: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `pytorch_lightning` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default
  warning_cache.warn(
Initializing distributed: GLOBAL_RANK: 0, MEMBER: 1/1
/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py:67: UserWarning: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `pytorch_lightning` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default
  warning_cache.warn(
Initializing distributed: GLOBAL_RANK: 0, MEMBER: 1/1
[W socket.cpp:426] [c10d] The server socket has failed to bind to [::]:37025 (errno: 98 - Address already in use).
[W socket.cpp:426] [c10d] The server socket has failed to bind to ?UNKNOWN? (errno: 98 - Address already in use).
[E socket.cpp:462] [c10d] The server socket has failed to listen on any local network address.
----------------------------------------------------------------------------------------------------
distributed_backend=nccl
All distributed processes registered. Starting with 1 processes
----------------------------------------------------------------------------------------------------

LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0,1]

  | Name  | Type   | Params
---------------------------------
0 | layer | Linear | 3
---------------------------------
3         Trainable params
0         Non-trainable params
3         Total params
0.000     Total estimated model params size (MB)
SLURM auto-requeueing enabled. Setting signal handlers.
/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:442: PossibleUserWarning: The dataloader, train_dataloader, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 80 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(
/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/loops/fit_loop.py:281: PossibleUserWarning: The number of training batches (3) is smaller than the logging interval Trainer(log_every_n_steps=50). Set a lower value for log_every_n_steps if you want to see logs for the training epoch.
  rank_zero_warn(
`Trainer.fit` stopped: `max_epochs=2` reached.
failed (exitcode: 1) local_rank: 1 (pid: 4105770) of fn: train (start_method: spawn)
Traceback (most recent call last):
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/api.py", line 455, in _poll
    self._pc.join(-1)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 160, in join
    raise ProcessRaisedException(msg, error_index, failed_process.pid)
torch.multiprocessing.spawn.ProcessRaisedException:

-- Process 1 terminated with the following error:
Traceback (most recent call last):
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/multiprocessing/spawn.py", line 69, in _wrap
    fn(i, *args)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/api.py", line 371, in _wrap
    ret = record(fn)(*args_)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 346, in wrapper
    return f(*args, **kwargs)
  File "/private/home/yunzhil/posetrack/Test_GenPoseTrack/test_randomness_pytorch/test_ddp.py", line 64, in train
    trainer.fit(model, dataloader)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 42, in _call_and_handle_interrupt
    return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 93, in launch
    return function(*args, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 938, in _run
    self.strategy.setup_environment()
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/strategies/ddp.py", line 143, in setup_environment
    self.setup_distributed()
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/strategies/ddp.py", line 191, in setup_distributed
    _init_dist_connection(self.cluster_environment, self._process_group_backend, timeout=self._timeout)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/lightning_fabric/utilities/distributed.py", line 258, in _init_dist_connection
    torch.distributed.init_process_group(torch_distributed_backend, rank=global_rank, world_size=world_size, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py", line 754, in init_process_group
    store, rank, world_size = next(rendezvous_iterator)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/rendezvous.py", line 246, in _env_rendezvous_handler
    store = _create_c10d_store(master_addr, master_port, rank, world_size, timeout)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/distributed/rendezvous.py", line 177, in _create_c10d_store
    return TCPStore(
RuntimeError: The server socket has failed to listen on any local network address. The server socket has failed to bind to [::]:37025 (errno: 98 - Address already in use). The server socket has failed to bind to ?UNKNOWN? (errno: 98 - Address already in use).

 If you intend to launch processes yourself, you'll need to override this detection by:
from lightning.pytorch.plugins import LightningEnvironment

trainer = Trainer(..., plugins=LightningEnvironment())

Please note that, while what you are doing is possible, it is not our recommended default experience for most SLURM users. See here how Lightning works with SLURM in the user guide: https://lightning.ai/docs/pytorch/stable/clouds/cluster_advanced.html

Hey @Uio96
Lightning is made so that it automatically detects the slurm environment. If you intend to launch processes yourself, you'll need to override this detection by:
from lightning.pytorch.plugins import LightningEnvironment

trainer = Trainer(..., plugins=LightningEnvironment())

Please note that, while what you are doing is possible, it is not our recommended default experience for most SLURM users. See here how Lightning works with SLURM in the user guide: https://lightning.ai/docs/pytorch/stable/clouds/cluster_advanced.html

Thank you so much. It does solve my issue.

The previous trick did work on a single node. But I still have trouble with multiple nodes. I made minor edits to my python script by changing num_nodes to 2 (2 gpus for each) and passing a master node IP & port. The process got stuck there for a long time and returned timeout error. Maybe I need to set up some other parameters?
On the other hand, I also tried to play around with it by removing the elastic launcher part and followed https://lightning.ai/docs/pytorch/stable/clouds/cluster_advanced.html to set up the parameter for slurm. There came a new issue with rank, similar to the issue mentioned before https://github.com/Lightning-AI/lightning/discussions/7275#discussioncomment-703240. But since the version has updated, the old tricks cannot work in the latest one:
Traceback (most recent call last):
  File "test_ddp_no_elastic.py", line 191, in <module>
    train(args)
  File "test_ddp_no_elastic.py", line 166, in train
    trainer.fit(model, dataloader)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 42, in _call_and_handle_interrupt
    return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/strategies/launchers/subprocess_script.py", line 93, in launch
    return function(*args, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 980, in _run
    results = self._run_stage()
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1023, in _run_stage
    self.fit_loop.run()
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/loops/fit_loop.py", line 194, in run
    self.setup_data()
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/loops/fit_loop.py", line 237, in setup_data
    dl = _process_dataloader(trainer, dl)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 499, in _process_dataloader
    dataloader = trainer._data_connector._prepare_dataloader(dataloader, shuffle=is_shuffled, mode=stage)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 200, in _prepare_dataloader
    sampler = self._resolve_sampler(dataloader, shuffle=shuffle, mode=mode)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 211, in _resolve_sampler
    sampler = _get_distributed_sampler(
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 252, in _get_distributed_sampler
    return DistributedSampler(dataloader.dataset, **kwargs)
  File "/private/home/yunzhil/.conda/envs/ddp_env/lib/python3.8/site-packages/torch/utils/data/distributed.py", line 74, in __init__
    raise ValueError(
ValueError: Invalid rank 2, rank should be in the interval [0, 1]

Here is my updated script:
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import os
from datetime import timedelta
import torch.distributed.launcher as dist_launcher
from torch.utils.data import Dataset, DataLoader, RandomSampler
import pytorch_lightning as pl
from pytorch_lightning.strategies.ddp import DDPStrategy
from pytorch_lightning.callbacks import Callback
from uuid import uuid4
import socket
import argparse
from pytorch_lightning.plugins.environments import LightningEnvironment

# DEVICES = [0, 1, 2, 3, 4, 5, 6, 7]
DEVICES = [0, 1]

class SimpleModel(pl.LightningModule):
    def __init__(self):
        super(SimpleModel, self).__init__()
        self.layer = nn.Linear(2, 1)

    def forward(self, x):
        return self.layer(x)

    def training_step(self, batch, batch_idx):
        x = batch.float()
        print(x)

        y = self(x)
        loss = nn.MSELoss()(y, torch.zeros_like(y))

        self.log("train_loss", loss)
        return loss

    def configure_optimizers(self):
        return optim.SGD(self.parameters(), lr=0.01)

class RandomDataset(Dataset):
    def __getitem__(self, index):
        return torch.tensor(np.random.randint(0, 1000, 2))
        # return torch.tensor([index, index])

    def __len__(self):
        return 10

def train(args):

    dataset = RandomDataset()

    dataloader = DataLoader(dataset, batch_size=2, sampler=RandomSampler(dataset), num_workers=0)

    # Initialize the Lightning Module (your model)
    model = SimpleModel()

    # Initialize a trainer with DDP
    trainer = pl.Trainer(
        num_nodes=args.num_node,
        devices = 2,
        accelerator="gpu",
        strategy="ddp",
        max_epochs=2,
        plugins=LightningEnvironment(),
    )

    # Start training
    trainer.fit(model, dataloader)

def elastic_train(args):

    elastic_parameters = dist_launcher.LaunchConfig(
            min_nodes=args.num_node,
            max_nodes=args.num_node,
            nproc_per_node=len(DEVICES),
            rdzv_backend="c10d",
            rdzv_endpoint= args.rdzv_endpoint, # this is the port that the trainer will use to communicate with the launcher
            run_id=f"perfect_track_{uuid4()}", # run_id just has to be globally unique
            max_restarts=0, # for fault tolerance; for testing set it to 0 (no fault tolerance)
            start_method="spawn",
        )

    dist_launcher.elastic_launch(elastic_parameters, train)(args)

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--num_node", type=int, default=1)
    parser.add_argument("--rdzv_endpoint", type=str, default="localhost:12345")

    args = parser.parse_args()

    # train(args)

    # # Problematic on slurm cluster
    elastic_train(args)

@Uio96 What is your motivation for going against Lightning's slurm integration and doing the launching yourself? Are there any features in the elastic launcher that you need?
I suggest that you first test your custom launch method on a regular pytorch script on multi-node, and once that works you can port that over to the Lightning script.

Thanks for the suggestions. I plan to use elastic launch to have a better management of node and dataloader's workers.
I did follow the pytorch tutorial and it worked fine on multiple nodes setting on slurm, e.g., https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multinode.py. I am new to pytorch lightning. So I am not sure if need to something different in pytorch lightning.
I found that Pytorch lightning provided some tutorials for slurm and elastic launch https://lightning.ai/docs/pytorch/latest/levels/intermediate_level_14.html.
I followed them but did not work. As I mentioned in my previous post, there was 1) an issue with sampler (no elastic stuff involved) when using multiple nodes (I did not do something special with the sampler because some old tutorials mentioned I did not have to https://pytorch-lightning.readthedocs.io/en/0.9.0/multi_gpu.html):
ValueError: Invalid rank 2, rank should be in the interval [0, 1]

On the other hand, there was 2) an issue with rdzv communication error (timeout) when using elastic launch.
Pytorch lightning keeps evolving (e.g., API stuff), not enough material can be found online. So I am not sure how to deal with those two issues.

Okay, in this case may I ask why this needs to happen programmatically? Couldn't you just use the torchrun command externally? Afterall, you are parsing arguments yourself anyway? You could remove this boilerplate code entirely from the script and externally just launch it like so:
torchrun --nproc-per-node 2 --nnodes 2 --node-rank ... --rdzv-backend c10d --rdzv-endpoint ... --max-restarts 0 --run-id ... train_script.py

(don't forget to set the node rank, you also missed that in your elastic launch command above!!)
The only caveat is that if you do this on SLURM, you'll need to suppress the autodetection of the slurm environment and do
from lightning.pytorch.plugins import TorchElasticEnvironment
trainer = Trainer(plugins=TorchElasticEnvironment())

But I think this would still be cleaner.

Okay, in this case may I ask why this needs to happen programmatically? Couldn't you just use the torchrun command externally? Afterall, you are parsing arguments yourself anyway? You could remove this boilerplate code entirely from the script and externally just launch it like so:
torchrun --nproc-per-node 2 --nnodes 2 --node-rank ... --rdzv-backend c10d --rdzv-endpoint ... --max-restarts 0 --run-id ... train_script.py

(don't forget to set the node rank, you also missed that in your elastic launch command above!!)
The only caveat is that if you do this on SLURM, you'll need to suppress the autodetection of the slurm environment and do
from lightning.pytorch.plugins import TorchElasticEnvironment
trainer = Trainer(plugins=TorchElasticEnvironment())

But I think this would still be cleaner.

Thank you so much. After changing to torchrun command externally and use TorchElasticEnvironment plugins, I can run the script with multiple nodes. It did not work out with my previous LaunchConfig (I once assumed they were equivalent).


Add notifications for source freshness errors

Include source freshness errors in the message thread
Add optionality for source freshness errors alone to trigger an error notification

source freshness errors do not cause the run to be marked as Errored
Will need to parse the results of successful runs for source freshness issues, but can skip run & testing steps

Added in d3ae35d


nitter: init at 2021-07-18

Motivation for this change
Nitter is a lightweight Twitter front-end.
Things done

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

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs 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/)
[X] Fits CONTRIBUTING.md.

Notes
Nitter does not have releases. I used the commit hash as the version but I'm not sure if it is the best option.

You should use the date of the commit in YYYY-MM-DD format so that versions are increasing.

Result of nixpkgs-review pr 131255 at dd8489ed run on x86_64-linux 1

1 package built successfully:

nitter

1 suggestion:

warning: unclear-gpl
agpl3 is a deprecated license, please check if project uses agpl3Plus or agpl3Only and change meta.license accordingly.
Near pkgs/servers/nitter/default.nix:126:5:
    |
126 |     license = licenses.agpl3;
    |     ^

Maybe I'm doing it wrong but the executable does not seem to work properly:
[nix-shell:~/.cache/nixpkgs-review/pr-131255]$ nitter
io.nim(849)              readFile
Error: unhandled exception: cannot open: public/md/about.md [IOError]

[nix-shell:~/.cache/nixpkgs-review/pr-131255]$ nitter --help
io.nim(849)              readFile
Error: unhandled exception: cannot open: public/md/about.md [IOError]

Nitter needs to be run in a folder that contains public folder (found in the derivation output) and nitter.conf. I have no idea on how to do that cleanly.

Nitter needs to be run in a folder that contains public folder (found in the derivation output) and nitter.conf. I have no idea on how to do that cleanly.

I suspect you should write a nixos module that does the right symlinks in /var/lib/nitter and starts the process.
Alternatively, it would be possible to patch the source to replace public by $out/share/nitter/public. Then the user is only required to provide the configuration file.
(Note that the public folder is probably better installed in $out/share/something than directly in $out, like in FHS but with $out replacing /usr)

Alternatively, it would be possible to patch the source to replace public by $out/share/nitter/public. Then the user is only required to provide the configuration file.

After further investigation, it seems that the public path can be configured in nitter.conf. So I am definitely going to add a module to make Nitter easier to setup.

I just added a module to ease setup. I am using an environment variable to pass the path to the generated configuration, so I did not need to create /var/lib/nitter or an user/group.
I also include a test. It is the first time I'm writing one, so please give feedback if I messed something up.

so I did not need to create /var/lib/nitter or an user/group.

Note that even service with DynamicUsers set to true can have state in /var/lib/servicename: set StateDirectory=nitter.

I just fixed an issue with the generated configuration file: without quotes around strings, Nitter was not loading correctly values.


Document how to use commands with python module instead of argparse

Documents how to use python -m when running launch instead of using the CLI. cc @stas00
Also documents the other available module-calling option: env

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


No downport for inline declaration of FIELD-SYMBOL

APPEND INITIAL LINE TO gr_notif_wo_type ASSIGNING FIELD-SYMBOL(<lfs_notif_wo_type>).
There is no quick fix available for this in the playground.

make sure that there are no syntax errors in the code, plus set the version to 702,

Tested successfully


Command "yarn set version stable && yarn install" exited with 1

On a fresh clone of the app using npm create tamagui. I am deploying to vercel per the instructions and getting an error:
Command "yarn set version stable && yarn install" exited with 1

FIXED
I hade to run yarn set version stable && yarn install in my local repo, push it to github where it auto deployed to vercel fine.

Made it so it sets a more specific version.


Query based on association value

This StackOverflow post summarizes what I'm about to talk about, perhaps a bit more succinctly.
Is there a way to query a model based on values contained in an association? Basically, something like this:
// api/models/User.js
module.exports = {
  attributes: {
    username: {
      type: 'string',
      required: true,
    },

    assignments: {
      collection: 'profile',
      via: 'user',
      dominant: true,
    }
  }
};

// api/models/Profile.js
module.exports = {
  attributes: {
    users: {
      collection: 'user',
      via: 'assignments'
    }
  }
};

// Consumption code
Assignment.find()
  .populate('users')
  .where({
    'users.username': 'ndhoule'
  })
  .exec(/* ... */)

I get the impression this hasn't yet been implemented, but didn't see another issue.

Hi there.
I got the same problem. I would like to find all items in Collection1 that contains a specifique Collection2 item.
I found this issue and i would like to know if one year later there is a way to achieve that.
Thanks

@Oldwo1f can you swap those collections? something like:
sails.models.collection2.find().where({bar: 'foo'}).populate('Collection1').exec(function(error, results) { .... });

Yeah, i could do that, but i use a one way assiciation that means that collection 2 item doesnt know theire are owned by collection.
I worked around by using async to make multiple database query to consctruc my array of datas.
Thanks

@particlebanana sir,one year later....

@particlebanana perhaps we should implement this for now in waterline without native adapter support.  I get the feeling that's one of the biggest hurdles– building, say, MySQL queries properly, to ask for this data.

Any updates? @devinivy @particlebanana ?

Hi @gaurav21r, please track #266 which this issue duplicates. It's also better to keep the discussion there.


Error when using notifications

I've an issue on Ubuntu 22.04, where using subscriptions would result in an application crash.
The error returned is
Error: BtleError(Other(DbusError(D-Bus error: Read not permitted (org.bluez.Error.NotPermitted))))

Behavior
Everything works as expected (including read) until a notification / event is received. Then the call to read_deserialize in listen_push_events will fail with the above mentioned error. I've been able to reliably produce this with either attaching/disconnecting the cup from a charging base or by temperature changes.
Reproducing it
I've been able to reproduce this error with the provided egui application and I can confirm that it works with e.g. the python ember cup library.
This is a minimal (non-working) example:
use std::error::Error;
use tokio;
use ember_mug::EmberMug;
use futures_util::{StreamExt, TryStreamExt};

mod backend;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let mug = EmberMug::find_and_connect().await?;

    mug.subscribe_push_events().await?;
    let mut stream = mug.listen_push_events().await?.boxed();

    // everything up here is fine, until a state change occurs
    while let Some(event) = stream.try_next().await? {
        println!("Received push");  // it will never reach this point
    }

    Ok(())
}

Ideas
I currently expect this to be a general error with the bluetooth library stack used here, but I'm unsure how to debug this as I'm fairly new to rust.

Hi! Thanks for the report and welcome to rust :)
I don't have a linux machine with bluetooth so I haven't been able to test the library with it.
could you add tracing-subscriber to your dependencies
cargo add tracing-subscriber -F env-filter

and then in the main function add
tracing_subscriber::fmt()
    .with_line_number(true)
    .with_file(true)
    .with_env_filter(tracing_subscriber::from_default_env())
    .init();

this will then let you do RUST_LOG=trace cargo run to get trace level messages, this can maybe hint at what's going wrong.
I wonder if we're reading a characteristic that is not readable on your device, if it is then the library should be fixed so that it tells you the problem in the error message.

also, if you could run inside this repository RUST_LOG=info cargo --example info, that would be helpful. It scans twice so the output is a bit messed up, but, here's what I get
❯ RUST_LOG=info cargo run --example info
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
     Running `target/debug/examples/info`
known: Name
fc540001-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: CurrentTemp
fc540002-236c-4c94-8fa9-944a3e5353fa cap: READ
known: TargetTemp
fc540003-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: TemperatureUnit
fc540004-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: LiquidLevel
fc540005-236c-4c94-8fa9-944a3e5353fa cap: READ
known: TimeDateZone
fc540006-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: Battery
fc540007-236c-4c94-8fa9-944a3e5353fa cap: READ
known: LiquidState
fc540008-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Ota
fc54000c-236c-4c94-8fa9-944a3e5353fa cap: READ
known: PushEvents
fc540012-236c-4c94-8fa9-944a3e5353fa cap: NOTIFY
known: MugColor
fc540014-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: LastLocation
fc54000a-236c-4c94-8fa9-944a3e5353fa cap: WRITE
known: MugId
fc54000d-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Dsk
fc54000e-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Udsk
fc54000f-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: ControlRegisterAddress
fc540010-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: ControlRegisterData
fc540011-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: Statistics
fc540013-236c-4c94-8fa9-944a3e5353fa cap: NOTIFY
  2023-11-25T07:43:31.556347Z  INFO info: was left, ch: Characteristic { uuid: 00001531-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: WRITE | NOTIFY }
    at examples/info.rs:27

  2023-11-25T07:43:31.556960Z  INFO info: was left, ch: Characteristic { uuid: 00001532-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: WRITE_WITHOUT_RESPONSE }
    at examples/info.rs:27

  2023-11-25T07:43:31.556976Z  INFO info: was left, ch: Characteristic { uuid: 00001534-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: READ }
    at examples/info.rs:27

battery: Battery { battery: 12, charge: false, temperature: Temperature { temperature: 2200 }, volt: 0 }
current_temp: 22.5
color: Color { r: 29, g: 0, b: 255, a: 99 }
name: "EMBER"
state: Empty
target_temperature: 57.5
ota: Ota { firmware_version: 394, hardware_version: 10, bootloader: None }
tdz: TimeDateZone { unix_timestamp: 0, offset: 1 }
meta: MugMeta { mug_id: [193, 225, 244, 98, 156, 82], serial_number: "SVG14100900" }
  2023-11-25T07:43:31.927205Z  INFO btleplug::corebluetooth::peripheral: Event receiver died, breaking out of corebluetooth device loop.
    at /Users/emil/.cargo/registry/src/index.crates.io-6f17d22bba15001f/btleplug-0.10.4/src/corebluetooth/peripheral.rs:159

remove the dsk and udsk from the output, I don't know if those are sensitive keys yet, but better to be safe

The data from the info call as requested ^^
Btw. I noticed, that for me this example doesn't loop twice as it gets stuck in waiting endlessly
https://github.com/Emilgardis/ember_mug/blob/338c5efa95a0bd70983a5963fbf840547a49369d/src/mug.rs#L64

Output of info example
> RUST_LOG=info cargo run --example info
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/examples/info`
  2023-11-25T13:45:52.654728Z  INFO bluez_async: Services already resolved.
    at /home/elizabeth/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bluez-async-0.6.0/src/lib.rs:696

known: Name
fc540001-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: CurrentTemp
fc540002-236c-4c94-8fa9-944a3e5353fa cap: READ
known: TargetTemp
fc540003-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: TemperatureUnit
fc540004-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: LiquidLevel
fc540005-236c-4c94-8fa9-944a3e5353fa cap: READ
known: TimeDateZone
fc540006-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: Battery
fc540007-236c-4c94-8fa9-944a3e5353fa cap: READ
known: LiquidState
fc540008-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Ota
fc54000c-236c-4c94-8fa9-944a3e5353fa cap: READ
known: PushEvents
fc540012-236c-4c94-8fa9-944a3e5353fa cap: NOTIFY
known: MugColor
fc540014-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: LastLocation
fc54000a-236c-4c94-8fa9-944a3e5353fa cap: WRITE
known: MugId
fc54000d-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Dsk
fc54000e-236c-4c94-8fa9-944a3e5353fa cap: READ
known: Udsk
fc54000f-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: ControlRegisterAddress
fc540010-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: ControlRegisterData
fc540011-236c-4c94-8fa9-944a3e5353fa cap: READ | WRITE
known: Statistics
fc540013-236c-4c94-8fa9-944a3e5353fa cap: NOTIFY
  2023-11-25T13:45:52.668893Z  INFO info: was left, ch: Characteristic { uuid: 00001531-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: WRITE | NOTIFY }
    at examples/info.rs:27

  2023-11-25T13:45:52.668916Z  INFO info: was left, ch: Characteristic { uuid: 00001532-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: WRITE_WITHOUT_RESPONSE }
    at examples/info.rs:27

  2023-11-25T13:45:52.668925Z  INFO info: was left, ch: Characteristic { uuid: 00001534-1212-efde-1523-785feabcd123, service_uuid: 00001530-1212-efde-1523-785feabcd123, properties: READ }
    at examples/info.rs:27

  2023-11-25T13:45:52.668932Z  INFO info: was left, ch: Characteristic { uuid: 00002a05-0000-1000-8000-00805f9b34fb, service_uuid: 00001801-0000-1000-8000-00805f9b34fb, properties: INDICATE }
    at examples/info.rs:27

battery: Battery { battery: 100, charge: true, temperature: Temperature { temperature: 2300 }, volt: 0 }
current_temp: 22.0
color: Color { r: 156, g: 0, b: 255, a: 255 }
name: "Tyalie Mug"
state: Empty
target_temperature: 0.0
ota: Ota { firmware_version: 394, hardware_version: 10, bootloader: None }
tdz: TimeDateZone { unix_timestamp: 0, offset: 1 }
meta: MugMeta { mug_id: [222, 69, 37, 241, 156, 179], serial_number: "SVG05100177" }
[…]

this will then let you do RUST_LOG=trace cargo run to get trace level messages, this can maybe hint at what's going wrong.

This sadly hasn't been very informative either. The log just before the crash is:
2023-11-25T13:54:31.272817Z TRACE bluez_async::events: /home/elizabeth/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bluez-async-0.7.2/src/events.rs:165: PropertiesChanged for /org/bluez/hci0/dev_DE_45_25_F1_9C_B3/service000c/char002c: PropertiesPropertiesChanged { interface_name: "org.bluez.GattCharacteristic1", changed_properties: {"Value": Variant([2])}, invalidated_properties: [] }
2023-11-25T13:54:31.273097Z TRACE bluez_async::events: /home/elizabeth/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bluez-async-0.7.2/src/events.rs:165: PropertiesChanged for /org/bluez/hci0/dev_DE_45_25_F1_9C_B3/service000c/char002c: PropertiesPropertiesChanged { interface_name: "org.bluez.GattCharacteristic1", changed_properties: {"Value": Variant([2])}, invalidated_properties: [] }
Error: BtleError(Other(DbusError(D-Bus error: Read not permitted (org.bluez.Error.NotPermitted))))

Okay I think I know what the issue is. The library tries to read from the PushEvents characteristics in order to receive the latest signal code, which results in a Read not permitted error on bluez + dbus system. See this line of code:
https://github.com/Emilgardis/ember_mug/blob/338c5efa95a0bd70983a5963fbf840547a49369d/src/mug/push_events.rs#L37-L38
Solution
I'm not even sure if this is the right way to handle incoming signals, because the ValueNotification does not only contain the uuid, but also a value - meaning that the characteristic read isn't even necessary.
pub struct ValueNotification {
    /// UUID of the characteristic that fired the notification.
    pub uuid: Uuid,
    /// The new value of the characteristic.
    pub value: Vec<u8>,
}

I've verified that this corresponds to the values in the PushEvent enum.
Tools used (for future references)
The btleplug library uses the dbus on Linux in order to communicate with bluez. One can debug everything that goes over that interface using dbus-monitor in monitoring (not evesdropping) mode. I personally used the following command and filter:
sudo dbus-monitor --system "path_namespace='/org/bluez/hci0'"

wow, how did that even work before, I guess the implementation for macOS cheats a bit. Changing the read into parsing the value works much better, it even fixes an issue I've experienced but never been able to track down.
Can you try the change done in #3 and see if it solves it for you?


Is this really using package by feature?

In this comment in your reddit post about this project, you said that this project is organized using the package by feature approach. I read the article that you linked to, and I think I sort of understand the idea. However, after examining the structure of your project, I couldn't really see any similarities to what was shown in the article. To be fair, I don't see any files called model, presenter or view, but, I do see data and ui, which sort of sounds like model and view to me. I'm not trying to judge or anything, just understand. I don't know if you'll agree with me, but I think this is a really good example of package by feature. Sorry if this came off as cynical or rude, it's definitley not my intention 😄. Hopefully you can shed some light on this for me 😆

Good Question! The crux of package-by-feature is to place all feature specific classes into the same package. This way you don't have related classes spread all over your application.
Model/Presenter/View package structure is really package-by-layer! In this case, it is the separate layers of the MVP architecture pattern. While this may be fine for smaller applications, it can get really unwieldy when you have a lot of unrelated code in the same layer.
Say you want to delete feature x. If you use package-by-layer you would have to go into all the different layers to find files that are part of feature x. With package-by-feature, you immediately know to look at the x package to find the code. If you architect right, you get packages with high cohesion and modularity with low coupling between features.
I agree with you that the googlesamples/android-architecture repo is a good example of package-by-feature. I've just taken the extra step of putting my screen specific packages into a root ui package (Note that the Google sample has the statistics screen package at the same level as the data package).
My package structure is heavily inspired by JakeWharton/u2020.
Hopefully this clears it up a little bit.

Ahh, that makes sense. Thanks a lot! 👍


Since updateing to androidx haveing too many errors/crashes

Hi since updating to androidx i have too many crashes.
My app version on google play has 100% crash-free and now only 70%.
a lot of error from different libraries, all of them have a common error
"No implementation found for method"
i think there is problem with the registrar.
Mainactivty used to have in on creating a line to register modules but now we have deleted it and letting flutter activity to handle it but something changed.
Don't ease with this report and throw the responsibility on other libraries, im pretty sure its something wrong here.
Thanks
Doctor all good. tried to delete, clear and all.  v1.12.13+hotfix.9

Hi @dvird
could you please
double check your project implements correctly androidX migration
and run flutter upgrade --force;
if the issue persists please provide
your your flutter doctor -v ,
your flutter run --verbose,
your pubspec.yaml
and a reproducible minimal code sample.
Thank you

Without additional information we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


WinUI3 API Links bring to 404 Page

Any API link brings to 404
Steps to reproduce the bug

Open WinUI 3 Gallery
Open page for any control
Under Documentation , click controlname - API
Microsoft page to 404 Page Not Found

Example: RichText Block

404 Link

Version Info

Gallery version
<IP_ADDRESS>
UPDATE 6/6 2022:
Issue still there on new version  <IP_ADDRESS>

Related: https://github.com/MicrosoftDocs/windows-uwp/issues/3872

Agree, it is a similar, but it is not the same. This is for Button Api, not RichTextBlock. Both bugs are valid, they may or may not have the same root cause.

Agree, it is a similar, but it is not the same. This is for Button Api, not RichTextBlock. Both bugs are valid, they may or may not have the same root cause.

RichTextBlock was an example I showed but they all don't work still on new update.

@gregwoo-microsoft The WinUI 3 Gallery API reference buttons now link to the WinUI 2.8 doc content, which is an improvement over 404 errors, but they still need to be updated to point at the new WASDK API docs.
https://docs.microsoft.com/windows/windows-app-sdk/api/winrt/


And then

Description

Resolves # (issue)
How Has This Been Tested?

Due Dilligence

[x] Breaking change
[x] Requires a documentation update

Description
Resolves # (issue)
How Has This Been Tested?
Due Dilligence

[x]  Breaking change
[x]  Requires a documentation update


Operator Precedence Bug (Exponentiation)

EDIT: During the writing of this issue I noticed two additional things:

There seems to be some floating point inaccuracy in general.
There is some discrepancy in floating point results between bend run and bend run-c.

I don't know if those are worthy of separate issues. /EDIT
The example in GUIDE.md with area calculation reveals an operator precedence bug:
type Shape:
  Circle { radius }
  Rectangle { width, height }

def area(shape):
  match shape:
    case Shape/Circle:
      return 3.14 * shape.radius ^ 2.0
    case Shape/Rectangle:
      return shape.width * shape.height

def main:
  return area(Shape/Circle { radius: 10.0 })

This program returns 985.938 = (3.14 * 10.0)^2.0 and not 313.996 = 3.14 * (10.0^2.0), as expected. Tested with bend run and bend run-c on Apple M2. Both numbers also deviate from what you get with python.
An additional note is that I get slightly different results with run and run-c, when I replace
return 3.14 * shape.radius ^ 2.0 -> return 3.14 * (shape.radius ^ 2.0)

The results will inevitably be different because we use a 24 bit representation as opposed to 64 bit floats in python. There is also some bugs in the float implementation we're currently fixing.
For the exponentiation, we added ** which has the right precedence, keeping ^ for bitwise xor. We're currently updating the documentation

Alright, thank you for the explanation! Let me just add that I think HVM/Bend is an amazing idea, keep up the good work.


Improved design system for Movie Component

Need to improve this component on \<Movie>\src\<Movie.design-system.mdx>
Improvements required :
Any reference image?
Any external reference?
You can checkout this one for better understanding.

@Rajdip019 Please assign me


Update 08_using_compose.md

Proposed changes

Helps the reader to parse the sentence better.
Unreleased project version (optional)

Related issues (optional)

LGTM?


Blacklisting flooding IPs based on last connect and numbers

If we want to blacklist some IPs (when they are flooding/ddos) should we do this in our own python code or is it wise to implement it in websockets?
I am currently using MongoDB as backend (or redis can be choosen) and log the activity with minimum data. (IP=LAST_CONNECT). If same IP exceeds the limit, then i just close() without recv().

I think that's out of scope for websockets. DoS mitigation is a complex topic with no one-size-fits-all answer.
You have at least ways to do this with websockets:

call a method that perform the check in the handler, you'll need remote_address -- note that it may not be accurate if you deploy websockets behind a reverse proxy.

subclass WebSocketServerProtocol to do this at the level of the HTTP handshake.

However mitigating DoS in the application layer is pointless. You need to do it at the network level to have any chance to survive. Check out SaaS solutions such as CloudFlare.


Error running non-root container on containerd

Bug Report

General Information

Environment description (k3s)
Kernel version (run uname -a) 5.14.0-284.25.1.el9_2.x86_64
Orchestration system version in use (e.g. kubectl version, ...) v1.27.5+k3s1
Link to relevant artifacts (policies, deployments scripts, ...)
Target containers/pods kubearmor-operator-*

To Reproduce

Set up k3s with containerd
Deploy KubeArmor Operator using helm or manifest
Check if kubearmor operator pod is running, error exec /operator: operation not permitted is expected here

We're aware of this issue that we also faced with running (ubi-based, non-root) kubearmor container image on k8s clusters with containerd container runtime.  In these kind of scenarios the workaround is to add required capabilities to the binaries itself using the setcap during building the container image and assigning the required capabilities using the pod security context without allowPrivilegeEscalation: false. We tried all these workarounds but unfortunately none worked.
runAsUser: 1000
runAsGroup: 1000
allowPrivilegeEscalation: true

runAsUser: 0
runAsGroup: 0
allowPrivilegeEscalation: true

Related: https://github.com/kubernetes/enhancements/blob/master/keps/sig-security/2763-ambient-capabilities/README.md,
https://github.com/containerd/containerd/issues/2516
Expected behavior
The operator should run successfully without any operation not permitted error.
Screenshots
If applicable, add screenshots to help explain your problem.

@rksharma95 I also faced the same issue while trying KubeArmor installation using the operator on k0s and I temporarily fixed it by commenting the below line.
https://github.com/kubearmor/KubeArmor/blob/3bf31234d0927bdb5d5799e6b021d5dba4690de0/pkg/KubeArmorOperator/Dockerfile#L61

@rksharma95 I also faced the same issue while trying KubeArmor installation using the operator on k0s and I temporarily fixed it by commenting the below line.
https://github.com/kubearmor/KubeArmor/blob/3bf31234d0927bdb5d5799e6b021d5dba4690de0/pkg/KubeArmorOperator/Dockerfile#L61

What was the container runtime? If it's containerd is this temporary fix worked on containerd?

What was the container runtime? If it's containerd is this temporary fix worked on containerd?

Yes it is containerd.

@anurag-rajawat we've tried this workaround but unfortunately it never worked for us. you can see the failure here https://github.com/kubearmor/KubeArmor/actions/runs/6113392565/job/16664338697?pr=1270 , i'm not sure if it's working in a containerd env.