feat(robot-server): add runtime parameter definitions to run summary #14866
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
Closes AUTH-105
This PR adds the runtime parameter definitions to the run summary for both current and non current runs, accessible via the
GET
/runs
and/runs/{run_id}
endpoints. These definitions contain all parameter settings, including the value used during the run itself. An additional column,run_time_parameters
was added to the run table in the database, along with a migration step for it in the existing v3 to v4 database schema migration added in PR #14762Because we don't actually parse a run's parameters until the run has first started, when a run is first created, it will not have any runtime parameters. This matches the pattern for other values in the run summary, like
labware
andpipettes
that don't get populated until it reaches that step of the protocol (typically the beginning by convention). This means if a protocol is cancelled before it starts, the RTP values will be empty for that summary. Otherwise, it will reflect the parameters used.Test Plan
On robot testing using postman to ensure that current and non current runs returned the correct parameters in the response to the
GET
runs endpoints. Also tested on robot that the migration worked and that older runs from v3 schema were properly migrated to the v4 schema. Unit and integration test coverage along with this as well.Changelog
runTimeParameters
field to theRun
ResourceModel
returned via theGET
/runs
and/runs/{run_id}
endpoints.run_time_parameters
to the run table for v4 database schema, along with serialization and deserialization methods for a list of pydantic objects to and from jsonReview requests
Risk assessment
Lowish-medium, adds new data to an existing endpoint but changes are small in scope and have been tested and covered by automated tests.