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

command: Fix stale lock when exiting early #24120

Merged
merged 3 commits into from
Feb 14, 2020

Conversation

alisdair
Copy link
Contributor

If an error occurs on creating the context for console or import, we would fail to unlock the state. Fix this by unlocking slightly earlier. Affects console and import commands.

Fixes #23318.

Also, while I was making these changes:

  • Remove the no-op unlock from the graph command, which followed the same code pattern. graph never actually acquires a lock, so rather than applying the same fix, I thought it best to remove the code.
  • Remove a now-unused test fixture which was almost reusable for this change, but not quite.

If an error occurs on creating the context for console or import, we
would fail to unlock the state. Fix this by unlocking slightly earlier.
Affects console and import commands.

Fixes #23318
The graph command never locks the state, so this unlock operation was a
no-op and is a bit of a red herring. Remove it.
@alisdair alisdair requested a review from a team February 14, 2020 19:53
@alisdair alisdair changed the title Fix stale lock when exiting early command: Fix stale lock when exiting early Feb 14, 2020
@alisdair alisdair merged commit 7d8ac1e into master Feb 14, 2020
@alisdair alisdair deleted the alisdair/fix-stale-lock-when-exiting-early branch February 14, 2020 20:53

// Make sure to unlock the state
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this comment needs to be deleted!

@ghost
Copy link

ghost commented Apr 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing provider failure case leaves s3 lock in place
3 participants