Search code examples
concourse

How to clear off all resource checks in concourse


I had a resource that kept triggering every few minutes and it created a queue of hundreds of pending jobs. I want to clear off all the old resource versions so that it stops trying to start new jobs. How can I do that without deleting and recreating the pipeline or impacting any other active pipelines?


Solution

  • If I understand correctly you have something like:

    > fly -t vm builds
    id  pipeline/job       build  status    
    25  queue-up/queue-up  25     started   
    24  queue-up/queue-up  24     started   
    23  queue-up/queue-up  23     started   
    22  queue-up/queue-up  22     started   
    21  queue-up/queue-up  21     started   
    20  queue-up/queue-up  20     started   
    19  queue-up/queue-up  19     started   
    18  queue-up/queue-up  18     started   
    17  queue-up/queue-up  17     succeeded 
    

    where maybe some of the builds are pending instead than started.

    There is no way to clear off the old resource versions without deleting the pipeline. On the other hand, you can always abort all or some of the builds:

    > for i in (seq 24 18); fly -t vm abort-build --build $i; end
    build successfully aborted
    build successfully aborted
    build successfully aborted
    build successfully aborted
    build successfully aborted
    build successfully aborted
    build successfully aborted
    
    > fly -t vm builds
    id  pipeline/job       build  status   
    25  queue-up/queue-up  25     started  
    24  queue-up/queue-up  24     aborted  
    23  queue-up/queue-up  23     aborted  
    22  queue-up/queue-up  22     aborted  
    21  queue-up/queue-up  21     aborted  
    20  queue-up/queue-up  20     aborted  
    19  queue-up/queue-up  19     aborted  
    18  queue-up/queue-up  18     aborted  
    17  queue-up/queue-up  17     succeeded