-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 Cloud Deploy CustomTargetType resource to include Cloud Build V2 repo support for Skaffold configs #10513
Conversation
…ud build repo option
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @shuyama1, 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. |
@katiexzhang Thank for making the change! You can follow the steps at go/terraform-contribution-guide#before-you-begin to get tests automatically triggered for your PRs. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_update |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failed due to a permadiff (more details on permadiff at https://googlecloudplatform.github.io/magic-modules/develop/permadiff):
vcr_utils.go:152: Step 3/4 error: After applying this test step, the plan was not empty.
stdout:
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# google_clouddeploy_custom_target_type.custom-target-type will be updated in-place
~ resource "google_clouddeploy_custom_target_type" "custom-target-type" {
id = "projects/ci-test-project-188019/locations/us-central1/customTargetTypes/tf-test-my-custom-target-typeqihvoxv3n8"
name = "tf-test-my-custom-target-typeqihvoxv3n8"
# (13 unchanged attributes hidden)
~ custom_actions {
# (2 unchanged attributes hidden)
~ include_skaffold_modules {
# (1 unchanged attribute hidden)
+ google_cloud_build_repo {
+ path = "configs/skaffold.yaml"
+ ref = "main"
+ repository = "projects/777/locations/us-central1/connections/git/repositories/repo"
}
}
# (2 unchanged blocks hidden)
}
}
Plan: 0 to add, 1 to change, 0 to destroy.
It doesn't look like the API returns these fields(?)
@@ -0,0 +1,17 @@ | |||
resource "google_clouddeploy_custom_target_type" "<%= ctx[:primary_resource_id] %>" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to register this example in the CustomTargetType.yaml
file. More details at https://googlecloudplatform.github.io/magic-modules/develop/test/test/#add-a-create-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was probably not clear previously. You'll need to add something like https://github.com/katiexzhang/magic-modules/blob/main/mmv1/products/clouddeploy/CustomTargetType.yaml#L57-L62 in the CustomTargetType.yaml
file so that this example will be generated in both tests and web docs.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_update |
|
When I click on the details of the VCR-test, it takes me to a build that was successful. |
the GCB status only show the tests are triggered successfully. We use comment to post test result, like #10513 (comment). You can click on [Error message] for view test errors and [Debug log] for debug logs which contain request/response pairs |
Thanks for the pointers, updated the test file. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_clouddeploy_custom_target_type" "primary" {
custom_actions {
include_skaffold_modules {
google_cloud_build_repo_v2 {
connection = # value needed
path = # value needed
project_id = # value needed
ref = # value needed
region = # value needed
repo = # value needed
}
}
}
}
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_update |
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_update |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_update |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can follow https://googlecloudplatform.github.io/magic-modules/get-started/generate-providers/ to generate providers and https://googlecloudplatform.github.io/magic-modules/develop/test/run-tests/#run-tests to run tests locally which may help you view the test result faster.
Please let me know if you have any questions.
@@ -0,0 +1,17 @@ | |||
resource "google_clouddeploy_custom_target_type" "<%= ctx[:primary_resource_id] %>" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I was probably not clear previously. You'll need to add something like https://github.com/katiexzhang/magic-modules/blob/main/mmv1/products/clouddeploy/CustomTargetType.yaml#L57-L62 in the CustomTargetType.yaml
file so that this example will be generated in both tests and web docs.
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetTypeIamBindingGenerated|TestAccClouddeployCustomTargetTypeIamMemberGenerated|TestAccClouddeployCustomTargetTypeIamPolicyGenerated|TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeBasicExample|TestAccClouddeployCustomTargetType_update |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetTypeIamBindingGenerated|TestAccClouddeployCustomTargetTypeIamMemberGenerated|TestAccClouddeployCustomTargetTypeIamPolicyGenerated|TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeBasicExample|TestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccClouddeployCustomTargetType_clouddeployCustomTargetTypeGcbRepoSkaffoldModulesExample|TestAccClouddeployCustomTargetType_update |
|
Ahh thanks, I missed that block in the CustomTargetType.yaml file. I'm running the tests locally but am running into an undefined email error (https://paste.googleplex.com/5201371749416960#l=31). I manually added all these files following a previous example (https://github.com/GoogleCloudPlatform/magic-modules/pull/9950/files), although reading the docs it seems like some of them should be generated? I'm not sure if this error is a result of me manually editing the files, or a deeper error of some sort. |
Fixes hashicorp/terraform-provider-google#17935
Release Note Template for Downstream PRs (will be copied)