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

Add tags field to Folder resource #11424

Merged

Conversation

abd-goog
Copy link
Member

@abd-goog abd-goog commented Aug 12, 2024

Add tags field to folder resource to allow setting tags on folder resources at creation time.
Part of b/330143705

Part of hashicorp/terraform-provider-google#18904

Release Note Template for Downstream PRs (will be copied)

resourcemanager: added `tags` field to `google_folder` to allow setting tags for folders at creation time

@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 ( 2 files changed, 50 insertions(+), 28 deletions(-))
google-beta provider: Diff ( 2 files changed, 50 insertions(+), 28 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

1 similar comment
@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 ( 2 files changed, 50 insertions(+), 28 deletions(-))
google-beta provider: Diff ( 2 files changed, 50 insertions(+), 28 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@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 ( 2 files changed, 54 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 2 files changed, 54 insertions(+), 1 deletion(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@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 ( 2 files changed, 52 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 2 files changed, 52 insertions(+), 4 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

1 similar comment
@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 ( 2 files changed, 52 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 2 files changed, 52 insertions(+), 4 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@abd-goog abd-goog changed the title ## draft Add tags field to Folder resource Aug 13, 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 ( 4 files changed, 95 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 4 files changed, 95 insertions(+), 4 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_folder (135 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_folder" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 145
Passed tests: 114
Skipped tests: 30
Affected tests: 1

Click here to see the affected service packages
  • resourcemanager

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
  • TestAccFolder_tags

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccFolder_tags[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@abd-goog abd-goog marked this pull request as ready for review August 13, 2024 09:34
@github-actions github-actions bot requested a review from SarahFrench August 13, 2024 09:34
Copy link

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

@SarahFrench, 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.

@abd-goog
Copy link
Member Author

Hi @slevenick @zli82016 , can we include this change in the major release? Or it needs to go in one of the regular releases later?

@abd-goog
Copy link
Member Author

Tests failed during RECORDING mode: TestAccFolder_tags[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

@zli82016 The test passes on local, but would need help from TF team to add the tags resource in the test organization and provide tag admin permission to VCR test user.
Or should I mark this test as skipped?

@SarahFrench SarahFrench requested review from zli82016 and removed request for SarahFrench August 13, 2024 15:33
@zli82016
Copy link
Member

Hi @slevenick @zli82016 , can we include this change in the major release? Or it needs to go in one of the regular releases later?

@abd-goog , do you know how many resources tags need to be added?

@abd-goog
Copy link
Member Author

abd-goog commented Aug 14, 2024

Hi @slevenick @zli82016 , can we include this change in the major release? Or it needs to go in one of the regular releases later?

@abd-goog , do you know how many resources tags need to be added?

@zli82016 right now only CRM projects and folders are eligible and CRM wants to go GA with Tagging at creation as soon as possible.
There will be other resources in the coming weeks but for now we need to prioritize for Projects and Folders only.

@zli82016
Copy link
Member

Hi @slevenick @zli82016 , can we include this change in the major release? Or it needs to go in one of the regular releases later?

@abd-goog , do you know how many resources tags need to be added?

@zli82016 right now only CRM projects and folders are eligible and CRM wants to go GA with Tagging at creation as soon as possible. There will be other resources in the coming weeks but for now we need to prioritize for Projects and Folders only.

Either major release or later regular release is fine.

@abd-goog
Copy link
Member Author

Hi @slevenick @zli82016 , can we include this change in the major release? Or it needs to go in one of the regular releases later?

@abd-goog , do you know how many resources tags need to be added?

@zli82016 right now only CRM projects and folders are eligible and CRM wants to go GA with Tagging at creation as soon as possible. There will be other resources in the coming weeks but for now we need to prioritize for Projects and Folders only.

Either major release or later regular release is fine.

Would be great to get it in the major release. FYI the PR for projects resource: #11440

@zli82016
Copy link
Member

zli82016 commented Aug 14, 2024

Tests failed during RECORDING mode: TestAccFolder_tags[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

@zli82016 The test passes on local, but would need help from TF team to add the tags resource in the test organization and provide tag admin permission to VCR test user. Or should I mark this test as skipped?

What do you mean to add the tags resource in the test organization, @abd-goog ?
This is the post request:


{
 "displayName": "tf-test-k7z9737heo",
 "parent": "organizations/529579013760",
 "tags": {
  "529579013760/env": "test"
 }
}

should the tag "529579013760/env": "test" exist before creating the new folder?

@zli82016
Copy link
Member

Tests failed during RECORDING mode: TestAccFolder_tags[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

@zli82016 The test passes on local, but would need help from TF team to add the tags resource in the test organization and provide tag admin permission to VCR test user. Or should I mark this test as skipped?

Tests failed during RECORDING mode: TestAccFolder_tags[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

@zli82016 The test passes on local, but would need help from TF team to add the tags resource in the test organization and provide tag admin permission to VCR test user. Or should I mark this test as skipped?

You need to create the tags resource with Terraform configuration in the same test.

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

Modify test to include tags creation.

@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 ( 3 files changed, 100 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 3 files changed, 100 insertions(+), 4 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_folder (143 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_folder" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • resourcemanager
#### Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccFolder_tags
    $\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

@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 ( 3 files changed, 100 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 3 files changed, 100 insertions(+), 4 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_folder (145 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_folder" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 147
Passed tests: 116
Skipped tests: 30
Affected tests: 1

Click here to see the affected service packages
  • resourcemanager

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
  • TestAccFolder_tags

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccFolder_tags[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@abd-goog abd-goog force-pushed the folders-tagging-at-creation branch from d265769 to 227ce2e Compare September 4, 2024 14:46
@abd-goog
Copy link
Member Author

abd-goog commented Sep 4, 2024

@zli82016 PTAL, have updated tests to use bootstrapping logic. Thanks!

@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 ( 3 files changed, 100 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 3 files changed, 100 insertions(+), 4 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_folder (145 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_folder" "primary" {
  tags = # value needed
}

1 similar comment
@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 ( 3 files changed, 100 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 3 files changed, 100 insertions(+), 4 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_folder (145 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_folder" "primary" {
  tags = # value needed
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 147
Passed tests: 116
Skipped tests: 30
Affected tests: 1

Click here to see the affected service packages
  • resourcemanager

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
  • TestAccFolder_tags

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccFolder_tags[Error message] [Debug log]

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 147
Passed tests: 116
Skipped tests: 30
Affected tests: 1

Click here to see the affected service packages
  • resourcemanager

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
  • TestAccFolder_tags

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccFolder_tags[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$

View the build log or the debug log for each test

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

LGTM

@zli82016 zli82016 merged commit 4f35c8a into GoogleCloudPlatform:main Sep 5, 2024
9 checks passed
entertvl pushed a commit to entertvl/magic-modules that referenced this pull request Sep 9, 2024
iyabchen pushed a commit to iyabchen/magic-modules that referenced this pull request Sep 14, 2024
abd-goog added a commit to abd-goog/magic-modules that referenced this pull request Sep 23, 2024
niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Oct 7, 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