-
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
refactor(robot-server,api): wire up JSON protocol runner to /sessions #7935
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #7935 +/- ##
==========================================
- Coverage 93.48% 83.86% -9.63%
==========================================
Files 130 352 +222
Lines 5141 21730 +16589
==========================================
+ Hits 4806 18223 +13417
- Misses 335 3507 +3172
Continue to review full report at Codecov.
|
protocol = None | ||
|
||
if isinstance(create_data, ProtocolSessionCreateData): | ||
protocol = protocol_store.get(protocol_id=create_data.createParams.protocolId) |
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.
This may raise a ProtocolNotFound
(or something) error from the ProtocolStore
and needs to map to a 404
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.
Paired and reviewed in a call. Looks good to me, assuming CI passes. 🦜 🕺
Overview
This PR gets us pretty close to #7808.
start
action to kick off the runThere's still a few items to address before I think 7808 can be considered complete, but we're almost there!
CommandState.get_next_request()
#7936)CommandTranslator
Changelog
ProtocolEngine::add_command
ProtocolSession
response model type(s)EngineStore
to create and load anAbtractFileRunner
if neededReview requests
Postman testing collections here
POST /protocols
with a JSON protocolshared-data/protocol/fixtures/5/simpleV5.json
and stripped out all the commands thatCommandTranslator
doesn't know aboutPOST /sessions
withsessionType: "protocol"
andcreateParams: { protocolId: "{{ protocol_id }}" }
POST /sessions/{{ session_id }}/actions
withactionType: "start"
Risk assessment
Low. Feature-flagged endpoints.