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

Adding Terraform resources for Tenancy APIs in GKEHub #8396

Merged
merged 26 commits into from
Aug 29, 2023

Conversation

sahsagar-google
Copy link
Member

@sahsagar-google sahsagar-google commented Jul 19, 2023

Fixes 15167

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).
  • 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).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read Write release notes before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

gkehub: added `Namespace`, `Scope`, `MembershipBinding`, `MembershipRBACRoleBinding`, `ScopeRBACRoleBinding` resources

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a community contributor. @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.

@sahsagar-google
Copy link
Member Author

gkehub: added `Namespace`, `Scope`, `MembershipBinding`, `MembershipRBACRoleBinding`, `ScopeRBACRoleBinding` resources

@NickElliot
Copy link
Contributor

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

Terraform GA: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 10 files changed, 778 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_gke_hub_membership_binding (1 total tests)
Untested fields: scope

Please add acceptance tests which include these fields.
Resource: google_gke_hub_membership_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_binding (2 total tests)
Untested fields: condition.description, condition.expression, condition.title

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_member (1 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2879
Passed tests 2570
Skipped tests: 299
Affected tests: 10

Action taken

Found 10 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2Scope_gkehubScopeBasicExample|TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample|TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample|TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules|TestAccGKEHub2ScopeIamMemberGenerated|TestAccGKEHub2ScopeIamBindingGenerated|TestAccGKEHub2ScopeIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccGKEHub2Scope_gkehubScopeBasicExample[Debug log]
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample[Debug log]
TestAccGKEHub2ScopeIamMemberGenerated[Debug log]
TestAccGKEHub2ScopeIamBindingGenerated[Debug log]
TestAccGKEHub2ScopeIamPolicyGenerated[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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.

Hey! I've added one small comment that was causing a lint error, but wanted to ask if you could break this PR up into smaller layered ones for each individual resource (or if there are mutually dependent ones, just those that have to exist together). A five resource review ends up being somewhat unsustainable and likely to result in more review passes than them being separate, resulting it taking longer to reach the provider.

mmv1/products/gkehub2/Scope.yaml Outdated Show resolved Hide resolved
@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.

Terraform GA: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 10 files changed, 778 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_gke_hub_membership_binding (1 total tests)
Untested fields: scope

Please add acceptance tests which include these fields.
Resource: google_gke_hub_membership_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_binding (2 total tests)
Untested fields: condition.description, condition.expression, condition.title

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_member (1 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2881
Passed tests 2577
Skipped tests: 299
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample|TestAccComputeFirewallPolicyRule_multipleRules|TestAccContainerAwsNodePool_BetaBasicHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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

Terraform GA: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 10 files changed, 778 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_gke_hub_membership_binding (1 total tests)
Untested fields: scope

Please add acceptance tests which include these fields.
Resource: google_gke_hub_membership_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_binding (2 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_member (1 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.

1 similar comment
@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.

Terraform GA: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 4510 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 10 files changed, 778 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_gke_hub_membership_binding (1 total tests)
Untested fields: scope

Please add acceptance tests which include these fields.
Resource: google_gke_hub_membership_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_binding (2 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_member (1 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.

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.

In case you missed the previous comment: #8396 (review)

Thanks!

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2882
Passed tests 2578
Skipped tests: 299
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample|TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccComputeFirewallPolicyRule_multipleRules[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2882
Passed tests 2576
Skipped tests: 299
Affected tests: 7

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample|TestAccSpannerDatabaseIamPolicy|TestAccContainerAwsNodePool_BetaBasicHandWritten|TestAccComputeFirewallPolicyRule_multipleRules|TestAccBigQueryDataTable_bigtable

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccSpannerDatabaseIamPolicy[Debug log]
TestAccComputeFirewallPolicyRule_multipleRules[Debug log]
TestAccBigQueryDataTable_bigtable[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipRBACRoleBinding_gkehubMembershipRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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

Terraform GA: Diff ( 14 files changed, 2861 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 14 files changed, 2861 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 8 files changed, 593 insertions(+), 3 deletions(-))

Missing test report

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

Resource: google_gke_hub_scope_iam_binding (2 total tests)
Untested fields: condition.title, condition.description, condition.expression

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_iam_member (1 total tests)
Untested fields: condition.expression, condition.title, condition.description

Please add acceptance tests which include these fields.
Resource: google_gke_hub_scope_rbac_role_binding (1 total tests)
Untested fields: group

Please add acceptance tests which include these fields.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2876
Passed tests 2574
Skipped tests: 299
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccContainerAwsNodePool_BetaBasicHandWritten

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccContainerAwsNodePool_BetaBasicHandWritten[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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.

Starting from the top, the namespace test appears to be failing with a 404 which at a glance appears to be due to the URL not being accurate based on what I'm seeing on the documentation. Is there a page I'm not seeing? Or if what I linked in the comment is correct, could you try updating that and running the test locally to see if it passes? Thanks!

mmv1/products/gkehub2/Namespace.yaml Show resolved Hide resolved
mmv1/products/gkehub2/Namespace.yaml Outdated Show resolved Hide resolved
@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccBigtableAppProfile_bigtableAppProfileMulticlusterExample[Error message] [Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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

Terraform GA: Diff ( 18 files changed, 3624 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 18 files changed, 3624 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 7 files changed, 662 insertions(+))

Missing test report

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

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

resource "google_gke_hub_scope_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_rbac_role_binding" "primary" {
  group = # value needed
}

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

Terraform GA: Diff ( 20 files changed, 3809 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 3809 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 7 files changed, 662 insertions(+))

Missing test report

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

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

resource "google_gke_hub_scope_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2999
Passed tests 2700
Skipped tests: 296
Affected tests: 3

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample_update|TestAccGKEHub2Scope_gkehubScopeBasicExample_update|TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample_update[Debug log]
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample_update[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2Scope_gkehubScopeBasicExample_update[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@sahsagar-google
Copy link
Member Author

Tests passed during RECORDING mode: TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample_update[Debug log] TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample_update[Debug log]

Rerun these tests in REPLAYING mode to catch issues

No issues found for passed tests after REPLAYING rerun.

Tests failed during RECORDING mode: TestAccGKEHub2Scope_gkehubScopeBasicExample_update[Error message] [Debug log]

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

@NickElliot Could you pinpoint the exact error of the Scope update test(TestAccGKEHub2Scope_gkehubScopeBasicExample_update) to me please?
I looked through the Debug log, but not able to figure out why it failed.

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.

Sorry for the delay, review was sitting in progress before lunch.

TestAccGKEHub2Scope_gkehubScopeBasicExample_update is having a permadiff failure due to all_memberships not maintaining the true value when it attempts to refresh the plan (with the API saying it currently is false), despite returning a success on the PATCH with the true value. It would appear to be a case of go/dont-break-terraform#new-values-returned-for-old-fields, but if the field is actually immutable or output only then the YAML needs to be changed to match. As you're more familiar with it being on the service team in question, the intended API behavior needs to be clarified.

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

Terraform GA: Diff ( 20 files changed, 3809 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 20 files changed, 3809 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 7 files changed, 662 insertions(+))

Missing test report

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

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

resource "google_gke_hub_scope_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@sahsagar-google
Copy link
Member Author

Sorry for the delay, review was sitting in progress before lunch.

TestAccGKEHub2Scope_gkehubScopeBasicExample_update is having a permadiff failure due to all_memberships not maintaining the true value when it attempts to refresh the plan (with the API saying it currently is false), despite returning a success on the PATCH with the true value. It would appear to be a case of go/dont-break-terraform#new-values-returned-for-old-fields, but if the field is actually immutable or output only then the YAML needs to be changed to match. As you're more familiar with it being on the service team in question, the intended API behavior needs to be clarified.

Thank you for sharing that error. I talked to the team and we feel it should be removed at this point. Sorry for the confusion.

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

Terraform GA: Diff ( 19 files changed, 3634 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 19 files changed, 3634 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 7 files changed, 650 insertions(+))

Missing test report

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

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

resource "google_gke_hub_scope_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3004
Passed tests 2701
Skipped tests: 296
Affected tests: 7

Action taken

Found 7 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample|TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample_update|TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample|TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample|TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample_update|TestAccDataSourceGoogleServiceAccountJwt|TestAccDataSourceGoogleServiceAccountAccessToken_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccDataSourceGoogleServiceAccountJwt[Debug log]
TestAccDataSourceGoogleServiceAccountAccessToken_basic[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccGKEHub2Namespace_gkehubNamespaceBasicExample[Error message] [Debug log]
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample_update[Error message] [Debug log]
TestAccGKEHub2ScopeRBACRoleBinding_gkehubScopeRbacRoleBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample[Error message] [Debug log]
TestAccGKEHub2MembershipBinding_gkehubMembershipBindingBasicExample_update[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

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

Terraform GA: Diff ( 19 files changed, 3624 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 19 files changed, 3624 insertions(+), 3 deletions(-))
TF Conversion: Diff ( 7 files changed, 650 insertions(+))

Missing test report

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

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

resource "google_gke_hub_scope_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

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

resource "google_gke_hub_scope_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 3006
Passed tests 2708
Skipped tests: 296
Affected tests: 2

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccAppEngineStandardAppVersion_update|TestAccVPCAccessConnectorDatasource_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccAppEngineStandardAppVersion_update[Debug log]
TestAccVPCAccessConnectorDatasource_basic[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

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.

LGTM!

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