Add Cloud Run Operator - #27638
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
There was a problem hiding this comment.
I wonder how much this code has to do with the this code:
https://github.com/apache/airflow/blob/0fd129f33792a95b06c4f4ad1f7ee83dc2f5cef5/airflow/providers/google/common/utils/id_token_credentials.py
There was a problem hiding this comment.
The two seems indeed related. But id_token_credentials.py provide the credentials from Google application default credentials.
Whereas the credential_provider.py already contains all the code to infer credentials from an Airflow Connection
0fd129f to
3df24fc
Compare
3df24fc to
fa49d44
Compare
|
Static checks failing. |
|
I fixed the doc Build. |
|
Conflicts need to be solved. |
f3dcd22 to
45ce866
Compare
|
And errors to fix. |
|
I rebased the PR. lets see if test passes |
|
Hi, I am the Product Manager for Cloud Run. Thanks for working on a Cloud Run Operator for Airflow! Please feel free to ask any Cloud Run related question here. I looked at the PR, it seems that it is using an HTTP call to a Cloud Run service. I would have believed that a Cloud Run job would be more suited for Airflow, as it doesn't require the container to expose any HTTP server, it can be executed via a simple API call. Have you evaluated a job? |
|
Hi @steren |
|
@matthieuvilatte Ah I might have misunderstood this Operator. It doesn't deploy a Cloud Run service but calls an existing Cloud Run service, is that right? Maybe the Operator name should make this clearer (i.e. Cloud Run hook)? To differentiate it with the other "Cloud Run Job" Operator |
|
@steren This Operator name is indeed confusing, but I don't think we should rename it May be |
|
@matthieuvilatte operators usually design to do a specific action thus we like/prefer when operator has a verb in it's name indicate the action for example: |
|
Tests are failing. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
This PR add a
CloudRunOperatoralong withCloudRunHook.This new Operator allows to make authenticated call against Cloud Run (HTTP request with proper authentication header)
CloudRunOperatorextends theSimpleHttpOperator: this add a dependency to HTTP provider.The authentication token needed in HTTP header (for proper Cloud Run authentication) is an ID Token.
The
credential_provider.pyhad to be modified with a new functionget_id_token_credentialsto provide "ID Token like" credentials.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.