feedback icon indicating copy to clipboard operation
feedback copied to clipboard

How to configure timeout for block step

Open sayboras opened this issue 6 years ago • 24 comments

Hi,

As part of our pipeline, we are having some block step, which require user manual input. We want to have a timeout configured for this step as well, but unable to find anything in docs.

Please let me know if it's possible.

sayboras avatar Oct 23 '18 21:10 sayboras

This is a neat idea! We don't have anything like this presently, but will consider it in future. Thanks for the suggestion!

lox avatar Oct 26 '18 05:10 lox

+1 we also like this feature..

daBayrus avatar Jan 18 '19 05:01 daBayrus

+1, would be super useful

xelibrion avatar May 16 '19 04:05 xelibrion

+1 here too, i'd love that. I used that feature in jenkins to have an optional prod deploy that is blocked after a staging deploy, but time out and mark the build complete after an hour or so, so we dont have potentially old production deploys sticking around

derekleverenz avatar May 16 '19 23:05 derekleverenz

any plan for this feature ?

sayboras avatar May 22 '19 11:05 sayboras

@lox Could we get an update on this request?

stefanmb avatar Jun 25 '19 16:06 stefanmb

👋 Howdy! This is a good idea and something we should add.

Quick question...

If you did:

steps:
  - block: "Blah"
    timeout: 20

What would you expect it to do after 20 minutes?

  • Fail the build?
    • Or maybe this is configurable?
  • Auto-accept?
    • If so, and there are custom fields defined - perhaps the defaults would be accepted?

Once we can figure out some of the specifics, it should be a simple thing to add!

keithpitt avatar Jun 26 '19 10:06 keithpitt

Fail the build?

For our uses this is sufficient as it sends a signal to the developer they needed to do something. The main complaint has been that builds hang forever waiting for a confirmation.

stefanmb avatar Jun 26 '19 14:06 stefanmb

For us I think failing the build would be sufficient, but ideally it would complete the build, treating any steps below as if they failed but were configured with soft_fail, or simply were never run.

The usecase here is one that we've used in jenkins in the past, where a pipeline is set up to build -> run tests -> deploy to staging -> wait for input, optionally deploy to production. So, in that setup, if we never deploy to production we still consider it a successful build to staging, but we want to time it out so that that particular build cant be deployed to production at a later date.

derekleverenz avatar Jun 27 '19 02:06 derekleverenz

For me, it should stop me from deploying further. Marking the build is red is also fine, it's more visual to do quick check when the last entire steps ran.

sayboras avatar Jun 27 '19 03:06 sayboras

I want block steps to have a required: true|false parameter that indicates whether the build is green or yellow until the block is triggered.

In that world, timeout with required: true would fail the build, with required: false it would continue just like it was clicked.

lox avatar Jun 27 '19 04:06 lox

Just came to needing this; for our purposes we would want a cancellation. Failing, and looking like any normal failure, would mess with our metrics if we're just a little slow on getting to community PR review.

NorseGaud avatar Jun 27 '19 14:06 NorseGaud

+1, but in our case we would like the option to have the build stop and succeed on timeout, rather than fail or continue. We would use the block to provide an optional step to deploy production - timeout would ideally result in skipping all remaining steps.

seekdave avatar Aug 14 '19 00:08 seekdave

+1 We would like to stop builds if a block step is not actioned within a set time

IRESS-Chris-Hill avatar Sep 09 '19 11:09 IRESS-Chris-Hill

I want block steps to have a required: true|false parameter that indicates whether the build is green or yellow until the block is triggered.

In that world, timeout with required: true would fail the build, with required: false it would continue just like it was clicked.

For us this would be ideal, we'd like to have the option for the build to continue in some cases if it hasn't been touched.

patricktyroler avatar Nov 28 '19 17:11 patricktyroler

+1 we would like this as well. Our use case revolves around staged deployments and offering a window to halt a deployment before it moves on to the next stage. (i.e. if a bug is discovered in dev or stg environments before going live)

doyleish avatar Mar 02 '20 23:03 doyleish

this feature is still useful for us after 1 year, and seems like there is a lot of interests as well.

any plan for near future @lox @keithpitt ? thanks a lot.

sayboras avatar Mar 02 '20 23:03 sayboras

+1 Sometimes I would like to execute an optional step.

babinslava avatar Jun 18 '20 11:06 babinslava

+1 would also like this feature. We want a block step for manual approval to deploy to production but would like a timeout (and cancel) so builds are not sitting in this state

anthonynovatsis avatar Sep 09 '20 10:09 anthonynovatsis

We would like to be able to specify a timeout and also specify the action after timeout.

For example:

steps:
  - block: "Deploy to prod?"
    timeout:
        after: 20m
        then: succeed | fail | continue

This feature was almost instantly requested by our dev team after using BuildKite for only a few weeks.

txbm avatar Sep 23 '20 23:09 txbm

+1 on this. I'm infracoding AWS resources and want a block step between my terraform plan and terraform apply but don't want it sitting there indefinitely. Being able to declare a timeout with a chosen result at the end of it would be immensely helpful.

bvilnis avatar Sep 30 '20 06:09 bvilnis

Another +1 to this feature.

I have something like…

  - block: Choose Environment
    fields:
      - select: "Choose what environment to deploy to"
        key: environment
        default: "staging"
        options:
          - label: "Staging"
            value: "staging"
          - label: "Production"
            value: "production"

I want, after the timeout, the default value to be chosen.

elbrujohalcon avatar May 12 '21 07:05 elbrujohalcon

👍 our use case is the same as @bvilnis and @elbrujohalcon

cemeng avatar Nov 25 '21 00:11 cemeng

Is there an update on this feature? Our use case is similar to @bvilnis 's.

rfan-debug avatar Jan 26 '23 06:01 rfan-debug