fix(api): OT-2 attempting to connect modules via temporary ports #15134
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.
Closes AUTH-379
Overview
#14345 updated the module ports filtering to exclude any temporary ports created by udev. But the regex used for port name matching filters out only Flex port names (e.g.
ot_module_thermocycler2.tmp-c166:2
). This PR adds regex to filter out OT-2 temp ports as well (e.g..#ot_module_thermocycler0b494617b5e4f08ae
).Test Plan
Before this PR, when you connect a module on the OT-2, you should see something like the following in the logs (doesn't affect actual module connectivity):
With the changes in this PR, this error should never happen and the module should get connected correctly over its expected port.
Test that Flex modules' connectivity isn't affected by this either.
Review requests
I'm still new to regex and looks like there are a few ways to write the pattern to filter out the temp port names. So let me know if there's a better regex pattern for this.
Risk assessment
Medium. Can affect module connectivity but is easy to test and rule out any issues.