Configure auto-cancel to not apply to scheduled pipelines
Problem to solve
"Auto-Cancel redundant pipelines" is a very useful feature, but currently, it does not work well with scheduled Jobs
Intended users
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
- Sam (Security Analyst)
- Dana (Data Analyst)
Further details
We have multiple scheduled pipelines that are not a "regular" deployment pipeline. Things like: Special nightly tests, Dependency updates, Stopping review environments etc.
If we use "auto-cancel redundant pipelines", these scheduled pipelines will
- cancel "regular" pipelines
- be cancelled by "regular" pipelines
- be cancelled by each other (if not timed correctly)
Proposal
It would be helpful if we could configure auto-cancel to either
- to only apply to non-main/master branches, which is where it is most helpful for us anyway
- to not apply to scheduled pipelines
- mark a pipeline/job as "non-cancellable" similar to interruptible: false
Testing
Depending on how this would be implemented, it may change existing behaviour.
What does success look like, and how can we measure that?
We can be sure our scheduled jobs always run while still using the "auto-cancel redundant pipelines" feature.
#34673 (comment 1044514614)
Issue description before update ofHi I have a pipeline scheduled job that uses variables to only run a subset of jobs. The current behavior is that this scheduled job is automatically canceled because gitlab considers the pipeline to be redundant, even though the executed would jobs differ.
Two things I can think of
- an option in the schedule settings to force it to run.
- extend the recently introduced 'interruptible' to be use with rules: if $var==true interruptible: false
Thank you