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

Cancel queued inspections if a new commit is pushed #1300

Open
DavidGarciaCat opened this issue Feb 19, 2017 · 1 comment
Open

Cancel queued inspections if a new commit is pushed #1300

DavidGarciaCat opened this issue Feb 19, 2017 · 1 comment

Comments

@DavidGarciaCat
Copy link

DavidGarciaCat commented Feb 19, 2017

Imagine PHPCI WebHook is called, and the code queues 3 inspections. Then the scheduled task begins with the 1st one (building x1 inspection + x2 inspections queued).

Then we push a new commit, and PHPCI queues this one too (building x1 + x3 inspections queued). Given we have pushed a new commit, does not make sense to keep the other 2 inspections (as far they are using the same branch).

IMO ideally the process should cancel the queued inspections and keep just the last one.

@JoolsMcFly
Copy link
Contributor

JoolsMcFly commented Feb 27, 2017

Same answer as your previous question. The idea of CI is to find when something breaks.
If you keep skipping running builds when new commits are pushed then you'll end up thinking the last commit was the one breaking the build.

Here's what would happen if PHPCI cancelled builds:

I push some bad code that's going to break the build.
Build runs.
You push some valid code.
Build is cancelled and a new build is run against latest code base.
Build fails because of my code but PHPCI will report that your changes caused the build to fail.

You're going to waste time finding your mistake when I should be the one investigating!

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

No branches or pull requests

2 participants