-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utilize map_index for deterministic generation of OpenLineage's run_id #43936
utilize map_index for deterministic generation of OpenLineage's run_id #43936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's run all the compat tests to make sure it works for past Airflow versions as well.
providers/src/airflow/providers/openlineage/plugins/listener.py
Outdated
Show resolved
Hide resolved
ec9f51c
to
3aa017d
Compare
providers/src/airflow/providers/openlineage/plugins/listener.py
Outdated
Show resolved
Hide resolved
482115b
to
9cb56cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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 <[email protected]>
Use
queued_dttm
to differentiate between sensors with mode=reschedule runs.Use
map_index
to differentiate between mapped tasks runs.