-
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 artefact test executions #173
Conversation
7e6c59b
to
9ab0b5e
Compare
7df6328
to
5b66de7
Compare
5b66de7
to
a2823a4
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, just one concern about the review decision filter
RerunArtefactTestExecutionsRequest, | ||
) | ||
|
||
router = APIRouter(tags=["artefacts"]) |
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 adding the tag here 😄
|
||
class RerunArtefactTestExecutionsRequest(BaseModel): | ||
test_execution_status: TestExecutionStatus | None = None | ||
test_execution_review_decision: list[TestExecutionReviewDecision] | None = None |
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.
The review_decision
is defined as a set in the TestExecutionDTO
, although here it wouldn't really change a lot, if you want we can make it a set
test_executions = (te for te in test_executions if te.status == status) | ||
if (decision := request.test_execution_review_decision) is not None: | ||
test_executions = ( | ||
te for te in test_executions if te.review_decision == decision |
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.
If we don't define the review decision as a set maybe here we should do set comparison instead of list as the order doesn't really matter.
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.
ah very good point
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.
LGTM! Thanks for addressing the comment!
This is the backend side of https://warthogs.atlassian.net/browse/RTW-307
Changes:
POST /v1/artefacts/<artefact-id>/reruns
that allows user to rerun all test executions belonging to an artefactNote that CI will fail until we merge and rebase #172