aeroyorch opened a new pull request, #62148: URL: https://github.com/apache/airflow/pull/62148
### Description The documented `DecreasingPriorityStrategy` can fail because `get_weight()` may run while `TaskInstance` is still partially initialized, so `ti.try_number` is not ready. This PR applies a small fix by initializing `try_number` before `refresh_from_task()` and adds a regression test case for `DecreasingPriorityStrategy`. ### Notes This is a minimal fix. As a follow-up, it would be worth exploring whether priority strategies could be evaluated with richer context (including `DagRun`/`logical_date`) and outside early lifecycle initialization. For example, this could enable strategies that decrease priority for older logical dates. --- ##### Was generative AI tooling used to co-author this PR? <!-- If generative AI tooling has been used in the process of authoring this PR, please change below checkbox to `[X]` followed by the name of the tool, uncomment the "Generated-by". --> - [ ] Yes (please specify the tool below) <!-- Generated-by: [Tool Name] 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]
