Skip to content

CloudRunExecuteJobOperator fails with 404 in Docker (gRPC transport) #60389

@dane805

Description

@dane805

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions