-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(app, api-client, react-api-client): send CSV RTP file to robot before creating protocol and run #15527
Conversation
…efore creating protocol and run The new RTP paradigm for utilizing CSV files as runtime parameters requires sending the ID of the file to be used as the value in the `runTimeParameterValues` object sent with `createProtocol` and `createRun`. Here, we send any selected RTP files to the new `/dataFiles` endpoint and await the response containing an ID for each file. We then associate the returned ID with its respective runtimeparameter variable name, and send that key:value pair along with the other value runtimeparameters.
react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx
Show resolved
Hide resolved
react-api-client/src/dataFiles/__tests__/useUploadCsvFileMutation.test.tsx
Show resolved
Hide resolved
@koji Do you mean for the description? I mean literary the icon. Another is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment about Parameter Table's csv file part, but the changes look good to me.
Overview
The new RTP paradigm for utilizing CSV files as runtime parameters requires sending the ID of the file to be used as the value in the
runTimeParameterValues
object sent withcreateProtocol
andcreateRun
. Here, we send any selected RTP files to the new/dataFiles
endpoint and await the response containing an ID for each file. We then associate the returned ID with its respective runtime parameter variable name, and send that key:value pair along with the other value runtime parameters.Test Plan
This is a little tricky to test right now because the
/dataFiles
endpoint is not yet wired up, and the/protocols
and/runs
endpoint only accepts<variableName>: <value>
pairs forrunTimeParameterValues
, not the new format of<variableName>: {file_id: <id>}
for CSV parameters.Protocol card and detail
upload protocol that requires CSV file parameter like this:
rtp_tests.py.zip
verify that
CSV file required
banner renders on protocol cardselect protocol card
verify that
CSV file required
banner renders on protocol detailsChangelog
ChooseProtocolSlideout
andChooseRobotToRunProtocolSlideout
, and use returned IDs inrunTimeParametersValues
sent withcreateRunFromProtocolSource
getAnalysisStatus
util to return newparameterRequired
status when analysis result isparameter-value-required
useCreateProtocolMutation
to acceptrunTimeParameterValues
argument in its returned mutation's callback rather than in the hook's invocation itselfReview requests
Go through flow of uploading a CSV parameter protocol according to test plan above. Expected behavior is for a
runCreationError
to be raised when confirming value because the robot server does not yet know what to do with CSV parameter runTimeParameterValues overrides.Risk assessment
medium