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

Add executing job support for google_cloud_run_v2_job resource #10734

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yanweiguo
Copy link
Member

@yanweiguo yanweiguo commented May 17, 2024

For hashicorp/terraform-provider-google#13390.

Adding field start_execution_token and field run_execution_token to resource google_cloud_run_v2_job to allow executing the job automatically once the job is created or updated. This is currently add to terraform-provider-google-beta provider only.

Also changed the docker images used in job examples to the right one.

Release Note Template for Downstream PRs (will be copied)

cloudrunv2: added field `start_execution_token` and field `run_execution_token` to resource `google_cloud_run_v2_job` to allow executing the job automatically once the job is created or updated.

@github-actions github-actions bot requested a review from NickElliot May 17, 2024 18:43
Copy link

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

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

@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 ( 2 files changed, 71 insertions(+))
google-beta provider: Diff ( 4 files changed, 158 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 114 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 42
Passed tests: 40
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • cloudrunv2

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
TestAccCloudRunV2Job_cloudrunv2JobRunJobExample|TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

mmv1/products/cloudrunv2/Job.yaml Outdated Show resolved Hide resolved
Copy link

This PR has been waiting for review for 2 days. Please take a look! Use the label disable-review-reminders to disable these notifications.

@yanweiguo yanweiguo marked this pull request as draft May 21, 2024 20:42
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.

Two issues from the test:

  • the supplied launch_stage is being ignored, and returned as "GA" even though the POST request had "BETA"
  • start_execution_token is not being returned by the API, I'm not certain if this is expected, but the field may need an ignore_read: true tag on it

@yanweiguo yanweiguo marked this pull request as ready for review May 30, 2024 21:55
@github-actions github-actions bot requested a review from NickElliot May 30, 2024 21:55
@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 ( 2 files changed, 79 insertions(+))
google-beta provider: Diff ( 4 files changed, 260 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 30 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

Errors

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • cloudrunv2

Non-exercised tests

Tests were added that are skipped in VCR:

  • TestAccCloudRunV2Job_cloudrunv2JobRunJobExample
  • TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$
View the build log

@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 ( 2 files changed, 74 insertions(+))
google-beta provider: Diff ( 4 files changed, 226 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 20 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 42
Passed tests: 24
Skipped tests: 0
Affected tests: 18

Click here to see the affected service packages
  • cloudrunv2

Action taken

Found 18 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudRunV2JobIamBindingGenerated|TestAccCloudRunV2JobIamMemberGenerated|TestAccCloudRunV2JobIamPolicyGenerated|TestAccCloudRunV2Job_cloudrunv2JobBasicExample|TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample|TestAccCloudRunV2Job_cloudrunv2JobEmptydirExample|TestAccCloudRunV2Job_cloudrunv2JobFullUpdate|TestAccCloudRunV2Job_cloudrunv2JobLimitsExample|TestAccCloudRunV2Job_cloudrunv2JobRunJobExample|TestAccCloudRunV2Job_cloudrunv2JobSecretExample|TestAccCloudRunV2Job_cloudrunv2JobSqlExample|TestAccCloudRunV2Job_cloudrunv2JobVpcaccessExample|TestAccCloudRunV2Job_cloudrunv2JobWithDirectVPCUpdate|TestAccCloudRunV2Job_cloudrunv2JobWithGcsUpdate|TestAccCloudRunV2Job_cloudrunv2JobWithNfsUpdate|TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate|TestAccDataSourceGoogleCloudRunV2Job_basic|TestAccDataSourceGoogleCloudRunV2Job_bindIAMPermission

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudRunV2JobIamBindingGenerated[Error message] [Debug log]
TestAccCloudRunV2JobIamMemberGenerated[Error message] [Debug log]
TestAccCloudRunV2JobIamPolicyGenerated[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobBasicExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobDirectvpcExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobEmptydirExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobFullUpdate[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobLimitsExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobRunJobExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobSecretExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobSqlExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobVpcaccessExample[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithDirectVPCUpdate[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithGcsUpdate[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithNfsUpdate[Error message] [Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate[Error message] [Debug log]
TestAccDataSourceGoogleCloudRunV2Job_basic[Error message] [Debug log]
TestAccDataSourceGoogleCloudRunV2Job_bindIAMPermission[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 ( 2 files changed, 74 insertions(+))
google-beta provider: Diff ( 4 files changed, 226 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 20 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 42
Passed tests: 40
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • cloudrunv2

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
TestAccCloudRunV2Job_cloudrunv2JobRunJobExample|TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

github-actions bot commented Jun 3, 2024

This PR has been waiting for review for 2 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

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.

need to have camelcase for fieldnames in the yaml :)

mmv1/products/cloudrunv2/Job.yaml Outdated Show resolved Hide resolved
mmv1/products/cloudrunv2/Job.yaml Outdated Show resolved Hide resolved
@github-actions github-actions bot requested a review from NickElliot June 4, 2024 23:50
@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 ( 2 files changed, 74 insertions(+))
google-beta provider: Diff ( 4 files changed, 226 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 20 insertions(+))
Open in Cloud Shell: Diff ( 4 files changed, 113 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 42
Passed tests: 40
Skipped tests: 0
Affected tests: 2

Click here to see the affected service packages
  • cloudrunv2

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
TestAccCloudRunV2Job_cloudrunv2JobRunJobExample|TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

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

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


$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccCloudRunV2Job_cloudrunv2JobWithRunJobTokenUpdate[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 ( 3 files changed, 90 insertions(+), 16 deletions(-))
google-beta provider: Diff ( 5 files changed, 265 insertions(+), 17 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 20 insertions(+))
Open in Cloud Shell: Diff ( 9 files changed, 118 insertions(+), 5 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 43
Passed tests: 31
Skipped tests: 0
Affected tests: 12

Click here to see the affected service packages
  • cloudrunv2

Action taken

Found 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccCloudRunV2JobIamBindingGenerated|TestAccCloudRunV2JobIamMemberGenerated|TestAccCloudRunV2JobIamPolicyGenerated|TestAccCloudRunV2Job_cloudrunv2JobBasicExample|TestAccCloudRunV2Job_cloudrunv2JobEmptydirExample|TestAccCloudRunV2Job_cloudrunv2JobLimitsExample|TestAccCloudRunV2Job_cloudrunv2JobRunJobExample|TestAccCloudRunV2Job_cloudrunv2JobSecretExample|TestAccCloudRunV2Job_cloudrunv2JobSqlExample|TestAccCloudRunV2Job_cloudrunv2JobVpcaccessExample|TestAccCloudRunV2Job_cloudrunv2JobWithRunExecutionTokenUpdate|TestAccCloudRunV2Job_cloudrunv2JobWithStartExecutionTokenUpdate

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccCloudRunV2JobIamBindingGenerated[Debug log]
TestAccCloudRunV2JobIamMemberGenerated[Debug log]
TestAccCloudRunV2JobIamPolicyGenerated[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobBasicExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobEmptydirExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobLimitsExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobRunJobExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobSecretExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobSqlExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobVpcaccessExample[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithRunExecutionTokenUpdate[Debug log]
TestAccCloudRunV2Job_cloudrunv2JobWithStartExecutionTokenUpdate[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

Copy link

github-actions bot commented Jun 6, 2024

This PR has been waiting for review for 2 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

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