conclusion job: collect_usage_artifact_files.sh calls bare `node` (exit 127) on runners without node on PATH
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
调研方向
从 actions/setup/sh/collect_usage_artifact_files.sh 以及相关的 shell 测试(例如 check_mcp_servers_test.sh)开始。先使用不包含 node 的临时 PATH 运行脚本,然后使用 stub node 运行,并验证警告、退出状态、列表以及未改变的摘要行为;同时运行 pkg/workflow/evals_steps_test.go 中相关的检查。
由索引模型根据 Issue 内容生成。
描述
Analysis
The conclusion job runs actions/setup/sh/collect_usage_artifact_files.sh (step built by buildUsageArtifactCollectionStep() in pkg/workflow/notify_comment.go). Its last real step is a bare node call (line 89 on main):
mkdir -p /tmp/gh-aw/usage/activity
node "${RUNNER_TEMP}/gh-aw/actions/generate_usage_activity_summary.cjs"
find /tmp/gh-aw/usage -type f -print | sort
Unlike the agent, detection and other jobs, the conclusion job gets no GenerateNodeJsSetupStep() (pkg/workflow/nodejs.go); its github-script steps use the runner's bundled node internally. On a self-hosted runner whose image has no node on PATH (the stock ghcr.io/actions/actions-runner image that ARC scale sets use ships node only under /home/runner/externals/node*), the call fails:
/home/runner/_work/_temp/gh-aw/actions/collect_usage_artifact_files.sh: line 73: node: command not found
##[error]Process completed with exit code 127.
The step is continue-on-error: true, so the job stays green, but every run carries an ##[error] annotation, usage/activity/summary.json is never produced, and the trailing find listing is skipped. The summary is best-effort by design (that is why the step is continue-on-error), so a missing node should degrade to a warning, not an error.
Reproduction
- Compile any workflow and run it on a self-hosted runner image where
nodeis not onPATH(e.g.ghcr.io/actions/actions-runneras the ARC scale-set runner image). - Open the
conclusionjob log: step "Collect usage artifact files" fails with exit code 127 as above.
Observed with gh-aw-actions/setup v0.90.0, engine: pi, runner.topology: arc-dind; the script on main still has the unguarded call.
Implementation Plan
Preferred: guard the call in the script (smallest change, works for every runner and topology, no extra setup step in every conclusion job).
- Guard the call (
actions/setup/sh/collect_usage_artifact_files.sh, thenode ...generate_usage_activity_summary.cjsline):
Keep theif command -v node >/dev/null 2>&1; then node "${RUNNER_TEMP}/gh-aw/actions/generate_usage_activity_summary.cjs" else echo "::warning::node not found on PATH; skipping the usage activity summary" fi find /tmp/gh-aw/usage -type f -print | sortfindlisting running in both cases. - Add a test
actions/setup/sh/collect_usage_artifact_files_test.sh, in the style of the sibling*_test.shscripts (e.g.check_mcp_servers_test.sh): run the script with a temporaryPATHthat contains the coreutils it needs but nonode; assert exit code 0, the::warning::line is printed, and thefindlisting still appears. Add a second case with a stubnodeonPATHasserting it is invoked. - Check
pkg/workflow/evals_steps_test.go(it reads this script) still passes, and recompile the lock files that embed it.
Alternative (heavier, not preferred): prepend GenerateNodeJsSetupStep() to the conclusion job in notify_comment.go, which adds a setup step to every run just for a best-effort summary.
Acceptance Criteria
- On a runner without
nodeonPATH, "Collect usage artifact files" exits 0 and logs a::warning::; no##[error]annotation. - On a runner with
node, behavior is unchanged andusage/activity/summary.jsonis generated. - The new shell test covers both cases.
Workaround on our side: a node symlink on PATH in the runner image.
- 主要语言
- Go
- 星标
- 5.5k
- 派生
- 606
- 平均合并
- 4 小时 44 分钟
- 30 天内合并 PR
- 799
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/gh-aw 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
automated-analysis code-quality cookie refactoring
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
cookie maintenance step-naming
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
automation doc-healer documentation
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
agentic-workflows automation aw-essential cookie
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
相似的 Issue
-
agent-butler-finding chore
难度 1/5 1 小时以内 新手友好度 78/100
jordansmall/spindrift#6318 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Eyevinn/moqlivemock#166 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
JakeChampion/lang#14091 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
hyperledger/fabric-x-orderer#1409 ·
维护者通常 3 天内回复
-
get actions doesn't show the approval flag, and describe action shows it unformatted可能已有人在做 @kenokech 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复