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
Python Automation API returns CommandError Exception instead of the more specific ConcurrentUpdateError #11108
Comments
Hi @Zaid-Ajaj thanks for fixing it, by local backend you mean anything other than the self-hosted Pulumi Service? So if I were using the self-hosted Pulumi Service I wouldn't have run into this error? |
@drf7 The local backend is when you use your local file system to store state. Pulumi supports multiple backends including our own Pulumi Service to store state. Unfortunately, regardless of which backend you use, there is still a chance you encounter a concurrent update error. There is an issue #9047 open to help improve the situation |
@Zaid-Ajaj I encounter this issue using local file system as backend but also using Azure Blob Storage as backend (so it is not only happening in the local file system as backend). But your PR should address both situations so everything is fine, just wanted to clarify that. |
11146: [auto] detect concurrent update error from local backend r=Zaid-Ajaj a=Zaid-Ajaj Fixes pulumi/pulumi#11108 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> 11159: [dotnet] Simplify the format of docs comment of Output<T> r=Zaid-Ajaj a=Zaid-Ajaj <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> Fixes pulumi/pulumi#11120 because docfx cannot properly render ordered lists ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
What happened?
When there is already an update in progress in a stack the exception thrown when trying another update is the generic exception
CommandError
instead of the more specific oneConcurrentUpdateError
.This is because the stderr from pulumi is
error: the stack is currently locked by
but the error defined in the pulumi code is[409] Conflict: Another update is currently in progress.
here: https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/pulumi/automation/errors.py#L70So changing the line 70 from:
conflict_text = "[409] Conflict: Another update is currently in progress."
To:
conflict_text = "error: the stack is currently locked by"
Seems to fix this error for me.
Steps to reproduce
Execute a pulumi up in a stack that has already an update in progress using the python automation API
Expected Behavior
ConcurrentUpdateError
exception is thrownActual Behavior
CommandError
exception is thrownOutput of
pulumi about
No response
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: