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 support for domainNames to Service Attachment #6003

Merged
merged 4 commits into from
May 16, 2022

Conversation

falfaro
Copy link
Contributor

@falfaro falfaro commented May 3, 2022

Fixes hashicorp/terraform-provider-google#11612

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.
compute: added support for `domain_names` attribute in `google_compute_service_attachment`

For the record, I did run make lint which failed with many errors which I believe to be unrelated to mu change.

@google-cla
Copy link

google-cla bot commented May 3, 2022

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).

For more information, open the CLA check for this pull request.

@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I've detected that you're a community contributor. @shuyama1, a repository maintainer, has been assigned to assist you and help review your changes.

❓ First time contributing? Click here for more details

Your assigned reviewer will help review your code by:

  • Ensuring it's backwards compatible, covers common error cases, etc.
  • Summarizing the change into a user-facing changelog note.
  • Passes tests, either our "VCR" suite, a set of presubmit tests, or with manual test runs.

You can help make sure that review is quick by running local tests and ensuring they're passing in between each push you make to your PR's branch. Also, try to leave a comment with each push you make, as pushes generally don't generate emails.

If your reviewer doesn't get back to you within a week after your most recent change, please feel free to leave a comment on the issue asking them to take a look! In the absence of a dedicated review dashboard most maintainers manage their pending reviews through email, and those will sometimes get lost in their inbox.


@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 3 files changed, 38 insertions(+))
Terraform Beta: Diff ( 3 files changed, 38 insertions(+))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1997
Passed tests 1755
Skipped tests: 241
Failed tests: 1

Action taken

Triggering VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeServiceAttachment_serviceAttachmentBasicExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate[view]

Tests failed during RECORDING mode:
TestAccComputeServiceAttachment_serviceAttachmentBasicExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

Fix DNS domain name.

Co-authored-by: Shuya Ma <87669292+shuyama1@users.noreply.github.com>
@falfaro
Copy link
Contributor Author

falfaro commented May 10, 2022

@shuyama1 PTAL

@falfaro falfaro requested a review from shuyama1 May 10, 2022 08:59
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 5 files changed, 44 insertions(+), 6 deletions(-))
Terraform Beta: Diff ( 7 files changed, 58 insertions(+), 20 deletions(-))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2013
Passed tests 1769
Skipped tests: 242
Failed tests: 2

Action taken

Triggering VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate[view]

Tests failed during RECORDING mode:
TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample[view]
TestAccComputeServiceAttachment_serviceAttachmentBasicExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@falfaro
Copy link
Contributor Author

falfaro commented May 10, 2022

Any chance I could get permissions to look at the build and debug logs to troubleshoot why two tests failed?

@falfaro
Copy link
Contributor Author

falfaro commented May 10, 2022

For the record, the TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample test is unrelated to my change.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 5 files changed, 44 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 5 files changed, 50 insertions(+), 10 deletions(-))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 2 files changed, 2 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2013
Passed tests 1767
Skipped tests: 242
Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccFirebaserulesRelease_BasicRelease|TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate[view]
TestAccFirebaserulesRelease_BasicRelease[view]

Tests failed during RECORDING mode:
TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample[view]
TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample[view]
TestAccComputeServiceAttachment_serviceAttachmentBasicExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@shuyama1
Copy link
Member

=== CONT  TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample
    provider_test.go:309: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error creating ServiceAttachment: googleapi: Error 400: Invalid value for field 'resource.domainNames': ''. Please verify ownership of the PTR domain at https://www.google.com/webmasters/verification/verification?domain=hashicorptest.com., invalid
        
          on terraform_plugin_test.tf line 2, in resource "google_compute_service_attachment" "psc_ilb_service_attachment":
           2: resource "google_compute_service_attachment" "psc_ilb_service_attachment" {
        
        
--- FAIL: TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample (97.94s)
=== CONT  TestAccComputeServiceAttachment_serviceAttachmentBasicExample
    provider_test.go:309: Step 1/2 error: Error running apply: exit status 1
        
        Error: Error creating ServiceAttachment: googleapi: Error 400: Invalid value for field 'resource.domainNames': ''. Please verify ownership of the PTR domain at https://www.google.com/webmasters/verification/verification?domain=hashicorptest.com., invalid
        
          on terraform_plugin_test.tf line 2, in resource "google_compute_service_attachment" "psc_ilb_service_attachment":
           2: resource "google_compute_service_attachment" "psc_ilb_service_attachment" {
        
        
--- FAIL: TestAccComputeServiceAttachment_serviceAttachmentBasicExample (98.02s)

@falfaro Sorry that I can't grant your access to the logs. I just copied the errors above. Looks like the error is still related to the ownership of the domains. Let me look into it. Sorry about it!

@falfaro
Copy link
Contributor Author

falfaro commented May 13, 2022

For the record,

$ nslookup -query=ptr hashicorptest.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
*** Can't find hashicorptest.com: No answer

Authoritative answers can be found from:
hashicorptest.com
	origin = kara.ns.cloudflare.com
	mail addr = dns.cloudflare.com
	serial = 2275801625
	refresh = 10000
	retry = 2400
	expire = 604800
	minimum = 3600

@falfaro
Copy link
Contributor Author

falfaro commented May 13, 2022

And for the record, I've changed the DNS domain to be gcp.tfacc.hashicorptest.com, which seems to be a Cloud DNS domain:

$ nslookup -query=ptr gcp.tfacc.hashicorptest.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
*** Can't find gcp.tfacc.hashicorptest.com: No answer

Authoritative answers can be found from:
gcp.tfacc.hashicorptest.com
	origin = ns-cloud-e1.googledomains.com
	mail addr = cloud-dns-hostmaster.google.com
	serial = 1
	refresh = 21600
	retry = 3600
	expire = 259200
	minimum = 300

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 4 files changed, 44 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 4 files changed, 44 insertions(+), 4 deletions(-))
TF Validator: Diff ( 3 files changed, 13 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 2 files changed, 2 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2018
Passed tests 1773
Skipped tests: 242
Failed tests: 3

Action taken

Triggering VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample|TestAccComputeServiceAttachment_serviceAttachmentBasicExample|TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccComputeServiceAttachment_serviceAttachmentBasicExampleUpdate[view]
TestAccComputeServiceAttachment_serviceAttachmentExplicitProjectsExample[view]
TestAccComputeServiceAttachment_serviceAttachmentBasicExample[view]

Tests failed during RECORDING mode:
TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample[view]

Please fix these to complete your PR
View the build log or the debug log for each test

@falfaro
Copy link
Contributor Author

falfaro commented May 13, 2022

@shuyama1 I tried to change the DNS domain to gcp.tfacc.hashicorptest.com that I found in other tests, to no avail. VCR tests keep failing :-(

@shuyama1
Copy link
Member

@falfaro Thanks for investigating the failing tests and making the changes! Looks like gcp.tfacc.hashicorptest.com. is the one we used in other test. I must have found hashicorptest.com. in an outdated PR and really sorry about it! It seems the tests passed in the most recent run and the failing test TestAccCloudAssetFolderFeed_cloudAssetFolderFeedExample seems unrelated to your change.

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

Tests passed! LGTM! Thank you so much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_compute_service_attachment does not support DNS configuration
3 participants