Skip to content

Resources that are inputs to jobs that have no triggers should not check.  #1445

Closed

Description

@joshzarrabi

Feature Request

What challenge are you facing?

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.

screen shot 2017-08-04 at 2 28 42 pm

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.

-- Josh and @kkallday

Activity

  1. changed the title [-]Resource that don't trigger jobs should not check.[/-] [+]Resources that don't trigger jobs should not check.[/+] on Aug 4, 2017
  2. 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
  3. andrewedstrom commented on Aug 4, 2017

    @andrewedstrom
    Contributor

    wow this is a crazy amount of resources

  4. joshzarrabi commented on Aug 4, 2017

    @joshzarrabi
    ContributorAuthor

    @andrewedstrom thanks. I just updated the proposal to be a little more clear.

  5. chendrix commented on Aug 8, 2017

    @chendrix
    Contributor

    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.

  6. kkallday commented on Aug 8, 2017

    @kkallday
  7. chendrix commented on Aug 8, 2017

    @chendrix
    Contributor

    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.

  8. rainmaker commented on Aug 8, 2017

    @rainmaker

    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 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.

  9. joshzarrabi commented on Aug 11, 2017

    @joshzarrabi
    ContributorAuthor

    @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.

  10. vito commented on Jan 29, 2019

    @vito
    Contributor

    I'm not sure if this will be a big deal anymore with #2386 done and with #3079 on the horizon.

  11. mitchellkingsley commented on Nov 2, 2022

    @mitchellkingsley

    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.

  12. taylorsilva commented on Jan 6, 2025

    @taylorsilva
    Member

    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

  13. moved this from Icebox to In progress in Concourse Roadmapon Feb 19, 2026
  14. taylorsilva commented on Feb 20, 2026

    @taylorsilva
    Member

    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!

  15. taylorsilva commented on Feb 20, 2026

    @taylorsilva
    Member

    Running some tests. Checks will be reduced by how frequently new versions are found for triggering resources.

    HEAD of master running some mock pipelines for ~1hr

    concourse_lidar_checks_finished_total=2571
    concourse_builds_finished_total=427
    
    Image

    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.

    concourse_lidar_checks_finished_total=1110
    concourse_builds_finished_total=384
    
    Image

    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.

    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:

    • 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.

    I'm going to clean up my POC and get a PR up.

  16. moved this from In progress to Done in Concourse Roadmapon Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions