Repository navigation
fix(merge_queue): log gh stderr, survive one failed repository, fetch heavy fields per changed PR - #34
Merged
Conversation
… fetch heavy fields per changed PR
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.
merge_queue.py(after #33) made one search, one repository listing and one heavygh pr list(files, checks, comments, body) per repository on every run, and a single failed gh call ended the run with a bare traceback and no gh message.gh()raisesGhErrorwith the command, exit code and the last 400 characters of stderr, and prints it to stderr, so the sentinel's merge-queue.log shows it. A failed search or repository list ends the run with that message instead of a traceback.HERDR_BOARD_DIRoverrides the directory) the repositories come from it, and a PR whose (head sha, updated, checks) match the last run is taken frommerge-queue-cache.jsonnext to the snapshot. Only changed PRs are fetched, onegh pr vieweach. Mergeable always comes from the snapshot. Without a usable snapshot it asks gh as before, onegh pr listper repository.Measured here on the real account, same output both times: first run with an empty cache 75 s (one view per PR), next run 20 s. The remaining time is the per-base commit lookups for the stale check, unchanged.
local-ci: 2d0e974 |
merge_queue.py selftestok (new cases: no snapshot, cache hit fetches nothing, new head sha fetches one PR, mergeable from snapshot, old and corrupt snapshot, a PR gh cannot read is reported and the others stay, gh stderr in the error); ruff format clean | not run: ruff check tools/conventions.py has one existing import-order finding, left alone🤖 Generated with Claude Code