-
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
Don't send update request if updatemask is empty for resources with terraform_labels field #9154
Conversation
Hi there, I'm the Modular magician. I've detected the following information about your changes: Breaking Change Detection FailedThe breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer. Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 59 files changed, 1261 insertions(+), 1031 deletions(-)) |
ea7e7b5
to
e1da22c
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 ( 60 files changed, 1277 insertions(+), 1043 deletions(-)) |
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 ( 60 files changed, 1277 insertions(+), 1043 deletions(-)) |
e1da22c
to
39220d2
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 ( 59 files changed, 1271 insertions(+), 1037 deletions(-)) |
It looks like there is a bug in |
Is https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/terraform/website/docs/guides/version_5_upgrade.html.markdown?plain=1#L100 still accurate after this PR? Should it be updated? |
It's still accurate. The problem is that we're calling Terraform's Update method which eventually sends a spurious Patch/Post to the API. This change will guard against sending that Patch/Post. |
Tests analyticsTotal tests: Action takenFound 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerNodePool_withKubeletConfig|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerCluster_withAddons|TestAccDataSourceGoogleServiceAccountAccessToken_basic|TestAccDataSourceGoogleServiceAccountJwt |
Rerun these tests in REPLAYING mode to catch issues
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Breaking Change Detection FailedThe breaking change detector crashed during execution. This is usually due to the downstream provider(s) failing to compile. Please investigate or follow up with your reviewer. Diff reportYour PR generated some diffs in downstreams - here they are. Terraform GA: Diff ( 158 files changed, 3151 insertions(+), 2550 deletions(-)) |
Looks like the build failing is just a case of magic-modules/mmv1/templates/terraform/post_update/cloudbuild_bitbucketserver_config.go.erb Line 24 in 48937a7
res or change it to instantiate in that line by making it :=
Looking into addressgroups to see if that transformation is safe |
48937a7
to
d141415
Compare
Yeah, made the change. |
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 ( 158 files changed, 3153 insertions(+), 2552 deletions(-)) |
mmv1/templates/terraform/pre_create/network_security_address_group_operation.go.erb
Show resolved
Hide resolved
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 ( 158 files changed, 3153 insertions(+), 2552 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccBigQueryDataTable_bigtable|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerCluster_withAddons|TestAccContainerNodePool_withKubeletConfig |
Rerun these tests in REPLAYING mode to catch issues
|
@@ -0,0 +1 @@ | |||
project = billingProject |
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.
Actually, this line is before getting billingProject
in update and delete method in the generated file and isn't working as expected
https://github.com/modular-magician/terraform-provider-google-beta/blob/be49b211522d9e2b34b84ff66268f8a9f8be5bf0/google-beta/services/networksecurity/resource_network_security_address_group.go#L366
Is it safe to move the pre_update just from line 776 to line 794 before the line of sendRequest in template file resource.erb? (The same action for pre_delete)
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! Let's make these ""
in that case. Can you file an issue to fix the inconsistency in where pre_
methods are? That should happen in a dedicated 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.
Sure. I will file an issue.
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 ( 159 files changed, 3153 insertions(+), 2567 deletions(-)) |
Tests analyticsTotal tests: Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccContainerCluster_withAddons|TestAccContainerNodePool_withUpgradeSettings|TestAccContainerNodePool_withKubeletConfig |
|
…erraform_labels field (GoogleCloudPlatform#9154) * Don't send update request if updatmask is empty when resource has terraform_labels * Remove the function check field_specific_update_methods * Set project to billing project for google_network_security_address_group * Change back of project for resource google_network_security_address_group
Fixes hashicorp/terraform-provider-google#16091
If the updateMask is empty, it means that no update is needed. The update request is not needed to be sent.
Release Note Template for Downstream PRs (will be copied)