Fix ExternalTaskSensor log timezone#69666
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
83fafb3 to
8f246ed
Compare
|
Hi maintainers, this PR is ready for review when you have a chance. The change is intentionally log-only: Validation noted in the PR:
Happy to adjust naming or test placement if there is a preferred provider-standard convention. |
|
Hi Maintainers, this PR is ready for review when you have a chance, please review and trigger the CI workflow. |
|
Thanks for working on this. I had also started looking into a fix for #69657 and noticed two details that may be worth considering before review:
This would preserve the canonical value for correlation and debugging while still making the configured local time immediately readable. For example:
# tests\unit\standard\sensors\test_external_task_sensor.py TestExternalTaskSensorV2: line 135
@pytest.mark.skipif(AIRFLOW_V_3_0_PLUS, reason="Different test for v3.0+")I have a local branch implementing this approach, but I would prefer not to open a near-duplicate PR unless the maintainers would like to evaluate it separately. |
|
@dhkim1920 Thanks for your suggestions, I have added your recommended changes into this PR. |
Summary
Make
ExternalTaskSensorpoke logs display external logical dates in Airflow's configured timezone.Problem
ExternalTaskSensorlogs currently serialize the external logical date directly from the stored filter value. This can make poke logs harder to read in deployments where Airflow is configured with a non-UTC timezone.Solution
settings.TIMEZONE.external_dates_filterunchanged so listeners and integrations continue to receive the original serialized logical date.Validation
ExternalTaskSensor._serialize_dttm_filter_for_log.closes: #69657