https://pulumi.com logo
#general
Title
# general
s

sparse-spring-91820

11/27/2021, 11:08 AM
Hello folks 👋 , I am wondering how do you handle
error: [409] Conflict: Another update is currently in progress
errors? I have pulumi job inside my circleci pipeline and if I merge multiple PRs in develop branch in a short time my build fails
s

sparse-spring-91820

11/30/2021, 8:22 AM
So you basically do
pulumi cancel
and
pulumi stack export | pulumi stack import
before running
pulumi up
in your cicd pipeline?
s

steep-beach-52652

11/30/2021, 9:53 AM
@sparse-spring-91820 i think in CI system u can enforce things not to run in parall, wait for the job instance to complete before running another instance of the same pipeline / job
s

sparse-spring-91820

11/30/2021, 3:00 PM
@steep-beach-52652 As far I can see, Circleci doesn't have option to wait for the previous job to finish in order to start a new one for selected branches. It has only this option:
Copy code
Auto-cancel redundant builds

With the exception of your default branch, we will automatically cancel any queued or running builds on a branch when a newer build is triggered on that same branch. Scheduled workflows and re-runs are not auto-canceled.
but I don't think I want it because we can run into some issues if pulumi job is canceled during deployment
s

steep-beach-52652

11/30/2021, 3:02 PM
its python (or other programming language), so maybe u can check in python if pulumi is already running then sleep till pulumi is not running already before applying changes
or better , use pulumi watch instead to keep applying changes without running pulumi up for each change?
s

sparse-spring-91820

11/30/2021, 3:19 PM
@steep-beach-52652 Thank you for your help! I don't think watch command will work for circleci cicd pipeline as it will last forever and it would cost a lot of money (but I don't think that circleci allows no-ending processes anyway because it will timeout)
s

steep-beach-52652

11/30/2021, 3:20 PM
not sure about circleci, but in jenkins for example i can keep running pulumi watch and keep pulling the changes every X seconds for example
10 Views