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

Infer bigtable zone from provider #4392

Merged
merged 11 commits into from
Jan 14, 2021

Conversation

upodroid
Copy link
Contributor

@upodroid upodroid commented Jan 12, 2021

@melinath

Part of #4377

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.

Release Note Template for Downstream PRs (will be copied)

bigtable: fixed an issue where the `google_bigtable_instance` resource was not inferring the zone from the provider.

@google-cla google-cla bot added the cla: yes label Jan 12, 2021
@modular-magician
Copy link
Collaborator

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

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@ScottSuarez, please review this PR or find an appropriate assignee.

@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, 33 insertions(+), 36 deletions(-))
Terraform Beta: Diff ( 5 files changed, 34 insertions(+), 37 deletions(-))

@melinath melinath requested review from melinath and removed request for ScottSuarez January 12, 2021 21:36
@melinath
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166692"

@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, 33 insertions(+), 36 deletions(-))
Terraform Beta: Diff ( 4 files changed, 33 insertions(+), 36 deletions(-))

@melinath
Copy link
Member

/gcbrun failed; trying again.

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166911"

@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, 33 insertions(+), 36 deletions(-))
Terraform Beta: Diff ( 4 files changed, 33 insertions(+), 36 deletions(-))

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

I have a couple of questions about the implementation here. I was also wondering if you'd be open to adding a test to make sure that this works as expected. (current tests all seem to explicitly set a zone.)

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccDataSourceStorageBucketObjectContent_Basic|TestAccCloudRunServiceIamBindingGenerated|TestAccCloudRunServiceIamMemberGenerated|TestAccCloudRunServiceIamPolicyGenerated|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccApigeeOrganization_apigeeOrganizationCloudFullTestExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccCloudRunService_cloudRunServiceBasicExample|TestAccCloudRunDomainMapping_cloudRunDomainMappingBasicExample|TestAccCloudRunService_cloudRunServiceSqlExample|TestAccCloudRunService_cloudRunServiceNoauthExample|TestAccComputeRegionNetworkEndpointGroup_regionNetworkEndpointGroupCloudrunExample|TestAccContainerCluster_withPrivateClusterConfigMissingCidrBlock You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166925"

@upodroid
Copy link
Contributor Author

upodroid commented Jan 13, 2021

So instead of writing another test, I removed the zone from TestAccBigtableInstance_basic test. There are many other tests with zone hardcoded.

@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, 33 insertions(+), 37 deletions(-))
Terraform Beta: Diff ( 5 files changed, 33 insertions(+), 37 deletions(-))

@melinath
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=166934"

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

It looks like in CI there are two failures related to BigTable:

  • TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample
  • TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample

They're both failing with Error: Computed attribute cannot be set with regard to the zone attribute, which seems a bit odd since there are a number of other tests that hardcode a zone for a google_bigtable_instance.cluster without issue.

@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, 33 insertions(+), 37 deletions(-))
Terraform Beta: Diff ( 6 files changed, 34 insertions(+), 38 deletions(-))

@upodroid
Copy link
Contributor Author

Hmm, I'll take a closer look. Can you look in to why the bigtable client doesn't log the requests when TF_LOG is set to debug?

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccInstanceTemplateDatasource_filter|TestAccInstanceTemplateDatasource_filter_mostRecent|TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccApigeeOrganization_apigeeOrganizationCloudFullTestExample|TestAccApigeeOrganization_apigeeOrganizationCloudBasicTestExample|TestAccBigtableAppProfile_bigtableAppProfileSingleclusterExample|TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample|TestAccCloudRunService_cloudRunServiceMultipleEnvironmentVariablesExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=167025"

@melinath
Copy link
Member

It looks like the other tests (like TestAccBigtableInstance_cluster) are also currently failing with the same error. I didn't notice in CI previously because they're ignored during VCR tests. It looks like the BigTableAppProfile tests are intentionally not ignored because they work slightly differently: #3554 (comment)

I'll check on the TF_LOG question :-)

@upodroid
Copy link
Contributor Author

It is fixed now, both of the tests are passing.

@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, 34 insertions(+), 37 deletions(-))
Terraform Beta: Diff ( 5 files changed, 34 insertions(+), 37 deletions(-))

@melinath
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

I have triggered VCR tests based on this PR's diffs. See the results here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=167120"

@@ -190,7 +190,6 @@ resource "google_bigtable_instance" "instance" {
name = "%s"
cluster {
cluster_id = "%s"
zone = "us-central1-b"
Copy link
Member

Choose a reason for hiding this comment

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

For posterity: this was removed to make sure the case of defaulting to the provider value works. There are other tests that create explicitly in us-central1-b.

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM pending passing tests. Re: TF_LOG issues, could they be related to hashicorp/terraform-plugin-sdk#88 (comment)?

@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, 34 insertions(+), 37 deletions(-))
Terraform Beta: Diff ( 5 files changed, 34 insertions(+), 37 deletions(-))

@melinath
Copy link
Member

melinath commented Jan 14, 2021

I'm definitely seeing output from API requests on other tests locally, so it's not the issue I linked to above. That's odd. Thanks for catching this - I'll make a ticket.

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccActiveDirectoryDomainTrust_activeDirectoryDomainTrustBasicExample|TestAccApigeeOrganization_apigeeOrganizationCloudBasicTestExample|TestAccApigeeOrganization_apigeeOrganizationCloudFullTestExample|TestAccCloudRunService_cloudRunServiceMultipleEnvironmentVariablesExample You can view the result here: "https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=167124"

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

Successfully merging this pull request may close these issues.

3 participants