Skip to content
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

x/build/cmd/coordinator: implement trybot set cancellation #35701

Closed
bradfitz opened this issue Nov 19, 2019 · 5 comments
Closed

x/build/cmd/coordinator: implement trybot set cancellation #35701

bradfitz opened this issue Nov 19, 2019 · 5 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Milestone

Comments

@bradfitz
Copy link
Contributor

TryBot runs can't be canceled right now. It's mostly implemented, but ends here:

// cancelBuilds run in its own goroutine and cancels this trySet's                                                                                                   
// currently-active builds because they're no longer wanted.                                                                                                         
func (ts *trySet) cancelBuilds() {
        // TODO(bradfitz): implement                                                                                                                                 
}

So they don't actually cancel.

/cc @cagedmantis @dmitshur @bcmills

@gopherbot gopherbot added this to the Unreleased milestone Nov 19, 2019
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 19, 2019
@gopherbot
Copy link

Change https://golang.org/cl/207842 mentions this issue: cmd/coordinator: implement trybot set cancellation

@agnivade
Copy link
Contributor

Pardon the comment on a closed issue, but it wasn't clear in the CL, so I wanted to clarify: When does the cancellation happen ? Can it be triggered from the UI ? Or it is always automatic ? If so, does it happen when someone uploads a new patchset while an existing run is happening ?

@dmitshur
Copy link
Contributor

dmitshur commented Nov 20, 2019

I understand what's implemented now is that when a "Run-TryRun" vote is deleted in Gerrit, the try run is canceled. For example, see https://go-review.googlesource.com/c/sys/+/207858/3#message-dfc5c634bdb023398d74a476d3ba5f100beef00f.

Edit: My understanding is based on a quick read of https://github.com/golang/build/blob/f7862f789e264f7bf2f6cca4ce8231ec9034249a/cmd/coordinator/coordinator.go#L1013-L1016 and may be wrong.

@agnivade
Copy link
Contributor

Thanks. That looks like one needs the "Delete-tryrun" permission bits. It would be nice to have it automatically cancel a running build when a new patchset is mailed.

@bradfitz
Copy link
Contributor Author

@agnivade, new patchsets automatically delete the Run-TryBot vote, because we don't have https://gerrit-review.googlesource.com/Documentation/config-labels.html#label_copyMaxScore set to true on that label.

So you don't need any new permissions to cancel a trybot run. You just need to upload a new patchset.

@golang golang locked and limited conversation to collaborators Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

4 participants