hwang-cadent commented on PR #56973:
URL: https://github.com/apache/airflow/pull/56973#issuecomment-4399460448
Rebased on the latest `apache/main` (which had a meaningful refactor adding
`_validate_datetime_param` and `run_after` support to `TriggerDagRunOperator`)
and squashed the branch into a single clean commit (`d1a826d9f8`).
**Conflict resolution highlights**:
- Took `apache/main`'s `__init__` / `execute` / `_trigger_dag_af_3` /
`_trigger_dag_af_2` structure verbatim, including `_validate_datetime_param`
and `run_after` handling.
- Dropped my earlier `isinstance(logical_date, ArgNotSet)` defensive checks
— those were a workaround for the deserialization bug now being fixed in
**#66564**, so they're no longer needed once that lands.
- Removed the `serialized_objects.py` / `test_serialized_objects.py` hunks
from this PR (now tracked in **#66564** as discussed with @potiuk and @dabla).
**Final scope of this PR (4 files, +138 / -22)**:
-
`providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py`:
add `XCOM_DAG_ID` constant, push it from `_trigger_dag_af_2`, and prefer it in
`TriggerDagRunLink.get_link()` (with `is None` identity check).
- `task-sdk/src/airflow/sdk/execution_time/task_runner.py`: push
`trigger_dag_id` next to `trigger_run_id` in `_handle_trigger_dag_run` after a
successful trigger.
- `providers/standard/tests/unit/standard/operators/test_trigger_dagrun.py`:
switch existing AF3 link test to mock `XCom.get_value`, add
`test_extra_operator_link_with_dynamic_dag_id` for both AF2 and AF3.
- `task-sdk/tests/task_sdk/execution_time/test_task_runner.py`: extend
ordered `assert_has_calls` in both `test_handle_trigger_dag_run` and
`test_handle_trigger_dag_run_wait_for_completion` with the new
`SetXCom("trigger_dag_id")` step.
PR is now `mergeable: true` against `main`. Could you take another pass when
you have a chance, @potiuk @dabla? Thank you!
--
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]