23tae commented on code in PR #67395:
URL: https://github.com/apache/airflow/pull/67395#discussion_r3296871906
##########
airflow-core/src/airflow/cli/commands/dag_command.py:
##########
@@ -368,7 +368,18 @@ def iter_next_dagrun_info() -> Iterator[DagRunInfo | None]:
else:
columns = ["logical_date", "data_interval.start",
"data_interval.end", "run_after"]
getters = [(c, operator.attrgetter(c)) for c in columns]
- AirflowConsole().print_as_table([{n: f(o) for n, f in getters} for o
in iter_next_dagrun_info()])
+ rows = []
+ for info in iter_next_dagrun_info():
+ if info is None:
+ print(
+ "[WARN] No following schedule can be found. "
+ "This DAG may have schedule interval '@once' or `None`.",
+ file=sys.stderr,
+ )
+ break
Review Comment:
The `iter_next_dagrun_info()` generator naturally exhausts itself on `None`,
making this `break` technically unnecessary.
For consistency with the existing non-`--table` block below, we can just
remove it here. No pressure though, either way is fine.
--
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]