Skip to main content

Allow canceling proposed runs that are planning via push policies

Currently you can only cancel a run if a worker hasn’t started doing things with it, but we’d like to entirely (and safely - i.e., not leaving a broken terraform lock around) cancel runs where we know there’s a newer commit that also needs to be planned.

Workaround
Problem
Status: ❌ Rejected2 comments

Log in to comment and vote

Comments2

  • Jonah Kowall

    Team•

    Jul 5

    Thanks for flagging this we agree there's a real inefficiency here when a newer commit makes an in-flight plan moot, especially on stacks where plans take a few minutes.


    We're not planning to build automatic cancellation via push policies in the near term. In the meantime, the workaround holds up well: you can cancel the in-progress run manually from the UI or via the API as soon as you know a newer commit supersedes it, this is safe and won't leave a broken lock behind.

    We'll keep this open for votes and revisit if we see more demand or a broader push-policy-driven run lifecycle initiative takes shape. Feel free to add more detail on your specific workflow if it'd help make the case.

  • Tomato Oak

    •

    Feb 23

    We have a similar use-case I’d describe fundamentally as follows:

    We propose runs on pull requests.
    We track runs on merges to main

    When a pull request is merged to main, the policy evaluates a tracked run off the push component of the event. But, if this run is merged before the proposed run in the pull request was ever started, we have no way to cancel that (now useless) proposed run, because it is of a different type.

    As such we’d specifically love to be able to have a tracked run be able to cancel a proposed run. At present we’re only able to do this manually or via the API.