Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a group of pipelines are replaced with destroy/create, the create is skipped if any of the pipelines are running #504

Open
fivetran-seanmeisner opened this issue Mar 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fivetran-seanmeisner
Copy link

Following up on discussions with Buildkite support

We ran a Terraform apply that resulted in attempted destroy and create to replace a group of pipelines.

Because a number of these pipelines were running, the apply errored out and failed partway through.

The behavior was:

Destroyed ALL pipelines
<-- Failed
Skipped Create ALL pipelines

We'd rather this apply did not fail, or if it fails then at least it should create all the pipelines that it has destroyed before stopping.

I'd suggest that the fatal error on running pipelines should be changed to a warning that doesn't stop the apply from recreating.

It would also make sense to issue each destroy/create as an atomic pair, one at a time, rather than destroying everything up front.

@fivetran-seanmeisner fivetran-seanmeisner added the bug Something isn't working label Mar 15, 2024
@jradtilbrook
Copy link
Contributor

Thanks @fivetran-seanmeisner this seems mostly doable. We'll put it on the backlog to plan/schedule it 👍

At this point, I think what we can do here is properly detect whether a delete fails and stop that propagating to the rest of the terraform operations. That should make it more atomic, however, the order of operations is up to terraform itself. It builds up a graph of operations and runs things in parallel. So technically it could (should?) be running each destroy before the corresponding create but what might happen in practice is that all destroys end up happening first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants