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
Resources that are inputs to jobs that have no triggers should not check. #1445
We have a job that takes in 33 resources, but no resources trigger the job. The resource checking coming from all of these resource is a massive drain on our workers, and we get no benefit out of the checking, as every time we trigger the job, it automatically pulls the newest version of each resource.
This often leads to an insufficient subnets error, as our workers will hit the max number of containers if more than one pipeline is un-paused.
To give context, we have 6 jobs that look similar to the one below.
A Modest Proposal
Resources that are inputs to jobs that have no triggers should have version checking turned off by default. This will save many unnecessary containers from being created.
changed the title [-]Resources that don't trigger jobs should not check.[/-][+]Resources that are inputs to jobs that have no triggers should not check. [/+]on Aug 4, 2017
Ok, so just so we're all aware that's still going to spin up check containers, and will still likely bring down your worker. The only benefit you get from that is that it's a spike in activity not a continuous burden on your workers.
There is no ability to just "pull latest" without using a check container to figure out what "latest" is.
We're fine with a resource spike upon triggering the build, versus the continuous burden on the workers. In most cases, we're not running these builds in perfect parallel, so a single spike per build would be okay if it's slightly offset for each one. Does that make sense?
We also figure that fly cr is still an option if anyone wants to check in on a resource before the build triggers, so it wouldn't be a complete loss of that visibility.
@chendrix as @rainmaker said its the constant checking that is killing our workers, and we get no benefit from these containers that get spun up every minute.
I believe there is still a benefit in doing this as it would prevent all non-tiggering resources from hammering external resources.
In my case the external resource is a Vault which is hit every time a resource is checked (stores access secrets for the resources). If the checks only occured when a job started for non-triggering resources, it would drastically reduce the number of times that the Vault was hit.
Feel free to let me know if I am misunderstanding the order of operations in a version check.
Some things I've realized while digging into this. I'm trying to work through all the scenarios and potential pitfalls. Going to try and do some proper data analysis to verify the impact of this kind of change as well.
Lidar only needs to check resources that are trigger: true for jobs
Lidar does not need to check resources that have passed: [jobs...] passed constraints
Checks would never change the potential inputs for a resource with a passed constraint
When a job has a scheduled build, the Scheduler should only start the job once all inputs have been checked
Resources with passed constraints do not need to be checked.
Those are the main things I think need to change. I think it would greatly reduce the number of checks Concourse needs to run, even when a job triggers. If all of a jobs inputs have passed constraints, then no checks would be issued at all!
POC that only runs checks on resources that are trigger: true and have no passed constraints for jobs. Scheduler runs checks when the job is triggered. I let it run for ~1hr as well.
These are the pipeline configs I set. This is not a good representation for what real world pipelines would look like because I'm only using the time resource, which results in larger number of builds than a pipeline that's triggering off something like a git resource, where new versions depend on when users are pushing stuff to a repo.
Even with this in mind, we can see there's a massive drop in checks, over 50% in my little test here. We can see the average rate of checks is lower and only spikes when jobs are being scheduled.
Interesting that the POC code got through less builds. My theory for this is that build start times took longer since we wait for all the input resources to be checked. That's the trade-off here:
Less checks and less hammering of downstream systems
Longer build start times while waiting for checks to run
The only other thing I'm keeping an eye out for is any pipeline setup where this change results in builds NOT being scheduled when they should, or any other scheduling weirdness that I haven't though of. From what I've thought of and tested so far, it doesn't seem like this would break anything, unless folks rely on non-triggering resources checks for some reason.
Activity
[-]Resource that don't trigger jobs should not check.[/-][+]Resources that don't trigger jobs should not check.[/+][-]Resources that don't trigger jobs should not check.[/-][+]Resources that are inputs to jobs that have no triggers should not check. [/+]andrewedstrom commentedon Aug 4, 2017
wow this is a crazy amount of resources
joshzarrabi commentedon Aug 4, 2017
@andrewedstrom thanks. I just updated the proposal to be a little more clear.
chendrix commentedon Aug 8, 2017
So are you proposing that the checks still happen, they just happen when a job they move into get triggered?
Because you still need to run a check to figure out what the "latest version" is.
kkallday commentedon Aug 8, 2017
chendrix commentedon Aug 8, 2017
Ok, so just so we're all aware that's still going to spin up check containers, and will still likely bring down your worker. The only benefit you get from that is that it's a spike in activity not a continuous burden on your workers.
There is no ability to just "pull latest" without using a check container to figure out what "latest" is.
rainmaker commentedon Aug 8, 2017
Hi Chris!
We're fine with a resource spike upon triggering the build, versus the continuous burden on the workers. In most cases, we're not running these builds in perfect parallel, so a single spike per build would be okay if it's slightly offset for each one. Does that make sense?
We also figure that
fly cris still an option if anyone wants to check in on a resource before the build triggers, so it wouldn't be a complete loss of that visibility.joshzarrabi commentedon Aug 11, 2017
@chendrix as @rainmaker said its the constant checking that is killing our workers, and we get no benefit from these containers that get spun up every minute.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
Reduce the check interval for all resources
Reduce the check interval for all resources
Reduce the check interval for all resources
vito commentedon Jan 29, 2019
I'm not sure if this will be a big deal anymore with #2386 done and with #3079 on the horizon.
mitchellkingsley commentedon Nov 2, 2022
I believe there is still a benefit in doing this as it would prevent all non-tiggering resources from hammering external resources.
In my case the external resource is a Vault which is hit every time a resource is checked (stores access secrets for the resources). If the checks only occured when a job started for non-triggering resources, it would drastically reduce the number of times that the Vault was hit.
Feel free to let me know if I am misunderstanding the order of operations in a version check.
taylorsilva commentedon Jan 6, 2025
I think this is a good idea that would save a lot of compute. Not sure how easy this would be to implement. I think you'd only have to update the lidar package: https://github.com/concourse/concourse/tree/master/atc/lidar
taylorsilva commentedon Feb 20, 2026
Some things I've realized while digging into this. I'm trying to work through all the scenarios and potential pitfalls. Going to try and do some proper data analysis to verify the impact of this kind of change as well.
trigger: truefor jobspassed: [jobs...]passed constraintsThose are the main things I think need to change. I think it would greatly reduce the number of checks Concourse needs to run, even when a job triggers. If all of a jobs inputs have passed constraints, then no checks would be issued at all!
taylorsilva commentedon Feb 20, 2026
Running some tests. Checks will be reduced by how frequently new versions are found for triggering resources.
HEAD of
masterrunning some mock pipelines for ~1hrPOC that only runs checks on resources that are
trigger: trueand have no passed constraints for jobs. Scheduler runs checks when the job is triggered. I let it run for ~1hr as well.These are the pipeline configs I set. This is not a good representation for what real world pipelines would look like because I'm only using the
timeresource, which results in larger number of builds than a pipeline that's triggering off something like agitresource, where new versions depend on when users are pushing stuff to a repo.p-01.yml
p-02.yml
p-03.yml
p-04.yml
p-05.yml
Even with this in mind, we can see there's a massive drop in checks, over 50% in my little test here. We can see the average rate of checks is lower and only spikes when jobs are being scheduled.
Interesting that the POC code got through less builds. My theory for this is that build start times took longer since we wait for all the input resources to be checked. That's the trade-off here:
The only other thing I'm keeping an eye out for is any pipeline setup where this change results in builds NOT being scheduled when they should, or any other scheduling weirdness that I haven't though of. From what I've thought of and tested so far, it doesn't seem like this would break anything, unless folks rely on non-triggering resources checks for some reason.
I'm going to clean up my POC and get a PR up.