Add tests around how plugin framework provider configuration code handles user_project_override
values, fix potential bug
#15776
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR:
Defect found:
During this PR I found that the FrameworkProviderConfig struct used when configuring the plugin framework version of the provider has a UserProjectOverride field but the value is never set. Also, it uses a regular Go boolean data type, instead of the new data type that improves handling of Null and Unknown values.
The SDK version of that config struct has an equivalent UserProjectOverride field and its value is set to the user-supplied value here
Fix:
In GoogleCloudPlatform/magic-modules@dbe4952 I changed the struct to use
types.Bool
, made that field have the value set, and I updated the one location where the (FrameworkProviderConfig).UserProjectOverride value is accessed.This may have an impact on users, but it's by fixing a bug not by introducing a breaking change. It may be that this defect only would impact users when provisioning resources that are defined using the plugin framework, and currently there are only data sources defined in this way. So the defect may not have had a chance to cause any negative effects yet.
I've included a release note describing this.
Release Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#8862