-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(app,robot-server): Subscribe to currentlyRecoveringFrom
notifications
#15242
Conversation
* Mark `RunHooks` and `EngineStateSlice` as private. * Rename `initialize()` to `start_publishing_for_run()`, because "initialize" was reading to me like a one-time thing for the instance. * Remove unused attributes. * Use "new" instead of "current" in variable names, because "current" already has a different meaning in "current command" and "currently recovering from."
For symmetry with how the field is named in the HTTP response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I forgot to submit these comments!
This looks great overall. Just a few things to fix.
robot-server/robot_server/service/notifications/publishers/runs_publisher.py
Show resolved
Hide resolved
robot-server/robot_server/service/notifications/publishers/runs_publisher.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, thank you for implementing this!
I'll probably test this on Monday and merge it then, assuming all goes well. |
Overview
Closes EXEC-458.
Test plan
pickUpTip
failurepickUpTip
failure happensAnd maybe check the app or server logs to make sure it doesn't spam network requests, especially when notifications are unavailable.
Changelog
...current_command
MQTT topic, which was "the equivalent ofGET /runs/:runId/commands?cursor=null&pageLength=1
, to...command_links
, which is the equivalent of thelinks
field of anyGET /runs/:runId/commands
query.links
update with a newcurrentlyRecoveringFrom
command ID, it will do a separateGET /runs/{id}/commands/{id}
query to fetch the full details of the command.Review requests
Several frontend questions because I don't know what I'm doing there. See my GitHub comments below.
Risk assessment
Probably at least a medium risk of breaking recent unreleased work (#15170). Although we can cover these notifications hooks with tests, it doesn't look like those tests are in a good position to make sure the UI is actually doing the correct thing overall.