fix(robot-server): Ensure maintenance runs properly cleanup and manage live stream #20274
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.
Overview
Covers RQA-4810
Originally the maintenance run didn't purposefully interface with the live stream at all. However because when a run finishes the livestream status is set to "Off" as part of post-run cleanup, maintenance runs were unintentionally disabling the live stream for an existing "encapsulating" run. For example, if a live stream was enabled and pulled up during run setup, and the client opens the pipette calibration flow, as soon as the maintenance run ends the live stream would also end, even though the primary run hadn't begun yet. This addresses that by ensuring we handle live stream creation and shutdown under maintenance runs the same way we do for real runs, and also when a maintenance run is deleted if an existing run is present it's camera settings will be used in a stream service update request.
Test Plan and Hands on Testing
Changelog
Added live stream update coverage to maintenance run behavior.
Review requests
Risk assessment
Low - effects new stream behavior.