usb/sagas: Retry USB device open on Linux if SecurityError occurs#2361
usb/sagas: Retry USB device open on Linux if SecurityError occurs#2361
Conversation
814d85b to
f91242c
Compare
|
@laurensvalk, does this fix the issue for you? |
9ea524e to
576d9c4
Compare
On slow machines, udev rules may not have finished processing by the time we try to open the USB device. This causes a SecurityError, so we add a retry loop to handle this case. Closes: pybricks/support#2372
Add a step to upload the build artifact after building the project. This will make it easy for people to test it without having to build it themselves.
576d9c4 to
532852d
Compare
| - name: Set env to labs | ||
| run: | | ||
| echo "REACT_APP_NAME=Pybricks Labs" >> $GITHUB_ENV | ||
| echo "REACT_APP_SUFFIX=-labs" >> $GITHUB_ENV | ||
| echo "REACT_APP_VERSION=$GITHUB_SHA" >> $GITHUB_ENV | ||
| - run: yarn build | ||
| - uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: pybricks-labs | ||
| path: build |
There was a problem hiding this comment.
is this something we would occasionally add for particular PRs that need testing? (Otherwise how do we handle more than one PR?)
There was a problem hiding this comment.
It doesn't automatically publish anywhere. It it just uploads the artifact to GitHub. One could download it and run it locally with serve.py to test a PR without having to build it themselves. Or we can throw it on labs.pybricks.com if we want wider testing.
Yes. Generally after the first
|
| continue; | ||
| } | ||
|
|
||
| // TODO: show error message to user here |
There was a problem hiding this comment.
Could we make a issue/task for TODOs like these?
There was a problem hiding this comment.
Do you want one issue per error message or one for all of them? I don't remember if we have an issue for this in general or not.
Fix a race condition where a response to a USB command could be missed if it arrives before the USB transferOut() call returns. This is done by using a channel to buffer incoming responses. Fixes: pybricks/support#2467
On slow machines, udev rules may not have finished processing by the time we try to open the USB device. This causes a SecurityError, so we add a retry loop to handle this case.
Closes: pybricks/support#2372