fix(rpc): ensure load name is attached to RPC "containers" #4530
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
Prior to this PR,
/tiprack/i
against thetype
field of the RPCContainer
Container.type
was set to thename
of the v2Labware
classLabware.name
was always set to the load name of the labware#4452 introduced a change that set
Labware.name
to the passed-inlabel
parameter of the labware if it was used. This broke tiprack detection in the client anytime label was set to a string that didn't contain the exact case-insensitive string "tiprack".The Protocol Designer always passes in the display name of the labware as label by default, which means tiprack detection was automatically broken for all PD protocols.
This PR adds a new getter method to
Labware
forload_name
, which is now used to setContainer.type
. Additionally, it adds aContainer.is_tiprack
property, which the RPC client will use in favor of the regex if available. Finally, it changes the regex (now only used as a back-compat backup) to/tip ?rack/i
to match on our tiprack display names as well as load names.changelog
review requests
Exhaustive QA sheet. This is a pretty small PR codewise, so I'd be ok giving this PR some smoke tests and then using the list below to invalidate the necessary entries in the 3.15 master QA