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

fix(api): missed one link in the chain of loading config values #17154

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

ryanthecoder
Copy link
Contributor

Overview

Data was loading in shared data but I didn't realize that the pipette_handler was truncating the settings.

Test Plan and Hands on Testing

Changelog

Review requests

Risk assessment

@ryanthecoder ryanthecoder requested a review from a team as a code owner December 19, 2024 19:39
@ryanthecoder ryanthecoder force-pushed the RQA-3798-available-sensor-bug branch from 87d209d to 9ff7852 Compare December 20, 2024 15:58
Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

I don't really understand the original code, but these changes seem reasonable given the existing pattern, if this has been tested to work.

There's a Thermocycler test failing, but I don't see how that could be related to your changes here?

@@ -289,6 +290,7 @@ def get_attached_instrument(self, mount: OT3Mount) -> PipetteDict:
"drop_tip": instr.plunger_positions.drop_tip,
}
result["shaft_ul_per_mm"] = instr.config.shaft_ul_per_mm
result["available_sensors"] = instr.config.available_sensors
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need both this and the change above? It looks like adding "available_sensors" to the list should automatically copy the key from instr?

@@ -289,6 +290,7 @@ def get_attached_instrument(self, mount: OT3Mount) -> PipetteDict:
"drop_tip": instr.plunger_positions.drop_tip,
}
result["shaft_ul_per_mm"] = instr.config.shaft_ul_per_mm
result["available_sensors"] = instr.config.available_sensors
return cast(PipetteDict, result)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why we build the result dict this way? It seems like this bug could have been prevented if we constructed it like result: PipetteDict = { ... } so the type checker could catch the missing key.

@ryanthecoder ryanthecoder merged commit a80aa00 into edge Dec 20, 2024
53 checks passed
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.

2 participants