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(shared-data): Fix migrating mutable pipette configs #16962

Merged

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Nov 22, 2024

Overview

Closes RQA-3676.

Test Plan and Hands on Testing

  • Change a bunch of pipette settings on an OT-2 and make sure they take effect? It's not clear to me what the user-observable behavior of the bug would have been. Would all the settings have acted as their defaults?
    • In particular, change tip pickup settings?

Changelog

Review requests

Is there a more useful test to check that could check the correctness of the result, not merely that no exceptions are logged?

Risk assessment

I (Max) think this is high-risk because I understand maybe 40% of it. Those more familiar with the code might find it less worrying.

@SyntaxColoring SyntaxColoring changed the base branch from edge to chore_release-8.2.0 November 22, 2024 20:20
Comment on lines +61 to +63
elif thiskey == "##EACHTIP##":
for key in existing.keys():
_do_edit_non_quirk(new_value, existing[key], restkeys)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does this other function need the same change?

def _edit_non_quirk_with_lc_override(
mutable_config_key: str,
new_mutable_value: Any,
base_dict: Dict[str, Any],
liquid_class: Optional[LiquidClasses],
) -> None:
def _do_edit_non_quirk(
new_value: Any, existing: Dict[Any, Any], keypath: List[Any]
) -> None:
thiskey: Any = keypath[0]
if thiskey in [lc.name for lc in LiquidClasses]:
if liquid_class:
thiskey = liquid_class
else:
thiskey = LiquidClasses[thiskey]
if len(keypath) > 1:
restkeys = keypath[1:]
if thiskey == "##EACHTIP##":
for key in existing.keys():
_do_edit_non_quirk(new_value, existing[key], restkeys)
else:
_do_edit_non_quirk(new_value, existing[thiskey], restkeys)
else:
# This was the last key
if thiskey == "##EACHTIP##":
for key in existing.keys():
existing[key] = new_value
else:
existing[thiskey] = new_value
new_names = _MAP_KEY_TO_V2[mutable_config_key]
_do_edit_non_quirk(new_mutable_value, base_dict, new_names)

@SyntaxColoring SyntaxColoring marked this pull request as ready for review November 22, 2024 20:44
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner November 22, 2024 20:44
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

works for me. very confused though

@SyntaxColoring SyntaxColoring merged commit 453cd47 into chore_release-8.2.0 Nov 22, 2024
56 checks passed
@SyntaxColoring SyntaxColoring deleted the mutable_pipette_config_migration_fix branch November 22, 2024 20:59
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