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

backend: add cancel update buttons #5461

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

landism
Copy link
Member

@landism landism commented Feb 7, 2022

  1. For each resource created by a Tiltfile, the Tiltfile reconciler adds a UIButton to cancel builds for that resource.
  2. The build controller watches that button and cancels builds as appropriate.

This is hidden behind a feature flag pending a frontend PR for styling. Until that's done, this works fine and displays as a normal, user-added UIButton in the web ui. We could probably just ship with a bit of icon/text tweaking, but the frontend work should be pretty quick.

Notes

  • I'm kind of on the fence between a) one cancel button per manifest (like in this PR), b) one cancel button per build (have the build controller create the UIButton when starting a build and remove it when it's done). The latter hadn't occurred to me until I'd already implemented the former, and I haven't come up with any super compelling arguments either way. I think it'd be pretty easy to change, if anyone wants to make the case.
  • We'll probably want a CancelOnSpec at some point, but I'm not sure it's worth it before we put this stuff in the API.

@landism landism requested review from nicks and milas February 7, 2022 21:17
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #13230: implement cancel builds on backend.

Copy link
Contributor

@milas milas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE: Manifest vs per-build, your approach makes sense to me. I'm struggling to think of a valid use case for canceling an individual part of the "build pipeline" for a manifest, so not sure if there'd be a tangible benefit to that. (Also, from a purely UX perspective, having buttons popping in and out seems icky)

internal/controllers/core/tiltfile/api.go Outdated Show resolved Hide resolved
internal/controllers/core/uibutton/reconciler.go Outdated Show resolved Hide resolved
internal/engine/buildcontroller.go Outdated Show resolved Hide resolved
@landism landism merged commit 603a71e into master Feb 9, 2022
@landism landism deleted the mlandis/sc-13230/implement-cancel-builds-on-backend branch February 9, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants