Repository navigation
fix(ci): fail the stale label cleanup when listing the labelled pull requests fails - #14191
Merged
oneandonlydean merged 2 commits intoNov 2, 2026
Conversation
…requests fails The cleanup step pipes gh pr list into a while loop. The run step had no shell set, so the default on Linux runs bash -e without pipefail, and the step's status was the loop's status. A failed or rate-limited listing ran the loop zero times and the step stayed green, with no stale label removed and nothing reported. shell: bash gives the step pipefail.
The test reads the step that runs gh pr list in stale-conflicts.yml and checks that it sets shell: bash. Against the previous step it fails.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Contributor
|
Windows result for head Host: Windows 11 26300, Python 3.13.5.
AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
stale-conflicts.ymlpipesgh pr listinto awhile readloop that removes thestalelabel from pull requests that have aneeds rebaselabel. The run step has noshellset, so on Linux it runsbash -ewithoutpipefail, and the step's status is the status of the loop. Whengh pr listfails (API error, rate limit, token problem), the loop runs zero times, the step stays green, and no stale label is cleaned up. Nothing is reported.Fix, in two commits:
c407ae115a:shell: bashon the step, which gives itpipefail, so the failed listing fails the step.e09eb54933:tools/tests/test_stale_conflicts_workflow.pyreads the step and requiresshell: bash. It is registered inCMakeLists.txtafterpad_input.Impact is low: the failure only leaves stale labels in place until the next scheduled run.
Tested
Linux, Python 3.11.2, on
upstream/main1bc97b9527plus these commits:python3 tools/tests/test_stale_conflicts_workflow.py: OK with the fix.'shell: bash' not found inthe step's text.stale-conflicts.ymlparses as YAML (PyYAML) and the step's shell isbash.python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/main: clean.Not run: the scheduled workflow. A maintainer can check the next run's log.
Overlap: #13993 (open, same author) adds
timeout-minutesto the job header ofstale-conflicts.yml, a few lines above the step changed here. The two edits do not share a line.The overlap check fails closed on ten open pull requests that touch
CMakeLists.txtand conflict withmain(#1835, #5021, #7642, #9539, #10193, #10897, #11104, #13578, #13928, #13929). I searched theirCMakeLists.txtpatches forpad_inputandstale_conflicts_workflow: none mentions them. This PR's registration sits afterpad_input.Checklist
mainNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)