Skip to content

Fix DecreasingPriorityStrategy example by initializing try_number before weight evaluation - #62148

Merged
ashb merged 1 commit into
apache:mainfrom
aeroyorch:fix-priority-weight-strategy-init-try-number
Oct 2, 2026
Merged

ashb merged 1 commit into
apache:mainfrom
aeroyorch:fix-priority-weight-strategy-init-try-number

Conversation

@aeroyorch

@aeroyorch aeroyorch commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

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.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch 3 times, most recently from 3e0254c to 04d4bd8 Compare February 19, 2026 16:46
@aeroyorch
aeroyorch marked this pull request as draft February 19, 2026 19:30
@aeroyorch
aeroyorch marked this pull request as draft February 19, 2026 19:30
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch 3 times, most recently from 455f2f4 to 89df73b Compare February 19, 2026 22:28
@aeroyorch
aeroyorch marked this pull request as ready for review February 19, 2026 22:28
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 89df73b to 748e769 Compare February 20, 2026 06:01
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 748e769 to 9455275 Compare February 27, 2026 23:41
@potiuk
potiuk marked this pull request as draft April 2, 2026 12:20
@potiuk

potiuk commented Apr 2, 2026

Copy link
Copy Markdown
Member

Converted to Draft as we try to make an order in our PRs.

@potiuk

potiuk commented Apr 23, 2026

Copy link
Copy Markdown
Member

@aeroyorch This draft PR has not had author activity for 54 days. Before anyone can review it, it needs to meet our Pull Request quality criteria. Here is a summary of what still needs work; once those items are addressed, mark the PR ready for review.

Issues found:

  • ❌ Merge conflicts: this branch has conflicts with main and cannot be merged as-is. Rebase: git fetch upstream main && git rebase upstream/main, resolve, force-push.

What to do next:

  • Address the items above.
  • Make sure static checks pass locally: prek run --from-ref main --stage pre-commit.
  • Mark the PR as "Ready for review" when you are done.

There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

@aeroyorch
aeroyorch marked this pull request as ready for review April 26, 2026 20:46
@aeroyorch
aeroyorch marked this pull request as draft April 26, 2026 20:46
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from be80734 to 7163c3d Compare April 27, 2026 06:46
@aeroyorch
aeroyorch marked this pull request as ready for review April 27, 2026 08:22
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 7163c3d to 3651315 Compare May 1, 2026 23:52
@potiuk potiuk added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label May 5, 2026
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch 3 times, most recently from 03c3bd5 to 514373f Compare May 15, 2026 05:13
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 514373f to 4127311 Compare May 19, 2026 06:01
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch 2 times, most recently from c95601d to 63aa906 Compare June 11, 2026 05:19
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Jul 31, 2026
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 63aa906 to fa9313f Compare July 31, 2026 06:15
@github-actions github-actions Bot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 3, 2026
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from fa9313f to a1b219d Compare September 14, 2026 13:29
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch 2 times, most recently from 0981f2f to ea0ecf2 Compare October 1, 2026 08:03
@ashb
ashb force-pushed the fix-priority-weight-strategy-init-try-number branch from ea0ecf2 to 0a009d1 Compare October 1, 2026 12:10
@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from 0a009d1 to ddb26f7 Compare October 1, 2026 14:20
@aeroyorch aeroyorch changed the title Fix: DecreasingPriorityStrategy example by initializing try_number before weight evaluation Fix DecreasingPriorityStrategy example by initializing try_number before weight evaluation Oct 1, 2026
@aeroyorch

Copy link
Copy Markdown
Contributor Author

I think the PR is failing due to the PR title..

@aeroyorch
aeroyorch force-pushed the fix-priority-weight-strategy-init-try-number branch from ddb26f7 to da7b64d Compare October 1, 2026 16:08
@ashb
ashb merged commit ae6139d into apache:main Oct 2, 2026
79 checks passed
@aeroyorch
aeroyorch deleted the fix-priority-weight-strategy-init-try-number branch October 2, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants