-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
update web app config datasource to plugin-framework #7501
update web app config datasource to plugin-framework #7501
Conversation
2a21100
to
b88fcd5
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 25 files changed, 4722 insertions(+), 668 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 13 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccFrameworkProviderBasePath_setBasePath|TestAccFrameworkProviderBasePath_setInvalidBasePath|TestAccFrameworkProviderMeta_setModuleName|TestAccFirebaseWebApp_firebaseWebAppFull|TestAccFirebaseWebApp_firebaseWebAppBasicExample|TestAccDataSourceGoogleFirebaseAppleAppConfig|TestAccDataSourceGoogleCloudAssetResourcesSearchAll_basic|TestAccComposerEnvironment_withEncryptionConfigComposer1|TestAccDataSourceDnsRecordSet_basic|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceDNSKeys_basic|TestAccNetworkServicesGateway_update |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
b88fcd5
to
8565cf9
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 25 files changed, 4725 insertions(+), 668 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 11 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccNetworkServicesGateway_update|TestAccFirebaseWebApp_firebaseWebAppFull|TestAccFirebaseWebApp_firebaseWebAppBasicExample|TestAccComputeInstanceFromRegionTemplate_basic|TestAccFrameworkProviderBasePath_setBasePath|TestAccFrameworkProviderMeta_setModuleName|TestAccDataSourceGoogleFirebaseAppleAppConfig|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceDnsRecordSet_basic|TestAccDataSourceDNSKeys_basic |
Tests passed during RECORDING mode: All tests passed |
8565cf9
to
e74a22c
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 5 insertions(+), 6 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccFirebaserulesRelease_BasicRelease|TestAccFirebaseWebApp_firebaseWebAppFull|TestAccFirebaseWebApp_firebaseWebAppBasicExample|TestAccComposerEnvironment_withEncryptionConfigComposer2|TestAccComputeInstanceFromRegionTemplate_basic|TestAccComposerEnvironment_withEncryptionConfigComposer1|TestAccNetworkServicesGateway_update|TestAccFrameworkProviderMeta_setModuleName|TestAccFrameworkProviderBasePath_setBasePath|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDnsRecordSet_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceDNSKeys_basic|TestAccDataSourceGoogleFirebaseAppleAppConfig |
e74a22c
to
69c8ecd
Compare
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 1 file changed, 3 insertions(+), 3 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 14 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccFirebaseWebApp_firebaseWebAppFull|TestAccFirebaseWebApp_firebaseWebAppBasicExample|TestAccNetworkServicesGateway_update|TestAccComputeInstanceFromRegionTemplate_basic|TestAccComposerEnvironment_withEncryptionConfigComposer2|TestAccComposerEnvironment_withEncryptionConfigComposer1|TestAccComputeForwardingRule_update|TestAccFrameworkProviderBasePath_setBasePath|TestAccFrameworkProviderMeta_setModuleName|TestAccDataSourceGoogleFirebaseAppleAppConfig|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccDataSourceDnsRecordSet_basic|TestAccDataSourceDNSKeys_basic |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
mmv1/third_party/terraform/data_sources/data_source_google_firebase_web_app_config.go.erb
Outdated
Show resolved
Hide resolved
mmv1/third_party/terraform/data_sources/data_source_google_firebase_web_app_config.go.erb
Outdated
Show resolved
Hide resolved
if err != nil { | ||
return err | ||
// Read Provider meta into the meta model | ||
resp.Diagnostics.Append(req.ProviderMeta.Get(ctx, &metaData)...) |
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.
thinking out loud, not necessarily actionable: I've been finding the resp.Diagnostics.Append(doStuff())
pattern hard to read- I keep focusing on the part where we're writing to diagnostics, rather than the action we're taking . Did you find it grew on you? That was the case with errors in Go for me, initially, so it may just be that this looks different than I'm used to.
I've been wondering if a pattern like the following would be more clear to folks off the bat:
diag := req.ProviderMeta.Get(ctx, &metaData)
resp.Diagnostics.Append(diag...)
if resp.Diagnostics.HasError() {
return
}
Even better (imo) would be if there was a function in the framework like "IsEmpty()" or "HasAny()", allowing the control flow to be more clear:
diag := req.ProviderMeta.Get(ctx, &metaData)
if !diag.IsEmpty() {
resp.Diagnostics.Append(diag...)
if resp.Diagnostics.HasError() {
return
}
}
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.
Interesting. Your first example is actually the pattern that I got used to, but I guess that was always in cases where diags
was returned alongside another value. Often times cases like this particular one I mimicked/copied from the plugin-framework examples, but I think the only cases I ran into it were here, when reading the config, and when saving state (all which I got into the copy/paste habit of).
As for the second example, I don't believe they have any of those methods currently available. There are WarningsCount
and ErrorsCount
available that we could use.
I have no strong preference, so if you do I can update them and set that consistency.
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.
I don't have strong enough feelings to say we need to make this change, I'm just overthinking this stuff now to try and preempt needing to change it later!
As for the second example, I don't believe they have any of those methods currently available
Yeah, they're not. They'd be trivial to PR in, I think!
This reverts commit 06f9b2e.
efb9e78
to
bd04e46
Compare
I've added in the suggested changes to the other plugin-framework data sources as well for consistency |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 4 files changed, 36 insertions(+), 26 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 19 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccFirebaseWebApp_firebaseWebAppFull|TestAccFirebaseWebApp_firebaseWebAppBasicExample|TestAccDNSResponsePolicy_update|TestAccContainerCluster_withFlexiblePodCIDR|TestAccFrameworkProviderMeta_setModuleName|TestAccContainerCluster_withPrivateClusterConfigBasic|TestAccFrameworkProviderBasePath_setBasePath|TestAccContainerNodePool_nodeLocations|TestAccContainerNodePool_maxPodsPerNode|TestAccDataSourceGoogleFirebaseAppleAppConfig|TestAccComposerEnvironment_withWebServerConfig|TestAccComposerEnvironment_withEncryptionConfigComposer1|TestAccComposerEnvironment_UpdateComposerV2WithTriggerer|TestAccApigeeKeystoresAliasesKeyCertFile_apigeeKeystoresAliasesKeyCertFileTestExample|TestAccDataSourceDnsRecordSet_basic|TestAccDataSourceDnsManagedZone_basic|TestAccDataSourceDNSKeys_basic|TestAccDataSourceDNSKeys_noDnsSec|TestAccWorkstationsWorkstationCluster_workstationClusterPrivateExample |
Tests passed during RECORDING mode: Tests failed during RECORDING mode: Please fix these to complete your PR |
…form#7501) * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update provider alias name * other changes * fix up base path test * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * reverse another pointer * update firebase apple app config datasource to plugin-framework * update with latest plugin-framework changes * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * changes after merge * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * update firebase apple app config datasource to plugin-framework * update web app config * update external provider version tests * rm non erb, bad merge maybe * update after a bad merge * add comments * review comments, applied them to dns data sources as well
…form#7501) * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update provider alias name * other changes * fix up base path test * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * reverse another pointer * update firebase apple app config datasource to plugin-framework * update with latest plugin-framework changes * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * changes after merge * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * update firebase apple app config datasource to plugin-framework * update web app config * update external provider version tests * rm non erb, bad merge maybe * update after a bad merge * add comments * review comments, applied them to dns data sources as well
…form#7501) * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update provider alias name * other changes * fix up base path test * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * reverse another pointer * update firebase apple app config datasource to plugin-framework * update with latest plugin-framework changes * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * changes after merge * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * update firebase apple app config datasource to plugin-framework * update web app config * update external provider version tests * rm non erb, bad merge maybe * update after a bad merge * add comments * review comments, applied them to dns data sources as well
…form#7501) * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update provider alias name * other changes * fix up base path test * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * reverse another pointer * update firebase apple app config datasource to plugin-framework * update with latest plugin-framework changes * Revert "revert plugin framework code (GoogleCloudPlatform#7287)" This reverts commit 06f9b2e. * changes to plugin-framework work for parity * add some provider tests fix other inconsistent errors with the sdk provider * update tests to use muxer * use beta provider when we need to for some of the provider tests * remove all the specific providers from the config * changes after merge * attempt to fix vcr tests * refactor the vcr configuration * capitalize provider factories * some test failure fixes * remove skip step if vcr * review comments * fixed pointer errors * move providerversion450 to be dependent on resource, revers diag pointers * update firebase apple app config datasource to plugin-framework * update web app config * update external provider version tests * rm non erb, bad merge maybe * update after a bad merge * add comments * review comments, applied them to dns data sources as well
I have this based off #7266, updates the
google_firebase_web_app_config
to use plugin-frameworkIf this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
in the generated providers to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)