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

Update CustomTargetType resource to include googleCloudBuildRepo type #10543

Merged
merged 7 commits into from
May 7, 2024

Conversation

katiexzhang
Copy link
Contributor

…sitories

Fixes hashicorp/terraform-provider-google#17935

Release Note Template for Downstream PRs (will be copied)

clouddeploy: added `google_cloud_build_repo` to `custom_target_type` resource

@github-actions github-actions bot requested a review from BBBmau April 26, 2024 20:42
Copy link

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

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

@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, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

Missing test report

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

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

resource "google_clouddeploy_custom_target_type" "primary" {
  custom_actions {
    include_skaffold_modules {
      google_cloud_build_repo {
        path       = # value needed
        ref        = # value needed
        repository = # value needed
      }
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 24
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample[Error message] [Debug log]
TestAccClouddeployCustomTargetType_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.

google provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 24
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample[Error message] [Debug log]
TestAccClouddeployCustomTargetType_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.

google provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 24
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccClouddeployCustomTargetType_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.

google provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 25
Skipped tests: 2
Affected tests: 1

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\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

@katiexzhang
Copy link
Contributor Author

Hi @BBBmau, could you PTAL at this?

include_skaffold_modules {
configs = ["my-config"]
google_cloud_build_repo {
repository = "projects/777/locations/us-central1/connections/git/repositories/example"
Copy link
Collaborator

Choose a reason for hiding this comment

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

only request I have is to update the value so that it doesn't look like placeholder value. This is only for examples since this will be shown in docs.

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.

@github-actions github-actions bot requested a review from BBBmau April 30, 2024 21:16
@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, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

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.

google provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
google-beta provider: Diff ( 4 files changed, 212 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 52 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 118 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 24
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

1 similar comment
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 28
Passed tests: 24
Skipped tests: 2
Affected tests: 2

Click here to see the affected service packages
  • clouddeploy

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
TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

$\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

@modular-magician
Copy link
Collaborator

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

$\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

@katiexzhang
Copy link
Contributor Author

Bumping this! @BBBmau

include_skaffold_modules {
configs = ["my-config3"]
google_cloud_build_repo {
repository = "projects/example/locations/us-central1/connections/git/repositories/example-repo"
Copy link
Collaborator

Choose a reason for hiding this comment

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

After thinking about it more, although it works as is. In the past, the service team has gotten around to validating input values.

So as it stands this would cause 100% failures in the event that they add a validation which is likely to happen.

Because of this we'll want to have an actual valid repository to prevent this from happening in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What kind of validation does the service team do?

The referenced resource (the GCB repo) only needs to exist when a Release for a Target that references a CustomTargetType is used.

If the validations do not involve creating an actual Release with Cloud Deploy, then this should not be a blocker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Circling back on this @BBBmau

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