-
Notifications
You must be signed in to change notification settings - Fork 178
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
fix(api): get_slice should return last executed command if a run failed #14449
fix(api): get_slice should return last executed command if a run failed #14449
Conversation
This reverts commit cb5f359.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.2.0 #14449 +/- ##
======================================================
Coverage ? 68.07%
======================================================
Files ? 2522
Lines ? 72043
Branches ? 9223
======================================================
Hits ? 49043
Misses ? 20809
Partials ? 2191
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Looks good and definitely fixes the issues faced by the current endpoint on JSON protocols. Tested on RSS Flex, performs as expected and does not raise incorrect modals in the case provided by RQA-2242.
Question below seeking some clarification:
This comment was marked as resolved.
This comment was marked as resolved.
Recapping a conversation that RSS had in a call: As-is, this PR only fixes the behavior for the current run, which is served from memory, and not for historical runs, which are served from the database. Ideally, the behavior between the two should certainly be consistent. We need to ask the app team what the priority is for solving this for historical runs. One way to solve this for historical runs 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.
Check out my two comments above about the target branch and historical runs, but when those are answered, this looks great to merge. Thank you!
robot-server/tests/integration/http_api/runs/test_json_v6_run_failure.tavern.yaml
Show resolved
Hide resolved
This reverts commit 3324fb3.
spoke to @shlokamin and historical runs are not urgent. will create a ticket |
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.
Looks good to me!
Overview
closes RQA-2243.
if a run has failed and the cursor is not supplied we should return the last executed command.
Test Plan
Upload a json protocol that will have a failed command.
Once run has failed fetch
/runs/{runId}/commands
make sure you are getting back the failed command and not the last command.Test python protocols as well
Test successful protocols with and without cursor.
Added integration tests
Changelog
Review requests
are you ok with this approach? is it better to store the failed command in a variable?
Risk assessment
low. should only affect failed protocols.