-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Run blocking plans via websockets #1413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tpoliaw
wants to merge
63
commits into
main
Choose a base branch
from
ws
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
0da7859
wip
abbiemery 5f2c5a8
client wip
abbiemery c20142f
use normal iter
abbiemery a4d55a3
close ws
abbiemery b451b43
add some trys
abbiemery 1c714cf
unpipe
abbiemery 459d0c6
Move websocket handling into BlueapiRestClient
tpoliaw 21ffc04
Send all events through websocket
tpoliaw f875a97
Split pipe subscribe handles
tpoliaw 742e282
Re-use run subcommand for websockets
tpoliaw 49631ae
Raise for connection closing pre plan completed
abbiemery 3c5da01
Remove run blocking from cli
abbiemery 39f07f2
Catch plan key error in run_plan
abbiemery 5340642
Refactor event pipe handling into context manager and iterable
tpoliaw 4108ee2
Testing auth tokens
tpoliaw cf15ad9
Re-use existing auth dependency for websocket endpoint
tpoliaw 25cc3a2
Add user auth token in websocket client
tpoliaw a19c3b3
Read authorization from cookie as well as header
tpoliaw a1d3fcb
Add user agent to websocket request
tpoliaw 4cf44e0
Add user agent to all requests
tpoliaw 89ce9dc
Use new fedid dependency for user name
tpoliaw 850fbe7
Test auth from cookie
tpoliaw bef1e0f
Fix CLI event handler test
tpoliaw f06c711
Reinstate _valid_return check
tpoliaw f4d42ca
Use versioned api for websockets
tpoliaw ef449f2
Add type annotation to unpipe
tpoliaw 7b51ccd
Move ws endpoint to v2 api
tpoliaw b86fe7b
Use Depends for header and cookie
tpoliaw cdf2eab
Add sub-protocol to ws communication
tpoliaw a6891bd
Used configured host for websockets
tpoliaw b47d237
Add debug logging of all websocket traffic
tpoliaw 0e240fb
Include connection info in logging
tpoliaw d408524
Split receive logging by type
tpoliaw 5c02da5
Correct typing in rest run_blocking
tpoliaw 9342695
Use rstrip instead of removesuffix to remove multiple trailing slashes
tpoliaw 0ebaf4a
Redact auth tokens in websocket logging
tpoliaw 7e4d699
Use send_text instead of send json
tpoliaw 58ea19e
Improve error handling
tpoliaw 4775648
Check for active task before running task
tpoliaw a338313
Filter events to only relevant ones
tpoliaw 0643867
Logging adjustments
tpoliaw 74633d0
Exclude all private methods from blueapi_rest_client_get_methods
tpoliaw d7c8b71
Move ws_address method to config and deal with empty paths
tpoliaw 813d57c
Add tests for websocket tracing
tpoliaw b956130
Handle pydantic's messing up of URL paths
tpoliaw 2d61d5c
Extract cookies/headers from connection manually
tpoliaw 51d1f29
WorkerEvent property tests
tpoliaw c5d7039
More coverage hunting
tpoliaw 81d30ec
Add interface pipe tests
tpoliaw ba3fdc8
Fix runner tests
tpoliaw 212030f
More tests
tpoliaw 45adeb0
Start to test main method
tpoliaw d47db6f
Add rest client run_blocking tests
tpoliaw aee641e
test rest ws auth
tpoliaw 20c6226
Add tests for main run_plan handler
tpoliaw 1604a11
Pin uvicorn to 0.49 until websockets are fixed
tpoliaw becb7e7
Add system test to run a plan via websocket
tpoliaw 7274938
Add authz to ws
tpoliaw 6c085ac
Handle server being missing
tpoliaw 32068a9
Add websocket auth tests
tpoliaw 6b028d9
Add unit test for ws auth check
tpoliaw 48c390f
Update uvicorn post ws fix
tpoliaw 34de3f8
Add service unavailable ws test
tpoliaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.