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
Return debuggable CAS errors on consul state put #33108
Conversation
ran into this error while running terraform on a container and saving state to Consul. I suspect my policy needs tweaking but it's impossible to tell with an error like this: ``` ╷ │ Error: Failed to save state │ │ Error saving state: consul CAS failed with transaction errors: │ [0xc0006e93c8] ╵ ``` This PR makes the will include the error messaage in the details so I can continue debugging
this is what i get for submitting PRs late at night
Thanks for this submission. I'll send it to the Consul team for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I left a suggested update for your consideration.
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
Co-authored-by: Chris Thain <32781396+cthain@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving from the Consul side.
Thanks, I'll bring this to triage to figure out how and when we can do the Terraform Core review. |
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
Thanks for this fix! It will go out in the next 1.5 patch. |
Just wanted to say thanks again, now the error looks like this and I was able to fix my issue after all!
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Ran into this error while running terraform inside a container, after it applied my plans, terraform failed saving state to Consul. I suspect my policy needs tweaking, but it's near impossible to tell with an error like this:
This PR changes the the rendering of the error instance to actually print the message, instead of the memory address of said error instance.
Target Release
1.15.x
Draft CHANGELOG entry
BUG FIXES
consul CAS failed with transaction errors
no longer shows an error instance memory address but an actual error message.