Repository navigation
fix: merge unfiltered runs into filtered run search - #432
Merged
Merged
Conversation
Queries using branch/event/head_sha are served by GitHub's search index, which intermittently returns a random subset of matching runs, with total_count and pagination matching the truncated result. The action then picks an arbitrarily old run. Fetch the latest unfiltered page as well, match those runs locally and merge them into the first filtered page before sorting. Refs #428 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
|
👍🏼 |
centosinfra-prod-github-app Bot
pushed a commit
to ansible-collections/amazon.aws
that referenced
this pull request
Oct 8, 2026
…ates (#3148) Bumps the github-actions group with 2 updates in the / directory: dawidd6/action-download-artifact and SonarSource/sonarqube-scan-action. Updates dawidd6/action-download-artifact from 25 to 27 Release notes Sourced from dawidd6/action-download-artifact's releases. v27 What's Changed fix: merge unfiltered runs into filtered run search by @dawidd6 in dawidd6/action-download-artifact#432 Full Changelog: dawidd6/action-download-artifact@v26...v27 v26 Full Changelog: dawidd6/action-download-artifact@v25...v26 Commits eab87c9 fix: merge unfiltered runs into filtered run search (#432) 27e4ae6 feat: log skipped workflow runs in debug mode See full diff in compare view Updates SonarSource/sonarqube-scan-action from 8.2.2 to 8.3.0 Release notes Sourced from SonarSource/sonarqube-scan-action's releases. v8.3.0 What's Changed Fix GPG key retrieval through HTTPS proxies by @Torbjorn-Svensson in SonarSource/sonarqube-scan-action#265 Configure Renovate by @renovate[bot] in SonarSource/sonarqube-scan-action#267 SQSCANGHA-168 Update actions/cache action to v5.1.0 by @renovate[bot] in SonarSource/sonarqube-scan-action#269 Update npm dependencies by @renovate[bot] in SonarSource/sonarqube-scan-action#268 Update dependency @actions/exec to v3 by @renovate[bot] in SonarSource/sonarqube-scan-action#270 Update GitHub Actions dependencies (major) by @renovate[bot] in SonarSource/sonarqube-scan-action#271 New Contributors @Torbjorn-Svensson made their first contribution in SonarSource/sonarqube-scan-action#265 @renovate[bot] made their first contribution in SonarSource/sonarqube-scan-action#267 Full Changelog: SonarSource/sonarqube-scan-action@v8.2.2...v8.3.0 Commits d209202 Update GitHub Actions dependencies (major) (#271) 0333cb3 Update dependency @actions/exec to v3 (#270) da4450e Update npm dependencies (#268) c5094d1 SQSCANGHA-168 Update actions/cache action to v5.1.0 (#269) 001613f SQSCANGHA-162 Configure Renovate (#267) 6abe0a7 SQSCANGHA-165 Fix GPG key retrieval through HTTPS proxies (#265) See full diff in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions Reviewed-by: Don Naro <dnaro@redhat.com> Reviewed-by: Bikouo Aubin
veprbl
added a commit
to eic/EICrecon
that referenced
this pull request
Oct 10, 2026
Workflow run queries filtered by head_sha or status are served by a search index that intermittently returns a random subset of the matching runs, with total_count and pagination matching the truncated result. This can select an older run for a commit, or none at all. As in action-download-artifact (dawidd6/action-download-artifact#432), also fetch the latest 100 runs of the workflow without filters, and merge them with the filtered results before selecting. Match status locally instead of in the query.
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.
Refs #428
Problem
When
branch,eventorcommitis used,listWorkflowRunsis queried with filters, which GitHub serves from a search index (docs: "up to 1,000 results for each search when using … branch, … event, head_sha, status"). That index intermittently returns a random subset of the matching runs. The subset is still sorted,total_countequals the truncated length, and there is nonextlink, so neither the response order nor pagination shows the gap. The action then picks the newest run in the subset, which can be months old.Measured on
Panzerschrek/U-00DC-Sprache(main.yml, newestmasterrun #5170):branch=masterstatus=successbranch=masterA bad response looked like
18/18runs (#5169, 5118, 5108, 5018 … 4950) against a real total of 114. The debug log in #428 shows the extreme case: a page containing 1 run out of hundreds.Fix
When a search filter is set, also fetch the latest 100 runs without filters, match them locally (
head_branch,event,head_sha), and merge any that are missing into the first filtered page before sorting. Cost: one extra request, only when those filters are used. This only helps when the newest matching run is among the workflow's latest 100 runs. If it isn't, behavior is unchanged.Testing
Dry runs against the public repo above, through a local proxy that returns the recorded truncated response for the filtered query:
During testing, the live API also returned a truncated page once, and the merge picked up the missing run.
🤖 Generated with Claude Code