-
Notifications
You must be signed in to change notification settings - Fork 10.1k
PSS: Fix hashing without provider version #37852
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
Conversation
…r is used for PSS
…od, refactor existing test
radeksimko
left a comment
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.
👍🏻 good catch
…ched, un-builtin provider. Add test coverage.
|
I don't know why, but the code consistency check on this PR said that I need to run |
radeksimko
left a comment
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, As mentioned in Slack, I narrowed down the dependency changes to the introduction of github.com/hashicorp/terraform/internal/getproviders/reattach import which basically introduces go-plugin as a transitive dependency.
My guess is that the configs package is already a transitive dependency of the remote backend implementations - I just wasn't able to find through which exact package. I can only find configs/configschema which itself does not seem to depend on configs.
So I don't know the exact reason behind it but with backends becoming pluggable I think the idea of them now depending on go-plugin seems generally right.
|
This PR doesn't really change any dependencies but due to changes in indirect dependencies in backends I ran tests against the 3 major CSP backends: gcs is ok s3 is ok azure is ok*
|
Fixes a bug that was introduced in #37777
That PR introduced some changes to how state_store config is hashed, mainly expanding the inputs that influence the hash value. One of the new inputs is the version of the provider used for PSS.
In the past we have also agreed that the provider version value can be
nilwhen using a builtin or reattached provider.As a result of these two things, the Hash method could panic when using a builtin or reattached provider resulted in the method receiving a nil pointer for a version.Version. This PR addresses that panic and adds test coverage of nil pointers being tolerated.
Target Release
N/A
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry