Skip to content
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(robot-server): add runtime parameter definitions to run summary #14866

Merged
merged 6 commits into from
Apr 12, 2024

Conversation

jbleon95
Copy link
Contributor

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 #14762

Because 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 and pipettes 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

  • Added runTimeParameters field to the Run ResourceModel returned via the GET /runs and /runs/{run_id} endpoints.
  • Added new column 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 json

Review 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.

@jbleon95 jbleon95 requested review from a team as code owners April 11, 2024 13:59
Copy link
Member

@sanni-t sanni-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
Just the model field description change request.

robot-server/robot_server/runs/run_models.py Outdated Show resolved Hide resolved
robot-server/robot_server/runs/run_models.py Outdated Show resolved Hide resolved
@jbleon95 jbleon95 merged commit b358ebe into edge Apr 12, 2024
7 checks passed
@jbleon95 jbleon95 deleted the rtp_in_run_summary branch April 12, 2024 13:54
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…14866)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants