From 7a112e40eb640892a7d3e394f1cc7b6242d76529 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Mon, 13 Jun 2022 20:18:39 +0800 Subject: [PATCH] Add note on subtle logical date change in 2.2.0 Due to a UI addition, the logical date of a manually-triggered DAG run now has its sub-second part set to zero, instead of directly matching the trigger time. This should be inconsequential in normal circumstances, but apparently some people are relying on this sub-second accuracy... for purposes I can't understand. But this is technically a backward incompatible change. --- RELEASE_NOTES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 66edcf9c90e90..33cae19c5cea2 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -1244,6 +1244,13 @@ DaskExecutor - Dask Worker Resources and queues If dask workers are not started with complementary resources to match the specified queues, it will now result in an ``AirflowException``\ , whereas before it would have just ignored the ``queue`` argument. +Logical date of a DAG run triggered from the web UI now have its sub-second component set to zero +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Due to a change in how the logical date (``execution_date``) is generated for a manual DAG run, a manual DAG run’s logical date may not match its time-of-trigger, but have its sub-second part zero-ed out. For example, a DAG run triggered on ``2021-10-11T12:34:56.78901`` would have its logical date set to ``2021-10-11T12:34:56.00000``. + +This may affect some logic that expects on this quirk to detect whether a run is triggered manually or not. Note that ``dag_run.run_type`` is a more authoritative value for this purpose. Also, if you need this distinction between automated and manually-triggered rus for “next execution date” calculation, please also consider using the new data interval variables instead, which provide a more consistent behavior between the two run types. + New Features ^^^^^^^^^^^^