tim-x-y-z opened a new issue, #52580:
URL: https://github.com/apache/airflow/issues/52580

   ### Apache Airflow version
   
   2.11.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Hi team, 
   This is related to the google cloud run operator
   ```
   from airflow.providers.google.cloud.operators.cloud_run import (
       CloudRunExecuteJobOperator,
   )
   ```
   
   When passing a number of retries to that operator i exepect the task to 
retry that number of times. However if the `Number of retries per failed task` 
parameter is set in the jobs definition, then the task will retry x times and 
report it as a single try on airflow.
   
   ### What you think should happen instead?
   
   I think passing `retries` to the `CloudRunExecuteJobOperator` should 
override the `Number of retries per failed task` parameter in the job 
definition, probably setting it to 0 ? Such that all the tries are co-ordinated 
by airflow.
   
   ### How to reproduce
   
   Create a new cloud run job and have this parameter set:
   
![Image](https://github.com/user-attachments/assets/6ef902d2-6ef2-4489-bcb9-7500572e503e)
   Make sure the code in the job will fail.
   ```
   CloudRunExecuteJobOperator(
           task_id="example",
           project_id="example",
           region="europe-north1",
           job_name="example_job_name",
           overrides={
               "container_overrides": [
                   {
                       "args": container_args,
                   }
               ]
           },
           dag=dag,
           deferrable=True,
           retries=1
       )
   ```
   The task will retry 3 times, then report only one failure, get triggered 
again by airflow and retry 3 times again.
   
   ### Operating System
   
   Linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Google Cloud Composer
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to