Repository navigation
fix(ci): restore workspace ownership in cleanup to prevent EACCES #7931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1522,6 +1522,15 @@ jobs: | |||||||||||
| find tmp -maxdepth 2 -type d -name '*-tmux-*' -exec rm -rf {} + 2>/dev/null || true | ||||||||||||
| fi | ||||||||||||
| git worktree prune -v || true | ||||||||||||
| # Restore workspace ownership to the runner user so the next job's | ||||||||||||
| # checkout step can clean the tree without EACCES. The prepare step | ||||||||||||
| # chowned everything to node:node; without this, node_modules and | ||||||||||||
| # .qwen/ remain node-owned and the next checkout's rm -rf fails. | ||||||||||||
| RUNNER_UID="$(stat -c '%u' "$RUNNER_TEMP" 2>/dev/null || stat -f '%u' "$RUNNER_TEMP" 2>/dev/null || echo 0)" | ||||||||||||
| RUNNER_GID="$(stat -c '%g' "$RUNNER_TEMP" 2>/dev/null || stat -f '%g' "$RUNNER_TEMP" 2>/dev/null || echo 0)" | ||||||||||||
|
Comment on lines
+1529
to
+1530
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] 静默失败路径缺少诊断日志 — Concrete cost: 如果两个
Suggested change
中文说明如果 — qwen3.7-max via Qwen Code /review |
||||||||||||
| if [ "$RUNNER_UID" != "0" ]; then | ||||||||||||
| chown -R "$RUNNER_UID:$RUNNER_GID" "$GITHUB_WORKSPACE" 2>/dev/null || true | ||||||||||||
| fi | ||||||||||||
|
|
||||||||||||
| # Post the tmux verdict back to the PR. Runs on a clean GitHub-hosted runner | ||||||||||||
| # with the write PAT and never checks out PR code, so the write credential is | ||||||||||||
|
|
@@ -2825,6 +2834,15 @@ jobs: | |||||||||||
| esac | ||||||||||||
| done | ||||||||||||
| git worktree prune -v || true | ||||||||||||
| # Restore workspace ownership to the runner user so the next job's | ||||||||||||
| # checkout step can clean the tree without EACCES. The prepare step | ||||||||||||
| # chowned everything to node:node; without this, node_modules and | ||||||||||||
| # .qwen/ remain node-owned and the next checkout's rm -rf fails. | ||||||||||||
| RUNNER_UID="$(stat -c '%u' "$RUNNER_TEMP" 2>/dev/null || stat -f '%u' "$RUNNER_TEMP" 2>/dev/null || echo 0)" | ||||||||||||
| RUNNER_GID="$(stat -c '%g' "$RUNNER_TEMP" 2>/dev/null || stat -f '%g' "$RUNNER_TEMP" 2>/dev/null || echo 0)" | ||||||||||||
| if [ "$RUNNER_UID" != "0" ]; then | ||||||||||||
| chown -R "$RUNNER_UID:$RUNNER_GID" "$GITHUB_WORKSPACE" 2>/dev/null || true | ||||||||||||
| fi | ||||||||||||
|
Comment on lines
+2844
to
+2845
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Critical] verify lane 仍然失败:
Suggested change
中文说明verify job 的 "Re-pin the verifier" 步骤执行 — qwen3.7-max via Qwen Code /review |
||||||||||||
|
|
||||||||||||
| # Post the verification report back to the PR. Runs on a clean GitHub-hosted | ||||||||||||
| # runner with the write PAT and never checks out PR code, so the write | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] 重复代码无交叉引用 — Concrete cost: 这个 9 行块在
tmux-testing(此处)和verify(约第 2837 行)的 cleanup 步骤中完全相同地出现了两次。修改其中一处(如添加chmod)时,维护者可能不知道另一处也需要同步更新。中文说明
这 9 行代码在 tmux-testing 和 verify 两个 job 的 cleanup 步骤中完全一样。未来修改其中一处时(比如加 chmod),维护者可能不知道另一处也需要改。建议在注释中添加交叉引用,说明两处需保持同步。
— qwen3.7-max via Qwen Code /review