Skip to content

Conversation

@mariomachado94
Copy link
Contributor

@mariomachado94 mariomachado94 commented Nov 3, 2022

Depends on PR#6756

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)

`google_cloudbuildv2_connection_iam_policy` (beta)
`google_cloudbuildv2_connection_iam_binding` (beta)
`google_cloudbuildv2_connection_iam_member` (beta)

@@ -0,0 +1,10 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

Why are these examples necessary for the IAM resources?

Isn't this feature for the private provider? I see it's being added to magic-modules beta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those commits are actually from #6756. The connection IAM specific changes are in the single most recent commit

@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 ( 4 files changed, 667 insertions(+))
Terraform Beta: Diff ( 18 files changed, 3110 insertions(+), 7 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2416
Passed tests 2154
Skipped tests: 251
Failed tests: 11

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccCloudbuildv2Connection_GithubConnection|TestAccCloudbuildv2Connection_GhePrivUpdateConnection|TestAccCloudbuildv2Connection_GhePrivConnection|TestAccCloudbuildv2Connection_GheConnection|TestAccCloudbuildv2Connection_GheCompleteConnection|TestAccCloudbuildv2Repository_GithubRepository|TestAccCloudbuildv2Repository_GheRepository|TestAccCloudBuildv2ConnectionIamPolicyGenerated|TestAccCloudBuildv2ConnectionIamMemberGenerated|TestAccCloudBuildv2ConnectionIamBindingGenerated|TestAccContainerCluster_withInvalidGatewayApiConfigChannel

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_withInvalidGatewayApiConfigChannel[Debug log]

Tests failed during RECORDING mode:
TestAccCloudbuildv2Connection_GithubConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GhePrivUpdateConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GhePrivConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GheConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GheCompleteConnection[Error message] [Debug log]
TestAccCloudbuildv2Repository_GithubRepository[Error message] [Debug log]
TestAccCloudbuildv2Repository_GheRepository[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamPolicyGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamMemberGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamBindingGenerated[Error message] [Debug log]

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 ( 4 files changed, 667 insertions(+))
Terraform Beta: Diff ( 18 files changed, 3110 insertions(+), 7 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2439
Passed tests 2174
Skipped tests: 254
Failed tests: 11

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccCloudBuildv2ConnectionIamPolicyGenerated|TestAccCloudBuildv2ConnectionIamMemberGenerated|TestAccCloudBuildv2ConnectionIamBindingGenerated|TestAccRegionInstanceGroupManager_stateful|TestAccCloudbuildv2Connection_GhePrivConnection|TestAccCloudbuildv2Connection_GheConnection|TestAccCloudbuildv2Connection_GheCompleteConnection|TestAccCloudbuildv2Repository_GithubRepository|TestAccCloudbuildv2Repository_GheRepository|TestAccCloudbuildv2Connection_GithubConnection|TestAccCloudbuildv2Connection_GhePrivUpdateConnection

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode:
TestAccCloudBuildv2ConnectionIamPolicyGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamMemberGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamBindingGenerated[Error message] [Debug log]
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]
TestAccCloudbuildv2Connection_GhePrivConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GheConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GheCompleteConnection[Error message] [Debug log]
TestAccCloudbuildv2Repository_GithubRepository[Error message] [Debug log]
TestAccCloudbuildv2Repository_GheRepository[Error message] [Debug log]
TestAccCloudbuildv2Connection_GithubConnection[Error message] [Debug log]
TestAccCloudbuildv2Connection_GhePrivUpdateConnection[Error message] [Debug log]

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

@rileykarson
Copy link
Member

Note: We'll need to rebase on top of #7157 for this change!

@mariomachado94
Copy link
Contributor Author

Rebased on top of main (includes #7157)

@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 ( 1 file changed, 154 insertions(+))
Terraform Beta: Diff ( 6 files changed, 642 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2442
Passed tests 2183
Skipped tests: 254
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccContainerCluster_failedCreation|TestAccCloudBuildv2ConnectionIamBindingGenerated|TestAccCloudBuildv2ConnectionIamPolicyGenerated|TestAccCloudBuildv2ConnectionIamMemberGenerated

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccContainerCluster_failedCreation[Debug log]

Tests failed during RECORDING mode:
TestAccCloudBuildv2ConnectionIamBindingGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamPolicyGenerated[Error message] [Debug log]
TestAccCloudBuildv2ConnectionIamMemberGenerated[Error message] [Debug log]

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

@@ -0,0 +1,16 @@
provider "google-beta" {}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
provider "google-beta" {}

Copy link
Member

Choose a reason for hiding this comment

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

I beleive this is added by the test framework implicitly, so we can exclude it! It's likely the source of the error right now:

        Error: Duplicate provider configuration
        
          on terraform_plugin_test.tf line 3:
           3: provider "google-beta" {}
        
        A default (non-aliased) provider configuration for "google-beta" was already
        given at terraform_plugin_test.tf:1,1-23. If multiple configurations are
        required, set the "alias" argument for alternative configurations.
    testing_new.go:73: Error retrieving state, there may be dangling resources: exit status 1
        
        Error: Duplicate provider configuration
        
          on terraform_plugin_test.tf line 3:
           3: provider "google-beta" {}
        
        A default (non-aliased) provider configuration for "google-beta" was already
        given at terraform_plugin_test.tf:1,1-23. If multiple configurations are
        required, set the "alias" argument for alternative configurations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,16 @@
provider "google-beta" {}

resource "google_project" "project" {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to use a new project here, or can we manage these resources in an existing one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed project.

@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 ( 1 file changed, 154 insertions(+))
Terraform Beta: Diff ( 6 files changed, 627 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2445
Passed tests 2186
Skipped tests: 254
Failed tests: 5

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccRegionInstanceGroupManager_stateful|TestAccContainerCluster_failedCreation|TestAccCloudBuildv2ConnectionIamPolicyGenerated|TestAccCloudBuildv2ConnectionIamMemberGenerated|TestAccCloudBuildv2ConnectionIamBindingGenerated

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Debug log]
TestAccContainerCluster_failedCreation[Debug log]
TestAccCloudBuildv2ConnectionIamBindingGenerated[Debug log]

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

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 ( 1 file changed, 154 insertions(+))
Terraform Beta: Diff ( 6 files changed, 627 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2448
Passed tests 2188
Skipped tests: 254
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccRegionInstanceGroupManager_stateful|TestAccContainerCluster_failedCreation|TestAccFirebaserulesRelease_BasicRelease|TestAccCloudBuildv2ConnectionIamPolicyGenerated|TestAccCloudBuildv2ConnectionIamMemberGenerated|TestAccCloudBuildv2ConnectionIamBindingGenerated

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccContainerCluster_failedCreation[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccCloudBuildv2ConnectionIamPolicyGenerated[Debug log]
TestAccCloudBuildv2ConnectionIamMemberGenerated[Debug log]
TestAccCloudBuildv2ConnectionIamBindingGenerated[Debug log]

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

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

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

Generally LGTM. Noticed a minor inconsistency in some of the generated custom URL stuff- suggestions inline. Sorry for the extra round trip!

mariomachado94 and others added 2 commits February 1, 2023 13:09
@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 ( 1 file changed, 154 insertions(+))
Terraform Beta: Diff ( 6 files changed, 627 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2448
Passed tests 2188
Skipped tests: 254
Failed tests: 6

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccFirebaserulesRelease_BasicRelease|TestAccRegionInstanceGroupManager_stateful|TestAccContainerCluster_failedCreation|TestAccCloudbuildv2ConnectionIamBindingGenerated|TestAccCloudbuildv2ConnectionIamMemberGenerated|TestAccCloudbuildv2ConnectionIamPolicyGenerated

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccContainerCluster_failedCreation[Debug log]

Tests failed during RECORDING mode:
TestAccRegionInstanceGroupManager_stateful[Error message] [Debug log]
TestAccCloudbuildv2ConnectionIamBindingGenerated[Error message] [Debug log]
TestAccCloudbuildv2ConnectionIamMemberGenerated[Error message] [Debug log]
TestAccCloudbuildv2ConnectionIamPolicyGenerated[Error message] [Debug log]

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

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

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

Those tests are newly failing for the right reason here! Both MMv1 and tpgtools (DCL) support custom basepaths, but they're not both compatible with each other- MMv1 configures a default URL in Terraform and uses that, assuming a URL is always present, while DCL stores the default internally and defaults to empty in Terraform. When they conflict, tpgtools wins, causing an empty URL.

tpgtools is compatible with MMv1's generated code- we end up overriding DCL's internal default with Terraform's (identical) default. We can turn off DCL generation. You should just need to add an override like

- type: PRODUCT_BASE_PATH
details:
skip: true
to https://github.com/GoogleCloudPlatform/magic-modules/blob/main/tpgtools/overrides/cloudbuildv2/beta/tpgtools_product.yaml.

@rileykarson
Copy link
Member

(normally we'd have a compilation error instead of the one we got, but actually hooking up the Terraform part for new DCL services is manual and we missed doing that for this Cloud Build v2)

@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 ( 1 file changed, 154 insertions(+))
Terraform Beta: Diff ( 7 files changed, 627 insertions(+), 14 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2448
Passed tests 2189
Skipped tests: 255
Failed tests: 4

Action taken

Triggering VCR tests in RECORDING mode for the tests that failed during VCR. Click here to see the failed tests
TestAccRegionInstanceGroupManager_stateful|TestAccCloudbuildv2ConnectionIamPolicyGenerated|TestAccCloudbuildv2ConnectionIamMemberGenerated|TestAccCloudbuildv2ConnectionIamBindingGenerated

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccCloudbuildv2ConnectionIamPolicyGenerated[Debug log]
TestAccCloudbuildv2ConnectionIamMemberGenerated[Debug log]
TestAccCloudbuildv2ConnectionIamBindingGenerated[Debug log]

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

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

@rileykarson rileykarson merged commit a6654f2 into GoogleCloudPlatform:main Feb 2, 2023
kubalaguna pushed a commit to kubalaguna/magic-modules that referenced this pull request Feb 27, 2023
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
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.

4 participants