-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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 an error on unlock failure #25729
Conversation
Codecov Report
|
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.
Hi @grahamhar ! Thank you for submitting this, it's a subtle little bug!
I'd like to second @ZymoticB's suggested change - thank you for that, @ZymoticB - as it's an elegant simplification.
I'd also really like to see tests in this package. There aren't any now, and it's certainly a bigger task than you signed up for when you opened this PR, so I'm absolutely not going to require this from you for this PR. I'll take a look at this package and see if there's a relatively simple test I can suggest (or add myself, if you gave us access to push to your fork).
Added the suggested change and given you access if you want to add test coverage at https://github.com/grahamhar/terraform |
[EDIT]: It just hit me that this is technically a breaking change, so I am going to label it as such and defer merging until the master branch switches to the 0.14 development cycle - that should be later this month. This conveniently gives me some extra time to add that test, too! Thanks @grahamhar ! You were much quicker than I expected, so I will merge this as-is. I nearly have testing worked out, but it's rather ugly, so I'll need a little more time, though I have been able to validate your fix. |
I did expect that to be the case. Thanks for the quick review and looking forward to the release of 0.14 :) |
When the lock can't be released return the err even if there is no previous error with the current action. This allows faster failure in CI/CD systems. Without this failure to remove the lock would result in the failure happening on a subsequent plan or apply which slows down the feedback loop in automated systems.
Accept review suggestion Co-authored-by: ZymoticB <[email protected]>
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.
We just cut a 0.13 branch and can start merging work targeting 0.14 🎉
I pushed a test (and rebased) so we're good to go - thank you @grahamhar!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This attempts to fix Issue 23017
When the lock can't be released return the err even if there is no previous error with the current action. This allows faster failure in CI/CD systems. Without this failure to remove the lock would result in the failure happening on a subsequent plan or apply which slows down the feedback loop in automated systems.