fix(ci): fail fast on contaminated self-hosted workspaces - #6029
Conversation
Docker-backed builds bind-mount the checkout and can leave root-owned files on persistent proxysql-ci runners. Replace the suppressed ownership repair with self-hosted-only chown and chmod steps plus UID verification before checkout and after every build outcome, so EACCES failures are prevented or reported at the source. Propagate gh run watch --exit-status from CI-trigger as well. This preserves the existing workflow_run success gates and prevents repl, selftest, and shuntest jobs from starting when CI-builds did not publish handoff artifacts.
📝 WalkthroughWalkthroughThe CI workflows now restrict workspace cleanup to trusted self-hosted runners, restore and verify ownership and permissions, and fail with diagnostics when cleanup is incomplete. The trigger workflow now propagates the watched CI-builds run’s exit status. ChangesCI workflow reliability
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant CI-trigger
participant gh_run_watch
participant CI-builds
CI-trigger->>gh_run_watch: Watch CI-builds with --exit-status
gh_run_watch->>CI-builds: Observe workflow completion
CI-builds-->>gh_run_watch: Return workflow status
gh_run_watch-->>CI-trigger: Return exit status
CI-trigger-->>CI-trigger: Log success or fail with watcher status
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review ✅ ApprovedExplicit workspace cleanup and error propagation for self-hosted CI runners to prevent permission errors and invalid workflow handoffs. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
CI-buildsfailure throughCI-triggerusinggh run watch --exit-status, preventing handoff-dependent workflow runs from starting without artifacts.Root cause
Docker builds bind-mount the checkout and leave root-owned dependency files on persistent
proxysql-cirunners. The previous cleanup suppressed all errors, so the nextactions/checkoutfailed withEACCES. Separately,CI-triggerignored the watched build result, allowing downstream workflows to start and report misleading missing-artifact failures.Validation
bash -n.git diff --checkpassed.Target branch:
GH-Actions.Summary by CodeRabbit