-
Notifications
You must be signed in to change notification settings - Fork 59
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
Make the terraform harness only use the rwmutex if the plugin cache is enabled #240
Conversation
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.
This LGTM, one minor comment. I'd like to run it through some tests locally before approving it just to be safe.
I have now tested this locally with 4 workspaces with the plugin cache disabled doing long-running applies (GKE cluster creation) in parallel (where previously they'd have gotten stuck), and 4 other workspaces with the plugin cache enabled successfully reconciling some DNS records |
@bobh66 does this qualify for an off-schedule release, or does this need to wait until the 29th? |
Good question - seems like a good candidate for a backport - I'll see what the release team thinks |
Successfully created backport PR #242 for |
Description of your changes
As discussed in #239, this makes the terraform harness only take the lock if the plugin cache is enabled. If the plugin cache is not enabled, there is nothing to protect, and thus no need to take the lock.
This change also removes locking for all
terraform plan
operations, on the assumption that conflicts are unlikely, and can easily be retried on a subsequent reconcile if they do happen.I have:
make reviewable
to ensure this PR is ready for review. It returned a bunch of type errors which seemed unrelated to this change, but I ranmake test
which did pass andmake build
which did succeed.How has this code been tested
Unit tests