workflows/cloud_run_job CI failure
apeabody opened this issue · comments
Andrew Peabody commented
TL;DR
workflows/cloud_run_job is failing during periodic CI due to inability to access the us-central1-docker.pkg.dev/ci-tf-samples-3/my-repo/parallel-job:latest
image
https://github.com/terraform-google-modules/terraform-docs-samples/blob/main/workflows/cloud_run_job/main.tf#L137
Expected behavior
No response
Observed behavior
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185: google_eventarc_trigger.default: Creation complete after 16s [id=projects/ci-tf-samples-3-drrldvhz/locations/us-central1/triggers/cloud-run-job-trigger]
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185:
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185: Error: Error waiting to create Job: Error waiting for Creating Job: Error code 13, message: Google Cloud Run Service Agent service-{redacted}@serverless-robot-prod.iam.gserviceaccount.com must have permission to read the image, us-central1-docker.pkg.dev/ci-tf-samples-3/my-repo/parallel-job:latest. Ensure that the provided container image URL is correct and that the above account has permission to access the image. If you just enabled the Cloud Run API, the permissions might take a few minutes to propagate. Note that the image is from project [ci-tf-samples-3], which is not the same as this project [ci-tf-samples-3-drrldvhz]. Permission must be granted to the Google Cloud Run Service Agent service-949089809644@serverless-robot-prod.iam.gserviceaccount.com from this project.
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185:
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185: with google_cloud_run_v2_job.default,
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185: on main.tf line 129, in resource "google_cloud_run_v2_job" "default":
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185: 129: resource "google_cloud_run_v2_job" "default" {
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z command.go:185:
Step #6 - "test-samples-3": TestSamples/3/cloud_run_job 2024-02-23T06:54:07Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1;
Terraform Configuration
CI
Terraform Version
CI
Additional information
Ref: #605
Katie McLaughlin commented
There are two solutions here:
- Update the image line with the standard 'hello', getting users to update the line as in other tutorials.
- Disable the application of the code with a
test.yaml
There more complex solution would be to build the container in the testing project, but that's currently outside the scope of the tests here.
Andrew Peabody commented
Should have been closed by: #607