Conversation
…ore Copilot CLI install Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
|
✅ Changeset Generator completed successfully! |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
There was a problem hiding this comment.
Pull request overview
This pull request addresses an intermittent failure in the "Install GitHub Copilot CLI" step during smoke tests. The issue occurs when a previous AWF run on the same runner used sudo -E awf --enable-chroot, creating the /home/runner/.copilot directory with root ownership. Subsequent jobs on the reused runner fail when the Copilot CLI (running as the runner user) attempts to create subdirectories.
Changes:
- Adds directory ownership fix to
install_copilot_cli.shbefore Copilot CLI installation - Creates
/home/runner/.copilotdirectory if it doesn't exist and ensures correct ownership (runner:runner) - Includes explanatory comments documenting the issue and linking to the relevant GitHub issue
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # This is needed because a previous AWF run on the same runner may have used | ||
| # `sudo -E awf --enable-chroot ...`, which creates the .copilot directory with | ||
| # root ownership. The Copilot CLI (running as the runner user) then fails when | ||
| # trying to create subdirectories. See: https://github.com/github/gh-aw/issues/12066 |
There was a problem hiding this comment.
The issue reference in the comment points to https://github.com/github/gh-aw/issues/12066, but according to the PR description, this fix is for issue #13979. The comment should be updated to reference the correct issue number.
| # trying to create subdirectories. See: https://github.com/github/gh-aw/issues/12066 | |
| # trying to create subdirectories. See: https://github.com/github/gh-aw/issues/13979 |
| COPILOT_DIR="/home/runner/.copilot" | ||
|
|
||
| # Fix directory ownership before installation | ||
| # This is needed because a previous AWF run on the same runner may have used | ||
| # `sudo -E awf --enable-chroot ...`, which creates the .copilot directory with | ||
| # root ownership. The Copilot CLI (running as the runner user) then fails when | ||
| # trying to create subdirectories. See: https://github.com/github/gh-aw/issues/12066 | ||
| echo "Ensuring correct ownership of $COPILOT_DIR..." | ||
| mkdir -p "$COPILOT_DIR" | ||
| sudo chown -R runner:runner "$COPILOT_DIR" |
There was a problem hiding this comment.
The COPILOT_DIR path /home/runner/.copilot and the user:group runner:runner are hardcoded, which means this script will only work correctly in GitHub Actions hosted runners. If this script is ever used in self-hosted runners or different CI environments where the user is not runner, the chown command may fail or be incorrect. Consider using environment variables like $HOME/.copilot and $(whoami):$(whoami) for better portability, or at a minimum, document that this script is specifically designed for GitHub Actions hosted runners.
Agent Container Tool Check
Result: 10/12 tools fully operational ✅ Note: Java and .NET binaries are present at expected paths but encounter execution issues when invoked. This appears to be an environment-specific problem rather than missing installations.
|
Smoke Test: Copilot - 21727679475PRs Reviewed:
Test Results:
Overall:
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Copilot CLI installation intermittently fails with
EACCES: permission denied, mkdir '/home/runner/.copilot/pkg'when a previous AWF run on the same runner usedsudo -E awf --enable-chroot, creating the.copilotdirectory with root ownership.Changes
install_copilot_cli.sh:This ensures consistent ownership regardless of prior runner state.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Changeset
/home/runner/.copilotis owned byrunner:runnerbefore the Copilot CLI install so chroot runs cannot leave the directory root-owned and trigger EACCES errors.