Skip to content

ExternalTaskSensorTrigger ignores poke_interval and polls every 2 seconds with excessive logging while using deferrable=True #68990

Closed

Description

@surendarvarmas

Description

Type: Bug / Feature Request

Apache Airflow version: 2.10.3

What happened:

When using ExternalTaskSensor with deferrable=True, the poke_interval parameter is ignored. The trigger polls every ~2 seconds regardless of the configured poke_interval, and logs "Sleeping for 2.0 seconds" on every cycle.

For a sensor with a 6-hour timeout, this generates ~10,800 log lines per task instance.

Use case/motivation

The trigger should respect the poke_interval parameter (or provide a separate trigger_poll_interval parameter) to control how often it checks the external DAG state, similar to how the non-deferred reschedule mode respects poke_interval.

Additional context:

This makes deferrable=True impractical for ExternalTaskSensor compared to mode="reschedule", which properly respects poke_interval and produces cleaner, more useful logs (including the external DAG name being waited on).

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:feature
    needs-triage
    on Jun 25, 2026
  2. boring-cyborg commented on Jun 25, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. added
    area:async-operators
    on Jun 25, 2026
  4. jroachgolf84 commented on Jun 25, 2026

    @jroachgolf84
    Collaborator

    @surendarvarmas - unfortunately, seems like there is a little bug here. poke_interval is "ignored" (for lack of a better phrase), and instead the poll_interval parameter is used. That being said, there is an easy fix for you here to immediately solve your issue (just changing poke_interval -> poll_interval).

    Change here seems to be updating the __init__ method to instead take poke_interval, then using that here:

    Not sure how we want to handle deprecating that poll_interval parameter? I assume there are quite a few users using poll_interval, and we don't want to break that.

  5. added and removed
    needs-triage
    on Jun 25, 2026
  6. jroachgolf84 commented on Jun 25, 2026

    @jroachgolf84
    Collaborator

    I'm creating a PR for this now.

  7. self-assigned this
    on Jun 25, 2026
  8. surendarvarmas commented on Jun 25, 2026

    @surendarvarmas
    Author

    @jroachgolf84 - This resolves the poke_interval issues but if we add the deferrable=True then it's not logging the dependent DAG name. Probably that needs to be addressed here as well.

  9. jroachgolf84 commented on Jun 25, 2026

    @jroachgolf84
    Collaborator

    Can you provide a bit more detail there?

  10. surendarvarmas commented on Jun 25, 2026

    @surendarvarmas
    Author

    it's always logging - {{external_task.py:119}} INFO - Sleeping for 2.0 seconds but not for which dependent DAG it's waiting for.

  11. jroachgolf84 commented on Jun 25, 2026

    @jroachgolf84
    Collaborator

    I think that should be a one-line change - would you like to make that in another PR? I want to keep this one atomic (only including the poll/poke_interval changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:async-operatorsgood first issuekind:feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions