deploy-cloudrun icon indicating copy to clipboard operation
deploy-cloudrun copied to clipboard

feat: enable using Cloud Run Job

Open spencercorwin opened this issue 2 years ago • 11 comments

Summary

Enables updating Cloud Run Jobs using this action for #364 . It creates a new input called job which is the name of the job (similar to, but distinct from a "service" in Google Cloud Run). If and only if job is specified and service is not specified in the inputs then it will construct the appropriate gcloud command for updating a job with the provided image. Note that the job has to be created first. This action will only update the job. Also note that the gcloud command for updating jobs is in beta still, and so the user of the action must add gcloud_component: beta (or alpha) in the inputs for this to work (as noted in the README instructions). See here for documentation on the relevant gcloud CLI command.

So the workflow step might look something like this if a user wanted to update a job:

- name: Deploy to Cloud Run
  id: deploy
  uses: 'spencercorwin/deploy-cloudrun@enable-jobs'
  with:
    job: ${{ env.JOB }}
    gcloud_component: beta
    region: ${{ env.REGION }}
    # NOTE: If using a pre-built image, update the image name here
    image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REGISTRY_REPO }}/${{ env.SERVICE }}:${{ github.sha }}

Note that it looks like Cloud Run Jobs are in beta, so perhaps the maintainers don't want to merge this until the feature is out of beta and we can create a more thorough and stable PR 🙂

Test Plan

  • yarn test -> all tests pass, including new ones
  • Also tested manually in my own GitHub workflow by using uses: 'spencercorwin/deploy-cloudrun@enable-jobs' and the workflow successfully updated my Cloud Run Job with the new image.

spencercorwin avatar Jan 02 '23 04:01 spencercorwin

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jan 02 '23 04:01 google-cla[bot]

Hi @spencercorwin - thank you for the Pull Request. I think we need to discuss this as a team and decide whether to extend the existing action or to create a new action. If we choose to extend this action, this is likely the approach we'll take.

sethvargo avatar Jan 02 '23 15:01 sethvargo

Hi @sethvargo, is there any update on this feature?

mvaldi avatar Mar 17 '23 18:03 mvaldi

@sethvargo any update on this now that cloud run jobs is not in Beta anymore?

davideme avatar May 23 '23 13:05 davideme

@sethvargo hello, any updates on this? This feature would be great

ottohruby avatar Jul 03 '23 20:07 ottohruby

@spencercorwin do you need to accept Google's CLA for this PR to be reviewed?

TigerC10 avatar Aug 01 '23 23:08 TigerC10

@spencercorwin do you need to accept Google's CLA for this PR to be reviewed?

I believe the CLA is needed before merging, but not before being reviewed. I'll sign the CLA soon regardless though :)

spencercorwin avatar Aug 05 '23 18:08 spencercorwin

It would be great to be able to use this. Any updates or ETA?

charlesgreen avatar Sep 23 '23 02:09 charlesgreen

really surprised that this issue isn't on a higher priority. current it is hard to to CI/CD with cloud run jobs since it isn't connected to cloud build, and it is difficult to deploy with github action after 9 months(counting).

kollerbud avatar Sep 24 '23 07:09 kollerbud

@spencercorwin Thank you for opening this PR! Any updates on moving this forward? Happy to help you ping the right people to get some attention on this.

fterrag avatar Sep 26 '23 14:09 fterrag

@spencercorwin Thank you for opening this PR! Any updates on moving this forward? Happy to help you ping the right people to get some attention on this.

I'm sorry I've been MIA. I'm just really busy and this isn't a priority for me.

I tried to sign the Google CLA a few weeks ago but I don't sign my commits with my personal email because I don't want that to be public. But the Google CLA process needs me to sign it with the same email that's on the PR/commit. So that's where I left off.

And now it looks like there are also some merge conflicts to be resolved.

I'm sorry, I just don't have the bandwidth to get this done right now. I'll try to get to it, but if someone wants to just copy my code and everything and open a new PR that would be great.

spencercorwin avatar Sep 29 '23 21:09 spencercorwin

For anyone else subscribed to this that was surprised by its closure, it wasn't immediately clear that this PR was superseded by #474

TigerC10 avatar Apr 15 '24 16:04 TigerC10