Retry from failed incompatible with workflow continuation

I am using a slightly modified version of GitHub - CircleCI-Public/continuation-orb

When retrying a failed workflow, continuation is not possible.

The api/v2/pipeline/continue call returns with {"message":"Pipeline is not in setup state."}

Is this a known issue / Is there any way to work around this?

1 Like

Hi @sidpalas,

This outcome is indeed a known limitation of Setup Workflows, and is related to the intrinsic nature of setup workflows.

The api/v2/pipeline/continue call can only be successful on pipelines that are in a setup state, and updates the related pipeline’s state to created.

However, once the pipeline containing the Setup Workflow has been continued, its state is no longer setup, hence the outcome you’re seeing.

It also seems this bug happens for us when a setup workflow contains more than one continuation job – the any continuation job that’s not the first one to run always gets this error.

This is kind of horrid. That means if a step that happens before a continuation fails, we can’t retry – instead, we have to make a whole new “dummy commit” and then re-run the whole pipeline. It’s really annoying.

It would be great if setup scripts were still setup scripts during a retry. Or, even better: Make it so that continuation scripts don’t require a script to be a setup script. That would also allow us to chain continuation scripts together, which would be amazing.

Seem like I’ve just faced the same issue while evaluating a Proof of Concept. Cannot restart setup workflows from the very beginning, neither from CircleCI nor from Github. They all fail with “Pipeline is not in setup state.”
It is very inflexible as a PR may just require some small infrastructure or semantic changes (we have a script that verifies PR correctness). With the continuation working this way, it may rather become an impediment for our team.

Is there any way to retry said workflow? Right now we have to add a new commit to the branch, whereas we just want to re-run everything from setup-onwards. It’s very frustrating.

Edit: Just found that we can use Trigger Pipeline to just rerun the entire thing, instead of trying a rerun from..., so that works the way we wanted and might solve this case?