-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Added cancel build endpoint #7605
Conversation
$build = $dbForProject->getDocument('builds', $buildId); | ||
if ($build->getAttribute('status') === 'cancelled') { | ||
return; | ||
} |
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.
I see this check above, do we need to duplicate it here?
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.
I see duplication in other places too
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 duplication is intentional, since cancellation can happen at any stage and we should save compute by capturing it before time consuming tasks.
TODO: Check how to compute duration for cancelled build |
…pwrite into feat-cancel-build-deployment
What does this PR do?
Add an endpoint to cancel a build and kill the container.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
Related PRs and Issues
Checklist