pyrr opened a new issue, #47039:
URL: https://github.com/apache/airflow/issues/47039

   ### What do you see as an issue?
   
   The [documentation for 
trigger_dagrun](https://airflow.apache.org/docs/apache-airflow/2.9.3/_api/airflow/operators/trigger_dagrun/index.html)
 reports the following:
   
   > failed_states 
([list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]
 | None) – List of failed or dis-allowed states, default is None.
   
   However, the failed_states parameter defaults to `['failed']` 
([source](https://github.com/apache/airflow/blob/8d0895b8b8a678c08e1aa771398c7d5ec696ad28/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py#L164-L167)).
   
   ### Solving the problem
   
   Replace the offending line with:
   
   > failed_states 
([list](https://docs.python.org/3/library/stdtypes.html#list)[[str](https://docs.python.org/3/library/stdtypes.html#str)]
 | None) – List of failed or dis-allowed states, default is ['failed'].
   
   ### Anything else
   
   Though the function signature does indicate a default of `None` for both 
`allowed_states` and `failed_states`, the default for `allowed_states` is 
listed as `['success']` because of the logic 
[here](https://github.com/apache/airflow/blob/8d0895b8b8a678c08e1aa771398c7d5ec696ad28/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py#L160-L163).
 Therefore we should be consistent with the reported default value for 
`failed_states` by indicating `['failed']` as the default value.
   
   ### Are you willing to submit PR?
   
   - [x] 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