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

Option to cancel pending builds if a newer build exists #964

Closed
skandragon opened this issue Mar 5, 2013 · 18 comments
Closed

Option to cancel pending builds if a newer build exists #964

skandragon opened this issue Mar 5, 2013 · 18 comments

Comments

@skandragon
Copy link

It would be nice to have an option in .travis.yml which says, in effect, "when it's my turn to have a job run, look to see if there is a newer one pending, and run it instead."

This way, if I do rapid-fire commits which create jobs of 123.1, 124.1, and 125.1, when 123.1 gets its shot it cancels 124.1 and replaces itself with 125.1

It might be good to memorize or hash the specific .travis.yml file, and only do this is the file is identical.

I think this will eliminate a lot of needless work on many projects, and hopefully get my jobs to run sooner. :)

@caitp
Copy link

caitp commented Mar 6, 2013

Related to #961

@EvanK
Copy link

EvanK commented Jul 29, 2013

👍

@roidrage
Copy link
Contributor

roidrage commented May 2, 2014

This sounds like a lot of complexity to me. I'd propose we have better control about cancelling all running jobs as proposed in other tickets.

@madrobby
Copy link

I'd love to have it cancel any pending or running builds of the same branch when a newer commit comes in.

@Fryguy
Copy link

Fryguy commented Jul 9, 2014

👍 for this as well. As I wrote in #2505, my use case is more around PRs and rapid fire commits, and my thought on the approach was if a new PR build is added to the queue, then upon being added, it would go out and cancel other pending and running builds for the same PR#.

@Joshua-Anderson
Copy link

👍 I often push several commits at once and would rather have only the most recent commit built. It also shortens the build queue for everybody else, so its a win win situation.

@joshk
Copy link
Contributor

joshk commented Jul 14, 2014

There is a huge benefit in testing each push and not cancelling a build just because a newer push has come through, and that is you can see which push broke the build.
I'm not a huge fan of adding extra complexity, but would be happy to work with someone on prototyping this feature (when I say working, I more mean helping guide and code review).

@caitp
Copy link

caitp commented Jul 14, 2014

I think the use case is primarily for when refs are no longer available due to an amended commit + force push, otherwise you end up with a bunch of error'd builds and a waste of queue time which could be devoted to a build you actually expect/hope to pass.

@madrobby
Copy link

@joshk that might be a benefit, but if I have to wait 45 minutes to know if perhaps the latest build fixes the issue it's not all that helpful

@Fryguy
Copy link

Fryguy commented Jul 14, 2014

@joshk

  1. New commits into PR. As a developer, I just want to make sure my branch works for the full test suite. I can run the specific tests locally to find which commit failed in order to fix it. I'll probably force-push a clean commit anyway when I find it.
  2. Force-commits into PR. Same, plus what @caitp said.
  3. Merge into main line (master). As a maintainer, one might want to know which merge broke the build. However, for me, I tend to review a bunch of PRs at once and merge 3 or 4 in a row. Since the PRs were green before merge, I just want to know the latest on the main line.
  4. Direct commits onto main line. We don't do these, but some projects do. I can see possibly wanting to know which one broke the build. I guess one could use [skip ci] for things like README commits on the main line.

To me, I see two high level use cases that may differ in usage...PRs and the main line branch. One option for each might be flexible enough.

@xrchz
Copy link

xrchz commented Aug 2, 2014

👍

@jesseproudman
Copy link

👍

@rhyolight
Copy link

👍

@kbrock
Copy link

kbrock commented Jan 13, 2015

👍 especially when it is a forced push after an amend / rebase

@blomquisg
Copy link

👍

@danoli3
Copy link

danoli3 commented Feb 3, 2015

@travis-ci travis-ci locked and limited conversation to collaborators Feb 3, 2015
@BanzaiMan
Copy link
Contributor

Hello. @grosser has come up with an interim solution https://github.com/grosser/travis_dedup while we work on a long-term fix.

Thank you!

@roidrage
Copy link
Contributor

Closing this issue for now, as we have no immediate plans to add this feature.

Should we add it to the roadmap eventually, we'll make sure to update this ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests