-
Notifications
You must be signed in to change notification settings - Fork 301
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
Add command for canceling a running a build #2958
Conversation
Noting that accepting |
Oh, |
5ad9725
to
a27c4b4
Compare
clicommand/build_cancel.go
Outdated
$ buildkite-agent build cancel | ||
|
||
# Cancel a different build | ||
$ buildkite-agent build cancel --build "01234567-89ab-cdef-0123-456789abcdef"` |
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.
Based on @DrJosh9000's suggestion, is this clear enough for you @dabarrell that we require a UUID?
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.
Missed this, sorry! yep!
bd5cc5b
to
debec2a
Compare
🎵 Hello from the other side! 🎵 How does this relate to https://buildkite.com/docs/apis/rest-api/builds#cancel-a-build? I'm guessing this will eventually be hooking itself into (via the agent endpoints?) that eventual server codepath? If so, might be nice to put in PR description to disambiguate (which may be a "me" problem because I was linked here and mildly was expecting something of the same shape as "cancel as failing", which this may be a precursor to, but isn't 1:1 that feature just yet) |
@thejcannon Yep, exactly. It'll be using an agent endpoint, authenticating with an agent token rather than hitting up the bk user REST API.
Yeah we did discuss briefly whether or not it would make sense adding a "fail" flag as part of this change but landed on a build "failing" being a symptom of having a failed job. I'll have a bit more of a discussion with the team around that specific change, but I suspect it'll be tackled in addition to this change. |
96091c8
to
61874b1
Compare
Here's an example of the flow: Screen.Recording.2024-10-28.at.11.55.01.am.mov |
61874b1
to
bce3305
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.
LGTM! 🍏
Description
This PR drops in a new CLI command for canceling a running build.
Note: Currently blocked on agent endpoint being added
Example usage:
Testing
go test ./...
). Buildkite employees may check this if the pipeline has run automatically.go fmt ./...
)