utilize map_index for deterministic generation of OpenLineage's run_id - #43936
Conversation
kacpermuda
left a comment
There was a problem hiding this comment.
Looks good, let's run all the compat tests to make sure it works for past Airflow versions as well.
ec9f51c to
3aa017d
Compare
482115b to
9cb56cc
Compare
dstandish
left a comment
There was a problem hiding this comment.
you might look into whether you can use TaskReschedule to know whether you are in a reschedule. if so, could limit unnec queries by checking whether you inherit from basesensor and have mode==reschedule. and then, on the exit side, you could check state == up-for-reschedule.
although, this could be an issue with deferrables as well. with deferrables though you could check whether next_method / next kwargs populated to infer coming out of deferral. i think we do that somewhere and selectively emit a log message. then on exit, you could look at state deferred perhaps.
but fundamentally, you are OL master so, i defer to you
eafa59b to
8cf16c8
Compare
|
@dstandish at the end just works - the additional query isn't a big problem because I can perform those just for reschedulable sensors. |
…n_id Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
8cf16c8 to
7e32fe5
Compare
cool @mobuchowski |
|
Is not that something that should be back-ported to 2.10.4 ? It certainly looks like |
|
I provisionally added 2.10.4 milestone now but @mobuchowski -> maybe you can use the new cherry-picker manual flow to back-port it (it's already merged, so we missed the opportunity to auto cherry-pick it) https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#how-to-backport-pr-with-cherry-picker-cli |
|
Ah. STupid me. It's provider-only :). Forget it. |
…n_id (apache#43936) Signed-off-by: Maciej Obuchowski <obuchowski.maciej@gmail.com>
Use
queued_dttmto differentiate between sensors with mode=reschedule runs.Use
map_indexto differentiate between mapped tasks runs.