-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Google CloudRun job operator #24730
Comments
feel free to submit PR |
Oh yeah, I would like to have this operator. I am using Cloud Run Jobs to execute light data processing and scripting. It would be really nice to have a dedicated operator to trigger this flow in Cloud Composer (apart from the bash operator). |
Why not contribute it then ? |
I would love to. But I do not have a single idea on how to do it. Is there an established process to work on it? |
Includes:
I think that is a good starting point - and you can choose the learning path that is best for you |
I think, I also can contribute on this, if required |
We haven't heard back from Juan, so assigning to @v-hunt, thanks for taking this one! |
Possible solution with this PR |
Brief Thoughts/NotesI've done a little bit of work on this and here are some notes. A PR for this feature should include operators for both:
It looks like #27638 only include the services operator. This would be a good start but it looks like it also uses transport instead of the official client. Other GCP operators (e.g. tasks and others) use the official clients so it would be best to go the same route with this one. In my mind the biggest benefit comes from the jobs operators since that would allow users who do not want to deal with/manage K8s to use Cloud Run Jobs with arbitrary containers. The Google team is great and recently released support for jobs in the official Cloud Run Python client (see googleapis/python-run#65) but it won't be available until v0.5.0 with no ETA. It also currently won't build with I created my own plugin for this if anyone is interested in using Cloud Run Jobs (currently does not support services) before these issues are resolved and I plan to use the official client once that is ready. https://github.com/mharrisb1/airflow-google-cloud-run-plugin Please note that this plugin will only be supported until this is available in Airflow. Requirements ProposalCloud Run Services and Jobs would be great additions to GCP resources in Airflow. I think a PR to add these features should cover the following:
Some additional thoughts:
Would love to contribute and collaborate with anyone on this. I do think we're blocked on progress until v0.5.0 of the official client is released w/ support for compatible protofbuf lib but we can definitely go ahead and start progressing on this in preparation for those to be released in the near future (also go comment/like this issue to increase awareness to Google team googleapis/python-run#70). |
Hi guys, |
What I've found: this guy created a custom Airflow plugin for Cloud Run Jobs: link |
Hey guys, just found out about this issue ! @mharrisb1 happy to collaborate with you on this one. What I had in mind was to design the execution of an existing job in the same way as Would you have any thoughts on this ? |
After a closer look a this plugin, here are some thoughts :
Happy to have this issue assigned if necessary @v-hunt , as I think this would be a game changer for many GCP users! |
@VinceLegendre all great thoughts. I think most of my plugin is obsolete once someone can get https://github.com/googleapis/python-run to build correctly with the rest of the Google Cloud providers code https://pypi.org/project/apache-airflow-providers-google/. The only issue is resolving protobuf versions between the 2 (see googleapis/python-run#70). The Google team will not solve this on their side so someone will need to solve it in the Google providers code. The official python-run library is definitely preferred over my custom client. Then yes, taking the same approach as other Google Cloud providers would be the goal. And exactly as you pointed out: extend Once the protobuf issue is resolved then it should be an easy path to just implement operators for all CRUD and execution options. I think sensors, custom links, etc. are nice to have but could potentially be introduced in subsequent versions if someone doesn't want to implement it all at once. I would though consider all the CRUD operators as part of the completion requirements since that allows full control over the resource lifecycle. |
@mharrisb1 Is the build issue you mention specific to cloud-run v2 API ? If so, v1 API seems to build correctly with the rest of google cloud providers, at least locally. |
When will the official CloudRun Job operator be ready to use in production? Is there an alternative for this? |
The alternative is to use a BashOperator with the gcloud command.
El El vie, 3 de feb. de 2023 a la(s) 09:41, Mohith G <
***@***.***> escribió:
When will the official CloudRun Job operator be ready to use in
production? Is there an alternative for this?
—
Reply to this email directly, view it on GitHub
<#24730 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZEPOZUYLVM3M2DJOBK7CXLWVT4GHANCNFSM52FAD4XQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
*Juan MantegazzaLead Data Engineer*
*E: ***@***.*** ***@***.***>W: www.zubale.com
<http://www.zubale.com/>*
|
Edit |
Glad this sparks a lot of interest. One thought once the operators have migrated to the official SDK is to consider a new It could combine with parallelism: inject arbitrary py code + number of tasks to run concurrently, with default of one (=current executor behavior). I have a few use cases where 100+ similar tasks run in parallel and I don't need/want each to be defined as an airflow task (would kill the UI, among others). |
Cloud run jobs can now last up to 24 hours, making this viable for the vast majority of tasks. |
Description
Like AWS ECS, In Google Cloud Service has Cloud Run Job beta. So does anyone need to use this feature from GCS?
Use case/motivation
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: