-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Added support for approval when build is run #5837
Added support for approval when build is run #5837
Conversation
Hello! I am a robot who works on Magic Modules PRs. I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review. Thanks for your contribution! A human will be with you soon. @shuyama1, please review this PR or find an appropriate assignee. |
Woo! Much appreciated @abhinavrau |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 99 insertions(+)) |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataSourceSqlDatabaseInstance_basic|TestAccApikeysKey_AndroidKey|TestAccApikeysKey_BasicKey|TestAccApikeysKey_IosKey|TestAccApikeysKey_MinimalKey|TestAccApikeysKey_ServerKey|TestAccArtifactRegistryRepository_create_mvn_snapshot|TestAccArtifactRegistryRepository_create_mvn_release|TestAccBigqueryReservationAssignment_BasicHandWritten|TestAccCGCSnippet_sqlMysqlInstanceBackupExample|TestAccCGCSnippet_sqlPostgresInstanceBackupExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupExample|TestAccCGCSnippet_sqlMysqlInstanceAuthorizedNetworkExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample|TestAccCGCSnippet_sqlSqlserverInstanceBackupRetentionExample|TestAccCloudBuildTrigger_cloudbuildTriggerPubsubConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerWebhookConfigExample|TestAccCloudBuildTrigger_cloudbuildTriggerManualExample|TestAccCloudBuildTrigger_cloudbuildTriggerFilenameExample|TestAccCloudBuildTrigger_cloudbuildTriggerBuildExample|TestAccCloudBuildTrigger_available_secrets_config|TestAccCloudBuildTrigger_basic|TestAccCloudBuildTrigger_cloudbuildTriggerServiceAccountExample|TestAccCloudBuildTrigger_disable|TestAccCloudBuildTrigger_fullStep|TestAccCloudFunctionsFunction_secretEnvVar|TestAccComputeForwardingRule_update|TestAccContainerAwsCluster_BasicHandWritten|TestAccContainerAwsNodePool_BasicHandWritten|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccContainerNodePool_gvnic|TestAccDataprocCluster_nonPreemptibleSecondary|TestAccDataprocCluster_updatable|TestAccDataprocCluster_withConfigOverrides|TestAccFirebaserulesRelease_BasicRelease|TestAccFirebaserulesRelease_MinimalRelease|TestAccFirebaserulesRuleset_BasicRuleset|TestAccFirebaserulesRuleset_MinimalRuleset|TestAccLoggingLogView_BasicHandWritten|TestAccMonitoringUptimeCheckConfig_uptimeCheckConfigHttpExample|TestAccNetworkServicesEdgeCacheOrigin_networkServicesEdgeCacheOriginAdvancedExample|TestAccNetworkServicesEdgeCacheOrigin_updateAndImport|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample|TestAccNetworkServicesEdgeCacheService_updateAndImport|TestAccOSConfigPatchDeployment_osConfigPatchDeploymentDailyMidnightExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=270099 |
Tests failed during RECORDING mode: TestAccContainerCluster_withAuthenticatorGroupsConfig Please fix these to complete your PR |
Not sure why this test failed since my PR does not have anything to do with what this test is testing |
@abhinavrau best I can see, it's failing for other PRs, so maybe expected? Also, I think it looks like a maintainer may need to run |
Thanks @abhinavrau for making the changes and thanks @wyardley for looking into the issue. Test failed seem not related to this PR. I am working on reviewing the PR and testing it locally. |
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.
Tested the field locally and it seemed like setting approval_required
to false will fail the test
The problems are
|
…proval_config with allow_emptyy_object and approval_required field to have a default value of false
Thanks @shuyama1 for finding the issue. When
The above is not the case since the API does not expect it to be sent when
The above is the problem when this flag is set to
The output does not tell me much of what went wrong. I tried adding |
Would you mind committing your code? |
…ide custom flattener for field
Never mind. I debugged the test and it turns out I had to use the fieldname as specified in the terraform.yaml to the flattened field name. It is working now. I have updated the PR |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 89 insertions(+), 3 deletions(-)) |
mmv1/templates/terraform/custom_flatten/cloudbuild_approval_required.go.erb
Outdated
Show resolved
Hide resolved
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccCGCSnippet_sqlSqlserverInstanceBackupLocationExample|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccNetworkServicesEdgeCacheService_networkServicesEdgeCacheServiceAdvancedExample You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=272764 |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 89 insertions(+), 3 deletions(-)) |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccFirebaserulesRelease_BasicRelease|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=272823 |
Tests failed during RECORDING mode: TestAccContainerCluster_withAuthenticatorGroupsConfig Please fix these to complete your PR |
These failures are not related to this PR in any way. Could you please
review the results to see if this PR looks good?
Thanks
…On Fri, Mar 25, 2022 at 3:27 PM The Magician ***@***.***> wrote:
Tests failed during RECORDING mode:
TestAccContainerCluster_withAuthenticatorGroupsConfig Please fix these to
complete your PR
—
Reply to this email directly, view it on GitHub
<#5837 (comment)>,
or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/ABAPBA7V5GOASAHEIW7JISTVBYHRTANCNFSM5RDLKGXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@abhinavrau Thanks for making the update and sorry for the delay on reviewing it! Got a question tho: any reason that we want to flatten the nested object here? I think we'll want to preserve the structure of the resource as it was, as we try to limit the use of changing the schema of resources. |
Thanks @shuyama1 for reviewing and the suggestion. Let me try it out. I made the change. The PR is updated |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 110 insertions(+), 3 deletions(-)) |
Thanks again @shuyama1 for pointing this out. I have removed the override. Hopefully I didn't miss anything else. |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 110 insertions(+), 3 deletions(-)) |
mmv1/templates/terraform/custom_flatten/cloudbuild_approval_required.go.erb
Outdated
Show resolved
Hide resolved
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDataprocMetastoreServiceDatasource_basic|TestAccCloudBuildTrigger_basic|TestAccCloudBuildTrigger_available_secrets_config|TestAccCloudBuildTrigger_pubsub_config|TestAccCloudBuildTrigger_webhook_config|TestAccCloudBuildTrigger_disable|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccFirebaserulesRelease_BasicRelease|TestAccSpannerDatabase_postgres You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=274376 |
Tests failed during RECORDING mode: TestAccContainerCluster_withAuthenticatorGroupsConfig Please fix these to complete your PR |
Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are. Diff report:Terraform GA: Diff ( 3 files changed, 110 insertions(+), 3 deletions(-)) |
I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccContainerCluster_withAuthenticatorGroupsConfig|TestAccFirebaserulesRelease_BasicRelease You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=274383 |
Tests failed during RECORDING mode: TestAccContainerCluster_withAuthenticatorGroupsConfig Please fix these to complete your PR |
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! Thank you so much!
Thanks @abhinavrau @shuyama1! This has been on my want list for a while! Looking forward to seeing this in an upcoming provider release. |
Fixes hashicorp/terraform-provider-google#9880
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Release Note Template for Downstream PRs (will be copied)