StepRunner: ignore archived reagent kits when adding default reagents to a step #53
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.
If a reagent kit is associated to a step, and is later archived, then when running the step manually using the Clarity GUI, the reagent kit will (correctly) not be shown on the step's Record Details screen.
However, the association between the step and archived kit is retained, and when making an API request using something like self.step.configuration.required_reagent_kits, the archived kit will be returned by the API.
If the API is then used to add a lot to the archived kit on the step, and advance the step, the Clarity API will correctly - but confusingly - return an error stating that the reagent kit is not permitted for the step.
This patch modifies the add_default_reagents() function of the StepRunner to ignore any reagent kits found on the step that are archived, instead of adding a lot to them. This prevents workflow tests from suddenly breaking because a customer decided to archive a reagent kit without removing it from a step first.