You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org> on 2026/07/09 17:33:48 UTC
[PR] Fix ExternalTaskSensor log timezone [airflow]
reachsrinivaschennupati-tech opened a new pull request, #69666:
URL: https://github.com/apache/airflow/pull/69666
Make `ExternalTaskSensor` poke logs display the external logical date in Airflow's configured timezone.
The stored `external_dates_filter` value is left unchanged so listeners and integrations continue to receive the original serialized logical date.
closes: #69657
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Codex following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
---
Local checks:
- `git diff --check`
- `.venv/bin/ruff check --no-cache providers/standard/src/airflow/providers/standard/sensors/external_task.py providers/standard/tests/unit/standard/sensors/test_external_task_sensor.py`
- `.venv/bin/ruff format --check --no-cache providers/standard/src/airflow/providers/standard/sensors/external_task.py providers/standard/tests/unit/standard/sensors/test_external_task_sensor.py`
I attempted the focused pytest command below, but pytest did not collect tests because the Airflow pytest plugin invokes a nested `uv run` and uv failed cache initialization in this local environment:
- `uv run pytest providers/standard/tests/unit/standard/sensors/test_external_task_sensor.py -k "external_dag_sensor_log"`
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-4971833974
@dhkim1920 Thanks for your suggestions, I have added your recommended changes into this PR.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-4941294571
Hi maintainers, this PR is ready for review when you have a chance.
The change is intentionally log-only: `ExternalTaskSensor` keeps the original `external_dates_filter` behavior for listeners/integrations, while poke log messages serialize the external logical date in Airflow's configured timezone for readability.
Validation noted in the PR:
- Focused unit coverage for `ExternalTaskSensor._serialize_dttm_filter_for_log`.
Happy to adjust naming or test placement if there is a preferred provider-standard convention.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-4927875517
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](https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:
- Pay attention to the quality of your code (ruff, mypy and type annotations). Our [prek-hooks]( https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst#prerequisites-for-prek-hooks) will help you with that.
- In case of a new feature add useful documentation (in docstrings or in `docs/` directory). Adding a new operator? Check this short [guide](https://github.com/apache/airflow/blob/main/airflow-core/docs/howto/custom-operator.rst) Consider adding an example Dag that shows how users should use it.
- Consider using [Breeze environment](https://github.com/apache/airflow/blob/main/dev/breeze/doc/README.rst) for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
- Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
- Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
- Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#coding-style-and-best-practices).
- Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
Apache Airflow is a community-driven project and together we are making it better 🚀.
In case of doubts contact the developers at:
Mailing List: dev@airflow.apache.org
Slack: https://s.apache.org/airflow-slack
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "dhkim1920 (via GitHub)" <gi...@apache.org>.
dhkim1920 commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-4970339558
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:
1. It may be clearer to retain the original external `logical_date` representation in the poke log and show the configured-timezone rendering alongside it, rather than replacing the logged value entirely.
This would preserve the canonical value for correlation and debugging while still making the configured local time immediately readable.
For example:
```text
Poking for DAG 'example_external_dag' on logical_date 2026-07-06T21:00:00+00:00 (default timezone: 2026-07-07T06:00:00+09:00) ...
```
2. The new test is currently located in `TestExternalTaskSensorV2`, which is skipped when running against Airflow 3. It would be useful to add equivalent coverage to the Airflow 3 test path so that the changed poke log is exercised on the version targeted by this PR.
```python
# 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.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-5192055948
@potiuk Thank you for the review. I rebased the branch onto current main and updated the timezone handling so the standard provider no longer imports airflow.settings.
The log formatter now reads core.default_timezone through the existing compat conf import, while keeping the original serialized logical date unchanged for external_dates_filter and listener/integration behavior. I also kept the configured-timezone suffix only for the human-facing log message.
I also cleaned up the tests: the direct formatter test is now outside the Airflow 2-only skipped class, and the Airflow 3 poke-log test has a distinct name so failures are easier to identify.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-5075835329
Hi @rozza @potiuk @imbaczek can you please review this PR.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-5192153665
Thanks again for the review. I cleaned up the branch history and rebased it onto the latest main, so the conflict/merge commit is gone now.
The PR now has a single commit with the provider-safe timezone handling and the clearer test names. Local checks I ran after the rebase: \ and \.
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-5007464236
Hi Maintainers,
All requested changes and The CI checks have completed successfully.
This PR is now ready for final review and merge. When you have a chance, could you please review it?
Thank you!
--
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
Re: [PR] Fix ExternalTaskSensor log timezone [airflow]
Posted by "reachsrinivaschennupati-tech (via GitHub)" <gi...@apache.org>.
reachsrinivaschennupati-tech commented on PR #69666:
URL: https://github.com/apache/airflow/pull/69666#issuecomment-4952310392
Hi Maintainers, this PR is ready for review when you have a chance, please review and trigger the CI workflow.
--
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