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

http-backend: http backend lock error return LockError instead of generic error #31256

Merged
merged 1 commit into from Jun 17, 2022

Conversation

nvanheuverzwijn
Copy link
Contributor

This PR make the http backend respect the lock-timeout flag. Currently, there is no way to wait for a lock when using http backend.
With this PR :

  1. Http backend now returns a LockError instead of a generic Error whenever the http post to lock the state returns HTTP code StatusConflict (409) or StatusLocked (423).
  2. Http backend will now respect correctly the lock-timeout flag.

@nvanheuverzwijn nvanheuverzwijn requested a review from a team as a code owner June 16, 2022 14:54
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 16, 2022

CLA assistant check
All committers have signed the CLA.

@antoinedeschenes
Copy link

mentioned here as well #27670 (comment)

@crw
Copy link
Collaborator

crw commented Jun 17, 2022

Thanks for this submission! I cannot commit to having this PR reviewed due to the general hold on backend reviews (see CONTRIBUTING.md#state-storage-backends. That said, I will bring this up in triage and see if this can be reviewed. Thanks again for your submission!

@nvanheuverzwijn
Copy link
Contributor Author

@crw Hey Craig, thanks for the reply, really appreciate it! FYI, this is more of a bug fix than an enhancement if that changes anything for the review process.

In any case, thank you for your time!

@alisdair alisdair added bug v1.2 Issues (primarily bugs) reported against v1.2 releases 1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged and removed enhancement v1.2 Issues (primarily bugs) reported against v1.2 releases labels Jun 17, 2022
Copy link
Member

@alisdair alisdair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix! If you know of a related GitHub issue, please let me know so I can close it.

@alisdair alisdair merged commit b0b69d3 into hashicorp:main Jun 17, 2022
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@nvanheuverzwijn
Copy link
Contributor Author

@alisdair Hey! Thank you for merging!
I searched for relevant keywords in the issues and I didn't find any. I guess people that had this problem just shrugged it off or found a workaround or it's just not used that much.
Anyway, cheers!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.2-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged backend/http bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants