-
Notifications
You must be signed in to change notification settings - Fork 3
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
Rerun filtered environments button #179
Conversation
78dea65
to
4d0404f
Compare
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.
Overall looks good to me, but I have two small concerns
if not te: | ||
msg = f"No test execution with id {request.test_execution_id} found" | ||
msg = f"No test execution with id {test_execution_id} found" |
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 way of checking whether the Test Execution ID is valid might lead us to the API behaving somewhat inconsistent. For example, if only one of the test execution IDs provided is invalid, then all test executions appearing before it would have been rerun, while the ones after it wont.
Maybe a better way we can handle this is to firstly filter just test executions whose id is in the set, and then create TestExecutionRerunRequest
just for those? Or maybe just ignore the ones that have invalid ID, instead of raising the HTTPException
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.
Good point. I opted to rerun everything that can be rerun. Then return a list of what was rerun. If nothing gets rerun then I return a status code of 404. If everything gets rerun then a status code of 200. And if some rerun and others don't then I return 207.
4d0404f
to
4f3b12c
Compare
6330619
to
e610c23
Compare
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.
Thanks for addressing the issues! Looks good to me now!
Resolves https://warthogs.atlassian.net/browse/RTW-307
Changes:
POST /v1/test-executions/reruns
endpoint to take a set of test execution ids to rerun instead of just onePOST /v1/artefacts/<artefact-id>/reruns
endpoint as I used the endpoint above instead. The reason is that this endpoint will have to filter exactly as the frontend does. This could be prone to errors, so instead I'd rather rerun exactly what the frontend user can seeRerunFilteredEnvironments
you can see how it works in the video belowfilteredTestExecutionIds
provider withfilteredTestExecutions
Screencast.from.2024-05-09.13-34-33.webm