Repository navigation
fix(actions): check every job page in get_job_logs failed_only - #3430
Open
jayhemnani9910 wants to merge 1 commit into
Open
jayhemnani9910 wants to merge 1 commit into
jayhemnani9910 wants to merge 1 commit into
Conversation
Only the first 30 jobs of a run were listed, so in larger matrix runs a failed job past that page was reported as "No failed jobs found".
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.
Summary
get_job_logswithfailed_onlynow reads every page of the run's jobs instead of only the first 30, so failed jobs later in large matrix runs are found.Why
Fixes #3428
handleFailedJobLogscalledListWorkflowJobsonce with noper_page, so the API returned only the first 30 jobs. A failure past that page was reported as "No failed jobs found", andtotal_jobswas 30.Open PR #2674 renames
handleFailedJobLogsand keeps the single-page call; whichever lands second needs a small rebase.What changed
handleFailedJobLogslists jobs withper_page=100and followsNextPage.total_jobscounts all listed jobs.failed job on a later pageinTest_ActionsGetJobLogs_FailedJobs: page 1 has 30 passing jobs and anextlink, page 2 has the failed job. Without the change the result isfailed_jobs: 0, total_jobs: 30; with it,1and31.MCP impact
failed_onlyfinds failures in runs with more than 30 jobs. No schema change.Prompts tested (tool changes only)
failed_only: true; the run has 45 jobs and both failures are after the first 30). v1.14.0:No failed jobs found in this workflow run,total_jobs: 30. This branch:Retrieved logs for 2 failed jobs,total_jobs: 45.Security / limits
One extra API call per 100 jobs; a run can have at most 256 matrix jobs per workflow, so this is a few calls at most.
Tool renaming
deprecated_tool_aliases.goLint & tests
./script/lintpins: 0 issues)go test ./...(all packages ok)Docs