Skip to content

Deprecating poll_interval in ExternalTaskSensor for poke_interval - #68997

Merged
Lee-W merged 13 commits into
apache:mainfrom
jroachgolf84:fix/issue-68990
Jul 31, 2026
Merged

Deprecating poll_interval in ExternalTaskSensor for poke_interval#68997
Lee-W merged 13 commits into
apache:mainfrom
jroachgolf84:fix/issue-68990

Conversation

@jroachgolf84

Copy link
Copy Markdown
Collaborator

Description

In the ExternalTaskSensor, the poll_interval was being instantiated and being used rather than the poke_interval parameter. Users passing in poke_interval were not having that value respected (despite poke_interval being an inherited parameter from BaseSensorOperator).

This PR removes poll_interval from the ExternalTaskSensor and ensures that the value set for poke_interval is respected.

closes: #68990

Testing

Six new unit-tests were added as part of this PR. These unit tests ensure that:

  • poke_interval is properly set upon init
  • Setting poll_interval is no longer supported
  • The new poke_interval passes through to the Trigger when Operator is used in a deferrable fashion

These tests can be run with the following command:

breeze testing providers-tests providers/standard/tests/unit/standard/sensors/test_external_task_sensor.py

Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated
@uranusjr

Copy link
Copy Markdown
Member

Need to correct the titles to not use the conventional commit format.

This does not seem to deprecate but instead outright remove poll_interval, from what I can tell.

Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated
Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated
@jroachgolf84 jroachgolf84 changed the title fix/issue-68990: Deprecating poll_interval in ExternalTaskSensor for poke_interval Deprecating poll_interval in ExternalTaskSensor for poke_interval Jul 22, 2026
@jroachgolf84

Copy link
Copy Markdown
Collaborator Author

@uranusjr and @phanikumv, would you mind re-reviewing this? Thanks!

Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated
@uranusjr

Copy link
Copy Markdown
Member

Same as the argument, we might also want to keep the old attribute for compatibility. It’s probably easiest to use a property that emits a deprecation warning on set/get.

Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated

@uranusjr uranusjr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough. There are a couple of small nits that I would prefer fixing, but the PR won’t break without them either.

@jroachgolf84

Copy link
Copy Markdown
Collaborator Author

@uranusjr - happy to fix those nits. What are they, specifically?

@jroachgolf84

Copy link
Copy Markdown
Collaborator Author

Same as the argument, we might also want to keep the old attribute for compatibility. It’s probably easiest to use a property that emits a deprecation warning on set/get.

Happy to add this in!

Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated
jroachgolf84 and others added 2 commits July 30, 2026 09:58
…rnal_task.py

Co-authored-by: Phani Kumar <94376113+phanikumv@users.noreply.github.com>
@jroachgolf84

jroachgolf84 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Same as the argument, we might also want to keep the old attribute for compatibility. It’s probably easiest to use a property that emits a deprecation warning on set/get.

@uranusjr - addressed in next commit.

@jroachgolf84 jroachgolf84 added the ready for maintainer review Set after triaging when all criteria pass. label Jul 30, 2026
Comment thread providers/standard/src/airflow/providers/standard/sensors/external_task.py Outdated

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM

Comment thread providers/standard/tests/unit/standard/sensors/test_external_task_sensor.py Outdated
@Lee-W
Lee-W merged commit 36e7d02 into apache:main Jul 31, 2026
155 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

6 participants