1yangsh opened a new pull request, #77446:
URL: https://github.com/apache/airflow/pull/77446
`DatabricksPartitionSensor.poke()` raised an `AirflowException` when the
requested partition was not found. The task therefore failed on the very first
check instead of re-poking every `poke_interval` until `timeout`. This
contradicts the sensor's documentation ("if not, it waits until the partition
value arrives") and forces users to emulate waiting with task retries.
`poke()` now logs that the partition was not found and returns `False`, so
the standard sensor machinery applies (`poke_interval`, `timeout`, `soft_fail`,
`mode="reschedule"`). Errors that waiting cannot fix still raise: a table
without partitions, an unknown partition column, or no partitions specified.
This picks up the approach from the earlier PR #44949, which was agreed in
review but closed as stale before tests were added. I replaced the test that
asserted the old raising behaviour with two tests. One covers the "not found
yet" results (empty, `None`, `False`). The other covers a not-found → not-found
→ found sequence.
Behaviour change: Dags that relied on the sensor failing immediately will
now wait until `timeout`.
related: #44950
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
---
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]