uranusjr commented on code in PR #58497:
URL: https://github.com/apache/airflow/pull/58497#discussion_r2544686004
##########
providers/standard/src/airflow/providers/standard/triggers/external_task.py:
##########
@@ -227,18 +227,21 @@ async def run(self) -> typing.AsyncIterator[TriggerEvent]:
runs_ids_or_dates = len(self.execution_dates)
if AIRFLOW_V_3_0_PLUS:
- data = await
self.validate_count_dags_af_3(runs_ids_or_dates_len=runs_ids_or_dates)
- yield TriggerEvent(data)
+ cls_path, data = await
self.validate_count_dags_af_3(runs_ids_or_dates_len=runs_ids_or_dates)
+ yield TriggerEvent((cls_path, data))
Review Comment:
Instead of having `validate_count_dags_af_3` return the otherwise unused
`cls_path`, I’d probably do something like
```python
cls_path, data = self.serialize()
data.update(await self.validate_count_dags_af_3(runs_ids_or_dates))
yield TriggerEvent((cls_path, data))
```
but the logic works either way.
--
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]