Skip to content

Fix stale bot skipping older PRs - #75761

Merged
potiuk merged 1 commit into
apache:mainfrom
Andrushika:fix-stale-bot-operations-budget
Oct 27, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
Andrushika:fix-stale-bot-operations-budget

Conversation

@Andrushika

@Andrushika Andrushika commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

stale.yml runs once a day. Its first step reads the open issues and PRs, newest first, in pages of 100. It marks a PR stale after 45 days without activity. It closes the PR 5 days later.

Each run of the step has a limit of operations. The option for this limit is operations-per-run. When a run reaches the limit, it stops and saves its position. The next run continues from that position.

#14494 moved the bot to actions/stale in 2021. It did not set operations-per-run. The default of 30 applies. Each page costs one operation.

Airflow now has about 1900 open issues and PRs. In the last 14 runs, every run of the first step stopped with "No more operations left!". Each run read only the newest 750 to 880 items. In 12 of the 14 runs, the run did not find the saved position. It started again from the newest item. The lowest PR number that any run reached was #71329. In these 14 days, the bot did not check any older PR.

What

Set operations-per-run: 500 on the first step. In the log, each PR that the step marks costs about four operations. So 500 covers the 20 pages and about 100 marked PRs. One run then reads all items, and the saved position is not necessary. For this reason, I did not try to fix the saved position.

The first run will mark the idle PRs that the bot skipped until now. Some of them wait for a review, not for the author. The same rule already applies to newer PRs today.

related: #3883, #14494


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

Generated-by: Claude Code (Opus 5.5) following the guidelines

The first stale step used the default budget of 30 operations. Every
run ran out after the newest ~800 of ~1900 open items, so PRs older
than about apache#71300 were never marked or closed.
@Andrushika Andrushika changed the title Raise the stale bot operation budget so it reaches older PRs Fix stale bot skipping older PRs Oct 27, 2026
@potiuk
potiuk merged commit cb58200 into apache:main Oct 27, 2026
59 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

vatsrahul1001 pushed a commit that referenced this pull request Oct 28, 2026
…PRs (#75761) (#75794)

The first stale step used the default budget of 30 operations. Every
run ran out after the newest ~800 of ~1900 open items, so PRs older
than about #71300 were never marked or closed.
(cherry picked from commit cb58200)

Co-authored-by: Andrew Chang <[email protected]>
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.

4 participants