CircleCI Ideas

Expiry token for type: approval jobs


 - approve_release:
          type: approval
            - checkout_and_build
              only: /master/
          expiry: 24h



Jobs with type: approval require manual confirm/cancel, and as such are a good control method for jobs that don't need to be run every build, or builds that require review before completion (e.g. releases).

One use we have for these job types is to build docker images from successful builds on the fly. We don't need docker images for every build, and there are many builds in a day, so the approval jobs pile up.

We don't need any builds older than 24hrs, so a suggestion to prevent a build up of on hold jobs (not sure what impact this has on a CircleCI cloud/personal server) is to introduce an expiry token as part of the workflow description.

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Jan 26 2018
  • Taking votes
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    December 07, 2018 18:40

    This has benefits beyond limiting the build up of jobs --> we use approvals to block deployments to production, but sometimes multiple builds will pile up. If someone were to accidentally click an approval on an older build, then that would deploy over our current production environment. Expirations on approvals would help prevent this behavior from occurring.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    February 16, 2019 12:26

    Hi, I published orb for job expiration.


    Until official support, this may help you.



  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    March 26, 2019 10:49

    This would be very helpful!

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    May 12, 2019 16:39

    This is really needed. You really don't want to have dozens of suspended/waiting workflows in your dashboard. I can imagine possible aftermath. It hurts :D 

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    20 Feb 21:59

    This orb does not help in the case of the authors ideas which i believe to be a good one. The approval remains on hold until its approved or workflow is cancelled. It only expires the next upcoming job and marks it as Failed instead of cancelled if the expiration check determines that the set time has expired.