You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2026/06/04 05:19:38 UTC
Re: [PR] Fix `airflow dags clear` clearing the wrong day for non-UTC partitioned timetables [airflow]
uranusjr commented on code in PR #67717:
URL: https://github.com/apache/airflow/pull/67717#discussion_r3353674272
##########
airflow-core/src/airflow/cli/commands/dag_command.py:
##########
@@ -157,10 +188,13 @@ def dag_clear(args, *, session: Session = NEW_SESSION) -> None:
query = query.where(DagRun.partition_key == args.partition_key)
else:
query = query.where(DagRun.partition_date.is_not(None))
+ tt_tz = dag.timetable.timezone if isinstance(dag.timetable, CronMixin) else None
Review Comment:
In general we should avoid isinstance check like this. Maybe add a flag on the timetable base class and a TypeGuard instead.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org