-
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
Exclude terraform providers and .git repository when hashing workspace #197
Conversation
/test-examples="examples/workspace-inline-aws.yaml" |
@toastwaffle this change looks good to me - would you be willing to extend it to also exclude the |
@bobh66 I've updated to also exclude the @headyj could you |
@toastwaffle for what is see it seems OK. maybe we could also ignore |
I think it .git-credentials changes it is reasonable to rerun terraform init to make sure we have the latest content from git. |
@bobh66 can we get this merged? |
/test-examples="examples/workspace-inline-aws.yaml" |
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.
LGTM, I will let @bobh66 to do the final merge as he had the comments to this PR earlier
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.
LGTM - thanks!
@bobh66 any idea when this fix will be released? Still not in v0.11.0 release a month ago |
Should be this Thursday; releases are scheduled for the last Thursday of each month. |
@headyj, yes, we will cut a release containing this PR on Thursday, November 30. |
Description of your changes
Excludes all files under
.terraform/providers
when computing the workspace checksum, to avoid reading and hashing large provider binaries when the plugin cache is disabled. When the plugin cache is enabled, the providers are stored outside of the workspace directory, and symlinked into the workspace.find
does not follow symlinks by default, and so the providers are ignored for the checksum.This also excludes the
.git
directory to avoid unnecessaryterraform inits
when repository objects change without affecting the working copy used. Fixes #198.This will cause a (theoretically no-op)
terraform init
in each workspace after upgrading if the plugin cache is disabled or where git is used, as the hash will change due to no longer including the providers and/or.git
directory.Relates to #196 (but doesn't entirely fix it - that issue also explores the possibility of using PVCs)
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
kubectl exec
ed into the provider-terraform pod and ran the find command; confirmed that only the provider binaries were excluded compared to the previous command.