You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"inputs passed" should be configurable to be OR rather than AND #313
I have a job that I want to trigger on the passing of either of a pair of other jobs.
I can have the job require a resource that has passed BOTH of the jobs, but I want some way of saying the job should trigger if EITHER of the other jobs have passed.
Reacted by Ari Becker, Devin Brown, Chris Penner, Bodin, Marcin Kocoń, Nathan Bowman, Kevin Lemonnier, Stanislav Kardashov, Sanford Miller, Alexander P. and 1 more
This came up a while back in Slack; one interesting idea was to make the resulting dependency nodes a first-class concept called "buckets". Buckets would behave the same as resources, but their entries would be explicitly populated, rather than detected via /check, and they could even hold different types of resources (so long as they all have the same filesystem interface).
The following would model a bucket that represents the union of two resources:
@vito I don't completely understand your reply, so is something like passed a OR b possible right now in concourse? We want to do versioning via our pipeline (major, minor, patch jobs) and trigger the pipeline directly after that. I didn't find a way to connect the versioning jobs to our build jobs directly right now.
@Rukenshia it is not possible right now; my reply was just an idea. For semver, I just leave the separate bump jobs on their own and leave the input to the release-candidate-bump job unconstrained.
+1. We have the following use case: some changes to our infrastructure are simple and do not require much work to be done, so there is a shorter path for a job that makes these simpler, safer changes. However, some changes are more complex and require more checks / tests / generation, and they have a longer path with multiple jobs. However, at the end of the pipeline there are common application jobs which are DRY-ly reused, so ideally, for the common application jobs there should be a passed constraint on either the short path or the long path.
The workaround alternative is to either generate separate pipelines for the long and short paths that use a common application job in the generation template (and running set-pipeline on each of those pipelines whenever the common application job changes is a pain) or to not include the passed restriction or triggers (not including the passed restriction makes the UI more confusing and not including triggers is its own pain).
+1. I am trying to set up a pipeline that checks if terraform plan in main branch has the same changes that plan from PR had. But I also want to have a failsafe, that will allow manually forcing the terraform apply to be triggered. Do do that I want to pass that resource from two different jobs.
+1
This is a simple change which would dramatically increase pipeline flexibility. We have a simple universal status reporting job which we want to be triggered automatically by the deployment of a new state to any one of dozens of prior jobs. Right now that appears to be impossible.
FYI - I can see how this would be very useful, but it's definitely not easy to implement with current pipeline semantics. This would probably end up touching a lot of different areas in the codebase as well, specifically the scheduling stuff which is very complex. Would be a great feature to add though.
Vito's initial idea of "bucketing" resources together is probably the easiest way to implement things without messing around with the existing scheduling logic too much.
FYI - I can see how this would be very useful, but it's definitely not easy to implement with current pipeline semantics. This would probably end up touching a lot of different areas in the codebase as well, specifically the scheduling stuff which is very complex. Would be a great feature to add though.
Vito's initial idea of "bucketing" resources together is probably the easiest way to implement things without messing around with the existing scheduling logic too much.
I'm somewhat surprised to hear this. I would have thought that the current AND-like behaviour of the passed attribute sets up an array and performs triggered checks against it using ANDs, and that therefore it would be a case of duplicating that section of code with OR-like behaviour instead.
Activity
vito commentedon Jul 15, 2016
This came up a while back in Slack; one interesting idea was to make the resulting dependency nodes a first-class concept called "buckets". Buckets would behave the same as resources, but their entries would be explicitly populated, rather than detected via
/check, and they could even hold different types of resources (so long as they all have the same filesystem interface).The following would model a bucket that represents the union of two resources:
The following would model a bucket that represents resources having passed either job
aorb(this issue):Today's semantics of adding
passedconstraints ongetsteps would be effectively syntax sugar on top of these buckets.Rukenshia commentedon Aug 24, 2017
@vito I don't completely understand your reply, so is something like
passed a OR bpossible right now in concourse? We want to do versioning via our pipeline (major,minor,patchjobs) and trigger the pipeline directly after that. I didn't find a way to connect the versioning jobs to our build jobs directly right now.vito commentedon Oct 5, 2017
@Rukenshia it is not possible right now; my reply was just an idea. For semver, I just leave the separate bump jobs on their own and leave the input to the release-candidate-bump job unconstrained.
divyabhargov commentedon Feb 10, 2018
+1 for this feature support
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
micahalgard commentedon Dec 19, 2018
+1 We have the same use case need as @Rukenshia mentioned with triggering either
major,minor, orpatchreleasesari-becker commentedon Dec 23, 2018
+1. We have the following use case: some changes to our infrastructure are simple and do not require much work to be done, so there is a shorter path for a job that makes these simpler, safer changes. However, some changes are more complex and require more checks / tests / generation, and they have a longer path with multiple jobs. However, at the end of the pipeline there are common application jobs which are DRY-ly reused, so ideally, for the common application jobs there should be a
passedconstraint on either the short path or the long path.The workaround alternative is to either generate separate pipelines for the long and short paths that use a common application job in the generation template (and running
set-pipelineon each of those pipelines whenever the common application job changes is a pain) or to not include thepassedrestriction or triggers (not including thepassedrestriction makes the UI more confusing and not including triggers is its own pain).gdziwoki commentedon Oct 9, 2020
+1. I am trying to set up a pipeline that checks if terraform plan in main branch has the same changes that plan from PR had. But I also want to have a failsafe, that will allow manually forcing the terraform apply to be triggered. Do do that I want to pass that resource from two different jobs.
aeoncleanse commentedon Mar 19, 2025
+1
This is a simple change which would dramatically increase pipeline flexibility. We have a simple universal status reporting job which we want to be triggered automatically by the deployment of a new state to any one of dozens of prior jobs. Right now that appears to be impossible.
taylorsilva commentedon Mar 21, 2025
FYI - I can see how this would be very useful, but it's definitely not easy to implement with current pipeline semantics. This would probably end up touching a lot of different areas in the codebase as well, specifically the scheduling stuff which is very complex. Would be a great feature to add though.
Vito's initial idea of "bucketing" resources together is probably the easiest way to implement things without messing around with the existing scheduling logic too much.
aeoncleanse commentedon Mar 25, 2025
I'm somewhat surprised to hear this. I would have thought that the current AND-like behaviour of the
passedattribute sets up an array and performs triggered checks against it using ANDs, and that therefore it would be a case of duplicating that section of code with OR-like behaviour instead.