Skip to content

project: fix labels permadiff #18209

Merged
malhotrasagar2212 merged 4 commits into
GoogleCloudPlatform:mainfrom
BBBmau:fix-diff-project-service-labels
Jul 7, 2026
Merged

project: fix labels permadiff #18209
malhotrasagar2212 merged 4 commits into
GoogleCloudPlatform:mainfrom
BBBmau:fix-diff-project-service-labels

Conversation

@BBBmau

@BBBmau BBBmau commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Release Note Template for Downstream PRs (will be copied)

Fixes hashicorp/terraform-provider-google#28183

passing regression test:

Running tool: /opt/homebrew/bin/go test -test.fullpath=true -timeout 30s -run ^TestPopulateGoogleProjectResourceData_DoesNotCopyAllLabelsToTerraformLabelsWhenUnset$ github.com/hashicorp/terraform-provider-google/google/services/resourcemanager

=== RUN   TestPopulateGoogleProjectResourceData_DoesNotCopyAllLabelsToTerraformLabelsWhenUnset
2026/07/07 10:33:27 [DEBUG] SetResourceIdentityAttributes: skipping, identity unavailable: Resource does not have Identity schema. Please set one in order to use Identity(). This is always a problem in the provider code.
--- PASS: TestPopulateGoogleProjectResourceData_DoesNotCopyAllLabelsToTerraformLabelsWhenUnset (0.00s)
PASS
ok      github.com/hashicorp/terraform-provider-google/google/services/resourcemanager  (cached)

failing prior to this PR:

=== RUN   TestPopulateGoogleProjectResourceData_DoesNotCopyAllLabelsToTerraformLabelsWhenUnset
2026/07/07 10:37:37 [DEBUG] SetResourceIdentityAttributes: skipping, identity unavailable: Resource does not have Identity schema. Please set one in order to use Identity(). This is always a problem in the provider code.
    /Users/mau/Dev/terraform-provider-google/google/services/resourcemanager/resource_google_project_internal_test.go:36: expected terraform_labels to remain empty when unset in config, got map[string]interface {}{"earth-engine":"", "firebase":"enabled"}
--- FAIL: TestPopulateGoogleProjectResourceData_DoesNotCopyAllLabelsToTerraformLabelsWhenUnset (0.00s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-google/google/services/resourcemanager  1.320s

See Write release notes for guidance.

bug: fixed labels diff in `google_project`

@modular-magician

modular-magician commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 22b24f7:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 5 deletions(-)
google-beta provider View Diff 1 file changed, 5 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
183 152 30 1
Affected Service Packages
  • resourcemanager

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccProject_importBlockWithResourceIdentity

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccProject_importBlockWithResourceIdentity

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@BBBmau VCR tests complete for 22b24f7!

@modular-magician

modular-magician commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 57556ba:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 66 insertions(+), 9 deletions(-)
google-beta provider View Diff 3 files changed, 66 insertions(+), 9 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
183 152 30 1
Affected Service Packages
  • resourcemanager

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccProject_importBlockWithResourceIdentity

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
❌ Error · Log - TestAccProject_importBlockWithResourceIdentity

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@BBBmau VCR tests complete for 57556ba!

@modular-magician

modular-magician commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 5cef5ea:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 66 insertions(+), 9 deletions(-)
google-beta provider View Diff 3 files changed, 66 insertions(+), 9 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
183 151 30 2
Affected Service Packages
  • resourcemanager

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccProject_importBlockWithResourceIdentity

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log ❌ Error · Log TestAccProjectIamMemberRemove_memberInMultipleBindings
❌ Error · Log - TestAccProject_importBlockWithResourceIdentity

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

🔴 Replaying Rerun Failed: Some tests failed due to non-determinism when VCR replayed the response. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@BBBmau VCR tests complete for 5cef5ea!

@modular-magician

modular-magician commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c5f8808:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 3 files changed, 62 insertions(+), 5 deletions(-)
google-beta provider View Diff 3 files changed, 62 insertions(+), 5 deletions(-)

Test report

Analytics

Total Tests Passed Skipped Affected
183 152 31 0
Affected Service Packages
  • resourcemanager

Learn how VCR tests work


Step 1: Replaying Mode

🟢 All tests passed in Replaying mode! No Recording was needed.

View the replaying VCR build log

@BBBmau VCR tests complete for c5f8808!

@BBBmau BBBmau marked this pull request as ready for review July 7, 2026 19:46
@malhotrasagar2212 malhotrasagar2212 self-requested a review July 7, 2026 21:20

@malhotrasagar2212 malhotrasagar2212 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@malhotrasagar2212 malhotrasagar2212 added this pull request to the merge queue Jul 7, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 4d5fa96 Jul 7, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google_project: v7.39.0 causes label drift for externally-managed labels on projects without a labels block

3 participants