I am triggering a cloud run job in GCP through airflow DAG. The job takes 30 minutes to execute, but the request timeout is 900 seconds so the DAG task fails. The error is:
"Operation did not complete within the designated timeout of 900 seconds".
900 seconds seem to be the default timeout for API call. The cloud run job still continues execution and finishes successfully - but the API request gets timed out. How to set the timeout for API request (not the timeout for cloud run job)? The code snippet I am using to trigger the cloud run job:
def run_cloudrun_job(**kwargs):
client = run_v2.JobsClient()
request = run_v2.RunJobRequest(
name=f"projects/project_id/locations/region/jobs/job_name",
overrides=overrides,
)
operation = client.run_job(request=request)
response = operation.result()