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 #12442

Merged

Conversation

aniket-gupta
Copy link
Contributor

@aniket-gupta aniket-gupta commented Nov 27, 2024

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

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

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
@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, 105 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 105 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 (4 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: 14
Passed tests: 13
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • filestore

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFilestoreBackup_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

@SamanthaMathews
Copy link

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, 105 insertions(+), 1 deletion(-)) google-beta provider: Diff ( 4 files changed, 105 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 (4 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
}

The acceptance tests are added in the file mmv1/third_party/terraform/services/filestore/resource_filestore_backup_test.go

func testAccFilestoreBackupTags(instanceName string, backupName string, tags map[string]string) string {

	r := fmt.Sprintf(`
	resource "google_filestore_instance" "instance" {
          name     = "%s"
          location = "us-central1-b"
          tier     = "BASIC_HDD"
            file_shares {
              capacity_gb = 1024
              name        = "share1"
            }
            networks {
              network      = "default"
              modes        = ["MODE_IPV4"]
              connect_mode = "DIRECT_PEERING"
            }
        }
        resource "google_filestore_backup" "backup" {
          name              = "%s"
          location          = "us-central1"
          description       = "This is a filestore backup for the test instance"
          source_instance   = google_filestore_instance.instance.id
          source_file_share = "share1"
          labels = {
            "files":"label1",
            "other-label": "label2"
          }
	  tags = {`, instanceName, backupName)

	l := ""
	for key, value := range tags {
		l += fmt.Sprintf("%q = %q\n", key, value)
	}

	l += fmt.Sprintf("}\n}")
	return r + l
}

Please find the acceptance test screenshot https://screenshot.googleplex.com/temtbcpEWtEWcit

@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, 105 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 105 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 (4 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: 14
Passed tests: 13
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • filestore

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccFilestoreBackup_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

@aniket-gupta aniket-gupta marked this pull request as ready for review December 16, 2024 05:44
@github-actions github-actions bot requested a review from roaks3 December 16, 2024 05:44
Copy link

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

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

@roaks3
Copy link
Contributor

roaks3 commented Dec 17, 2024

/gcbrun

@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, 105 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 4 files changed, 105 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 (4 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: 14
Passed tests: 13
Skipped tests: 0
Affected tests: 1

Click here to see the affected service packages
  • filestore

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

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

Copy link
Contributor

@roaks3 roaks3 left a comment

Choose a reason for hiding this comment

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

LGTM, I think the prior test run failed because the bootstrapped resources needed to be created

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.

5 participants