-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Description
Apache Airflow version
3.1.5
If "Other Airflow 3 version" selected, which one?
No response
What happened?
CloudRunExecuteJobOperator fails with 404 errors in Docker, but the same Cloud Run jobs work fine with gcloud CLI.
NotFound: 404 Requested entity was not found.
What you think should happen instead?
CloudRunHook should allow specifying transport parameter (gRPC/REST).
How to reproduce
from airflow.providers.google.cloud.operators.cloud_run import CloudRunExecuteJobOperator
task = CloudRunExecuteJobOperator(
task_id="test",
project_id="my-project",
region="asia-northeast3",
job_name="my-job",
)
Operating System
Debian (Docker)
Versions of Apache Airflow Providers
apache-airflow-providers-google==19.1.0
Deployment
Docker-Compose
Deployment details
Standard Airflow 3.1.5 docker-compose setup with CeleryExecutor
Anything else?
Workaround:
from google.cloud import run_v2
class CustomCloudRunHook(CloudRunHook):
def get_conn(self):
credentials, _ = self.get_credentials_and_project_id()
return run_v2.JobsClient(credentials=credentials, transport='rest')
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct