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

Error creating job with max-retries set #563

Open
wyardley opened this issue Mar 10, 2025 · 0 comments
Open

Error creating job with max-retries set #563

wyardley opened this issue Mar 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@wyardley
Copy link

TL;DR

I'm seeing an issue with deploying a job (see definition below) where it seems like the action is trying to run gcloud run deploy update vs gcloud run jobs create? It's also running gcloud run deploy update on an image, where I have multiple jobs defined using the same image, so it seems like that would also create an issue?

Also, I'm not sure if this will work in the case where the job is being created for the first time? Ideally, the workflow would be idempotent and deploy whether the workflow already exists or not (not sure if this is the case, but this is one reason that I tried using this workflow vs. using a shell script directly).

Feel free to also consider this a feature request to implement max-retries as a top level parameter as well.

Expected behavior

The job to be deployed (if it exists) or updated (if it doesn't).

Observed behavior

Error: google-github-actions/deploy-cloudrun failed with: failed to execute gcloud command `gcloud run deploy  --image us-docker.pkg.dev/xxxx/yyy/zzz:0e3fa3155 --update-env-vars ^,^FOO="bar" --update-secrets ^,^FOO2=foo2:latest,BAR_SECRET=bar-secret:latest --timeout 40m --update-labels ^,^managed-by=github-actions,commit-sha=0e3fa3155d1355c9035653febf7196a653b6a705 --format json --region us-central1 --command python3 --args models/uw_model/scoring.py --max-retries 2 --parallelism 1 --service-account foo@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com`: ERROR: (gcloud.run.deploy) unrecognized arguments:
  --max-retries (did you mean '--max-instances'?)
  2
  --parallelism
  1
  To search the help text of gcloud commands, run:
  gcloud help -- SEARCH_TERMS

Action YAML

- id: deploy
        uses: google-github-actions/deploy-cloudrun@v2
        with:
          job: ${{ steps.generate_name.outputs.job-name }}
          image: ${{ inputs.image }}
          env_vars: |-
            FOO="bar"
          flags: >
            --command=python3
            --args=${{ matrix.job }}
            --max-retries=2
            --parallelism=1
            --service-account="foo@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com"
          gcloud_version: 511.0.0 # Tried updating this in case that was why `--max-retries` wasn't working, but I think it's just that it's using a different command
          secrets: |-
            BAR_SECRET=bar-secret:latest
            FOO2=foo2:latest
          timeout: 40m

Log output


Additional information

No response

@wyardley wyardley added the bug Something isn't working label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant