Skip to content
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: update resource manager tag references #12132

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Oct 25, 2024

Part 2:

Update resource manager tag references in terraform code templates for generated tests (also some minor formatting changes)

  • Update the code to use foo.id vs "tagKeys/${foo.name}" or "tagValues/${foo.name}"
  • Update some project data source references to project.id vs projects/.....number
  • Wrap map keys in parens where needed.

Followup to #12118

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


@github-actions github-actions bot requested a review from slevenick October 25, 2024 17:05
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 25, 2024
@modular-magician modular-magician added service/terraform and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Oct 25, 2024
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 11 files changed, 118 insertions(+), 118 deletions(-))
google-beta provider: Diff ( 15 files changed, 142 insertions(+), 142 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 11 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1198
Passed tests: 1111
Skipped tests: 83
Affected tests: 4

Click here to see the affected service packages
  • bigquery
  • compute
  • workstations

Action taken

Found 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBigQueryDataset_bigqueryDatasetResourceTagsExample
  • TestAccComputeInstanceConfidentialInstanceConfigMain
  • TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain
  • TestAccComputeRegionNetworkFirewallPolicyWithRules_computeRegionNetworkFirewallPolicyWithRulesFullExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccBigQueryDataset_bigqueryDatasetResourceTagsExample [Error message] [Debug log]
TestAccComputeInstanceConfidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeRegionNetworkFirewallPolicyWithRules_computeRegionNetworkFirewallPolicyWithRulesFullExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@wyardley
Copy link
Contributor Author

I’ll double check the changes, and try to run some of the failed ones locally - do the errors make it clear if the failures are due to this change?

@github-actions github-actions bot requested a review from slevenick October 25, 2024 19:41
@slevenick
Copy link
Contributor

At least the BQ one seems to be
Error: Error creating Dataset: googleapi: Error 400: Invalid tagKey. Please use a valid tagKey., invalid

This one seems like a bad config, missing a quote or something: TestAccComputeRegionNetworkFirewallPolicyWithRules_computeRegionNetworkFirewallPolicyWithRulesFullExample

The others may be unrelated

@wyardley
Copy link
Contributor Author

@slevenick I have a fix for the BQ one that I'm pushing up (works locally). I couldn't figure out how to run the generated test locally, but I found the errant quote, so updating that as well.

@wyardley wyardley force-pushed the wyardley/adjust_resource_manager_part2 branch from ccab35e to e94928c Compare October 25, 2024 22:57
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 25, 2024
@wyardley wyardley force-pushed the wyardley/adjust_resource_manager_part2 branch from e94928c to d1810c1 Compare October 25, 2024 22:59
@wyardley
Copy link
Contributor Author

hashicorp/terraform-provider-google#19885 << I think this is still not fixed and that may be the issue with TestAccComputeInstanceConfidentialInstanceConfigMain and probably also TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain.

@wyardley
Copy link
Contributor Author

I don't know if it's the right fix, but opened #12149 on the off chance that it is.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 28, 2024
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 12 files changed, 119 insertions(+), 120 deletions(-))
google-beta provider: Diff ( 16 files changed, 143 insertions(+), 144 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 11 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1198
Passed tests: 1112
Skipped tests: 83
Affected tests: 3

Click here to see the affected service packages
  • bigquery
  • compute
  • workstations

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccBigQueryDataset_bigqueryDatasetResourceTagsExample
  • TestAccComputeInstanceConfidentialInstanceConfigMain
  • TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccBigQueryDataset_bigqueryDatasetResourceTagsExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccComputeInstanceConfidentialInstanceConfigMain [Error message] [Debug log]
TestAccComputeInstanceFromMachineImage_confidentialInstanceConfigMain [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@wyardley
Copy link
Contributor Author

@slevenick can you try re-running those tests now that the test fix is merged?

Update resource manager tag references in terraform code templates and
some minor formatting changes

- Update the code to use foo.id vs "tagKeys/${foo.name}" or
  "tagValues/${foo.name}", and foo.namespaced_name vs.
  "${data.google_project.project.project_id}/${foo.short_name}"
- Wrap map keys in parens where needed.

Followup to GoogleCloudPlatform#12118
@wyardley wyardley force-pushed the wyardley/adjust_resource_manager_part2 branch from d0276a6 to d3bcaf9 Compare October 29, 2024 22:22
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 29, 2024
Copy link

@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Oct 30, 2024
@modular-magician
Copy link
Collaborator

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

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 12 files changed, 119 insertions(+), 120 deletions(-))
google-beta provider: Diff ( 16 files changed, 143 insertions(+), 144 deletions(-))
Open in Cloud Shell: Diff ( 1 file changed, 11 insertions(+), 12 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1209
Passed tests: 1126
Skipped tests: 83
Affected tests: 0

Click here to see the affected service packages
  • workstations
  • bigquery
  • compute

🟢 All tests passed!

View the build log

@slevenick slevenick merged commit e206f39 into GoogleCloudPlatform:main Oct 31, 2024
11 checks passed
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Nov 1, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Nov 5, 2024
akshat-jindal-nit pushed a commit to akshat-jindal-nit/magic-modules that referenced this pull request Nov 18, 2024
amanMahendroo pushed a commit to amanMahendroo/magic-modules that referenced this pull request Dec 17, 2024
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.

3 participants