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 Filestore Backups for TagsR2401 #11614

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

Conversation

SamanthaMathews
Copy link

@SamanthaMathews SamanthaMathews commented Sep 3, 2024

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

release-note:none

filestore: added `tags` field to `filstore_backup` to allow setting tags for backups at creation time
The contents of this code are entirely owned by Google LLC in accordance with the agreement between Google LLC and the third party submitting this code into Google's open source repository

Copy link

google-cla bot commented Sep 3, 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.

@github-actions github-actions bot requested a review from BBBmau September 3, 2024 08:28
Copy link

github-actions bot commented Sep 3, 2024

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

@BBBmau, 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 needs reviewer's approval to run presubmit tests label Sep 3, 2024
@BBBmau
Copy link
Collaborator

BBBmau commented Sep 5, 2024

could you fix the changelog so that it follows what's shown in the guidelines?

https://googlecloudplatform.github.io/magic-modules/contribute/release-notes/

@modular-magician modular-magician removed the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 5, 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, 148 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 148 insertions(+), 1 deletion(-))
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_filestore_backup (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_filestore_backup" "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
  • filestore
#### Non-exercised tests

Tests were added that are skipped in VCR:

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

View the build log

}
tags = {`, context)

l := ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a build error due to this line:

google-beta/services/filestore/resource_filestore_backup_test.go:179:13: expected ')', found ','

Copy link
Author

Choose a reason for hiding this comment

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

Done

@SamanthaMathews SamanthaMathews marked this pull request as draft September 5, 2024 07:35
@SamanthaMathews SamanthaMathews changed the title commit terraform-filestore-backup-tag Add tags field to Filestore Backups for TagsR2401 Sep 5, 2024
@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Sep 6, 2024
labels = {
"files":"label1",
"other-label": "label2"
}
Copy link
Member

Choose a reason for hiding this comment

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

Do not hard code tags in here, use the parameter provided. Example: https://screenshot.googleplex.com/BmcLcKPfbbjhbji

Copy link
Author

Choose a reason for hiding this comment

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

done

t.Parallel()

org := envvar.GetTestOrgFromEnv(t)
instName := fmt.Sprintf("tf-fs-inst-%d", acctest.RandInt(t))
Copy link
Member

Choose a reason for hiding this comment

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

nit: instanceName backupName instead of instName bkupName in all usages.

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

deletion_protection-backup-tags
commit terraform-filestore-backup-tags
commit terraform-filestore-backup-tags
commit terraform-filestore-backup-tags
commit terraform-filestore-backup-tags
commit terraform-filestore-backup-tag
@NickElliot NickElliot force-pushed the terraform-filestore-backup-tags branch from fa226fb to 2070e67 Compare September 27, 2024 19:45
@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/filestore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants