get_job_logs: run_id with failed_only=false should return all job logs; failed_only should be a consistent modifier
还没有人认领这个 Issue。
评估
调研方向
从 get_job_logs 的实现开始,跟踪 job_id、run_id 和 failed_only 的验证方式,包括现有的作业元数据查找。为 issue 中提到的参数组合添加有针对性的覆盖,并验证现有的成功调用保持不变,同时确保提议的运行级请求和失败作业请求能够正常工作。
由索引模型根据 Issue 内容生成。
描述
This came out of an analysis of github MCP server errors encountered in my past sessions across 5000 sessions.
What happened
An agent trying to retrieve all job logs for a workflow run passed:
{"owner":"danmoseley","repo":"pr-dashboard","run_id":22854416647,"return_content":true,"tail_lines":500,"failed_only":false}
And got:
job_id is required when failed_only is false
This happened 6 times across 5 sessions. The agent's intent was clear and reasonable: get all logs for this run, not just failed ones. It even explicitly set failed_only=false to signal that — and got an error.
Why the current design is confusing for agents
failed_only is used as a mode switch rather than a modifier:
run_idwithoutfailed_only=truealways errors, even though "get logs for this run" is a valid requestfailed_onlyhas no effect whenjob_idis provided — it is silently ignored
Proposed behavior
failed_only should be a consistent modifier on whichever ID is provided:
| Parameters | Result | Proposed |
|---|---|---|
job_id + failed_only=false (or not passed) |
logs for that job | already allowed |
job_id + failed_only=true |
logs for that job if it failed; isError:true with status if it succeeded |
error -> allowed |
run_id + failed_only=false (or not passed) |
logs for all jobs in the run | already allowed |
run_id + failed_only=true |
logs for failed jobs only | error -> allowed |
both job_id and run_id |
isError:true — provide one or the other, not both |
error |
| neither | isError:true — one of job_id or run_id must be provided |
error |
The job_id + failed_only=true case requires checking the job's conclusion before fetching logs, but the tool already fetches job metadata to get the log URL so this is a small addition.
Breaking change note
No changes to existing successful calls. This only makes certain calls that are failing begin to work.
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
feature-request helm
难度 2/5 1-3 小时 新手友好度 68/100
gravitational/teleport#69785 ·
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 88/100
crossplane/crossplane#7859 ·
-
难度 1/5 1 小时以内 新手友好度 90/100