Grayed out block step

I am using a block step to get user confirmation before triggering the next step. I initially did not add any dependency for the block step but it turns out that a failed or cancelled previous step will disable/gray out the block button.

So I instead explicitly declare the dependency in the block step and also sets allow_dependency_failure to true. This works if the previous step fails (as in I can unblock and trigger the next step). But when the previous step was cancelled, the block button is still grayed out.

My pipeline looks like this:

- command: xxx
   key: step-1
- block: xxx
   prompt: xxx
   key: block-step
   depends_on: step-1
   allow_dependency_failure: true
- command: xxx
   depends_on: block-step

My question is: is there a way to make the block button clickable regardless of the status of the previous step?

For context: the block and the following step is a catch-all job cleanup that needs to be run with caution (hence needs user confirmation)

Hey @rryan

When using block step, it creates implicit dependencies on the steps before and after them.

If the first step is cancelled, the block step, which depends on the first step, will not run because the dependency cannot be fulfilled.

I see you’re using allow_dependency_failure. While this option allows the block step to run if the dependent step fails, it doesn’t help if the job is cancelled. In cases of failure, allow_dependency_failure ensures you can still access the block step, but it does not cover cancellations.

If you are interested in a cleanup, i can suggest you use a pre-exit hook, which does that perfectly.

Hi @stephanie.atte , thanks for the pointer to documentation! From there I found that I actually need an input field instead, which does not create any implicit dependencies.

1 Like

Hey @rryan :wave: glad to hear you were able to get things sorted. Let us know if you have any other questions :slight_smile: