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

feat: enable using Cloud Run Job #422

Closed

Conversation

spencercorwin
Copy link

@spencercorwin spencercorwin commented Jan 2, 2023

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 spencercorwin requested a review from a team as a code owner January 2, 2023 04:33
@google-cla
Copy link

google-cla bot commented Jan 2, 2023

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.

@sethvargo
Copy link
Member

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.

@mvaldi
Copy link

mvaldi commented Mar 17, 2023

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

@davideme
Copy link

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

@ottohruby
Copy link

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

fully-qualified identifier of the job. If `job` and `service` are specified
then the `service` will be updated and the `job` will be ignored. Note that
the `job` must be created first. This will only update an existing `job`, it
will not deploy/create a new job. Note that as of Dec 31, 2022, Cloud Run for

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of May 1, 2023 - job in Cloud Run has exited beta.

@TigerC10
Copy link

TigerC10 commented Aug 1, 2023

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

@spencercorwin
Copy link
Author

@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 :)

Sunny-Dee added a commit to Sunny-Dee/HappyLittleAIs that referenced this pull request Aug 14, 2023
Can consider using this option: google-github-actions/deploy-cloudrun#422 But official support likely to come in the future.
@charlesgreen
Copy link

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

@kollerbud
Copy link

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

@fterrag
Copy link

fterrag commented Sep 26, 2023

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

@spencercorwin
Copy link
Author

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

@TigerC10
Copy link

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

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

Successfully merging this pull request may close these issues.

9 participants