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 Metstore Service for TagsR2401 #11611

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SamanthaMathews
Copy link

@SamanthaMathews SamanthaMathews commented Sep 2, 2024

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

Release Note Template for Downstream PRs

metastore: added `tags` field to `metastore_service` to allow setting tags for services at creation time

Copy link

google-cla bot commented Sep 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link

github-actions bot commented Sep 2, 2024

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

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

@github-actions github-actions bot requested a review from NickElliot September 2, 2024 19:53
@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/metastore and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Sep 2, 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, 146 insertions(+), 12 deletions(-))
google-beta provider: Diff ( 4 files changed, 147 insertions(+), 13 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 17 insertions(+))

Missing test report

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

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

resource "google_dataproc_metastore_service" "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
  • dataprocmetastore
#### Non-exercised tests

Tests were added that are skipped in VCR:

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

View the build log

@SamanthaMathews SamanthaMathews marked this pull request as draft September 5, 2024 07:35
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

pending googler erroneous cla trouble shooting see: #11555 (review)

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 9, 2024
mmv1/products/metastore/Service.yaml Outdated Show resolved Hide resolved
ResourceName: "google_dataproc_metastore_service.default",
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"tags"},
Copy link
Member

Choose a reason for hiding this comment

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

This probably fails right now as the field service_id, location, labels and terraform_labels are also not read back. So they should also be included in this list for it to pass. Please ensure the test passes.

Copy link
Author

Choose a reason for hiding this comment

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

Sure

@SamanthaMathews SamanthaMathews changed the title commit terraform-metastore-service-tags Add tags field to Metstore Service for TagsR2401 Sep 13, 2024
@@ -17,6 +18,16 @@ data "google_dataproc_metastore_service" "foo" {
}
```

To create an service with a tag
Copy link
Member

Choose a reason for hiding this comment

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

nit : a service

Copy link
Author

Choose a reason for hiding this comment

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

done

@@ -28,6 +39,7 @@ The following arguments are supported:

* `project` - (Optional) The project in which the resource belongs. If it
is not provided, the provider project is used.
* `tags` - (Optional) A map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored when empty. The field is immutable and causes resource replacement when mutated.
Copy link
Member

Choose a reason for hiding this comment

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

nit: tagValues/{tag_value_id}

Copy link
Author

Choose a reason for hiding this comment

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

done

@c2thorn
Copy link
Member

c2thorn commented Sep 25, 2024

Discussing with @SamanthaMathews offline about this PR and the go rewrite migration

Delete mmv1/third_party/terraform/services/dataprocmetastore/resource_dataproc_metastore_service_test.go.erb
Update dataproc_metastore_service.markdown
commit terraform-metastore-service-tags
commit terraform-metastore-service-tags
commit terraform-metastore-service-tags
commit terraform-metastore-service-tags
commit terraform-metastore-service-tags
commit terraform-metastore-service-tags
@NickElliot NickElliot force-pushed the terraform-metastore-service-tags branch from c552973 to e0b6aa1 Compare September 27, 2024 19:40
@NickElliot
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/metastore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants