-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Refactor muxing 1 : Re-use same config to configure the SDK and PF providers, fix VCR testing #11903
Merged
SarahFrench
merged 21 commits into
GoogleCloudPlatform:main
from
SarahFrench:mux-refactor-4-reuse-sdk-config
Nov 21, 2024
Merged
Refactor muxing 1 : Re-use same config to configure the SDK and PF providers, fix VCR testing #11903
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
adb7ffa
Add comments highlighting that parallel schemas are needed and must m…
SarahFrench 8ceeaec
When creating the PF provider, store a pointer to the SDK provider st…
SarahFrench 6d447a5
Update the plugin-framework provider to pass the SDK's `Config` meta …
SarahFrench 5377e6d
Update all PF-implemented things to use the Config struct, update the…
SarahFrench 767e709
Update `google_provider_config_plugin_framework` to use Config struct…
SarahFrench cddd298
Update `TestFrameworkProvider_impl` to use primary when creating PF p…
SarahFrench 0d87c40
Fix how the plugin-framework is used in VCR tests
SarahFrench 80674a9
Remove most instances of VCR skips referencing https://github.com/has…
SarahFrench 5ade5f7
Update `project` acctest to reflect how unset string values are now "…
SarahFrench 42baac2
Update `request_reason` acctest to reflect how unset string values ar…
SarahFrench 13e4829
Update `add_terraform_attribution_label` + `terraform_attribution_lab…
SarahFrench 8a5f263
Fix TestAccFrameworkProviderBasePath_setBasePath in VCR by removing u…
SarahFrench 8d80772
Change how acctests check that fields are unset, post-muxing fixes
SarahFrench bc0e02f
Update test for PF handling of request_timeout to use the SDK default…
SarahFrench 92feb8c
Update test for PF handling of request_timeout to expect normalistion…
SarahFrench d3f094a
Add tests for existing `NonNegativeDurationValidator` validator
SarahFrench aca5d33
Add validators to `request_timeout` field in the plugin-framework sch…
SarahFrench 0f85c17
Fix check in `TestAccFwProvider_user_project_override` subtest
SarahFrench 2ef48bb
Update comments to describe conversions between type systems in `goog…
SarahFrench 6783a7a
go fmt
SarahFrench d81573a
Add comment about need to stop empty strings being passed from Config…
SarahFrench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 0 additions & 27 deletions
27
mmv1/third_party/terraform/acctest/framework_test_utils.go.tmpl
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
to double check, this extended logic is from the need to apply the string type assertions to every item within a list (as well as the list type on the list itself)?
seperately I think it would be good to have a comment somewhere around here summarizing the need for these assertions and the resulting mix of SDK behavior in this data source (as was mentioned here, albeit not user-facing
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 code:
is all the code necessary to convert a
[]string
value to atypes.List
value where the elements aretypes.StringType
type.I realise that in the past I had intended that the
GoogleProviderConfigPluginFrameworkModel
struct in the google_provider_config_plugin_framework data source would be updated to use the SDK type system, e.gGoogleProviderConfigPluginFrameworkModel
'sImpersonateServiceAccountDelegates
field would become a[]string
value and similar for all other fields. I tried that here (SarahFrench#10) and I think that that the issues I describe there are unavoidable and we cannot use the SDK type system in this way.I'll add that comment, thanks!
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.
Done in 2ef48bb