josh-fell opened a new pull request #16866: URL: https://github.com/apache/airflow/pull/16866
Related to #10285 - Removed or refactored the `default_args` pattern where necessary as requested by @ashb (i.e. removed a separated `default_args` declaration for deference for declaration as part of the `DAG` object) - Updated example DAG files such that `xcom_pull()` calls use an operator's `.output` property as well access of `TaskInstance` objects from context to use `get_current_context()` function - Added comments to which task dependencies, if any, are handled and/or created via `XComArgs` for transparency An detailed summary of all changes made as part of this PR can be found below: | DAG File | Converted `xcom_pull()`? | Other Updates? | Comments | | ---------| ------------------------ | -------------- | -------- | | airflow/example_dags/example_bash_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_branch_datetime_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_branch_day_of_week_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_branch_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_branch_python_dop_operator_3.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_dag_decorator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_kubernetes_executor_config.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_kubernetes_executor.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_passing_params_via_test_command.py | No | Yes | Removed unneeded `default_args` pattern. </br></br>Added missing param to prevent failures. | | airflow/example_dags/example_python_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_short_circuit_operator.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_skip_dag.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_trigger_controller_dag.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/example_trigger_target_dag.py | No | Yes | Removed unneeded `default_args` pattern. </br></br>Updated to use `get_current_context()`.| | airflow/example_dags/example_xcom.py | Yes | Yes | Included examples for context retrieval using `get_current_context()` based on previous PR comments to show new and old means of `XCom` access.<br/><br/>Removed explicit task dependencies that are created via `XComArgs`. <br/><br/>Removed unneeded `default_args` pattern. | | airflow/example_dags/example_xcomargs.py | No | Yes | Removed unneeded `default_args` pattern. | | airflow/example_dags/tutorial_etl_dag.py | No | No | Not updated based on earlier comment to keep this file unchanged during initial PR. | | airflow/example_dags/tutorial_taskflow_api_etl_virtualenv.py | No | Yes | Removed unneeded `default_args` pattern. </br></br> Moved `import json` statement to inside `extract()` function to prevent failures. | | airflow/example_dags/tutorial_taskflow_api_etl.py | No | Yes | Removed unneeded `default_args` pattern. | --- **^ Add meaningful description above** Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information. In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed. In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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]
