Skip to content

fix: skip install when qwen CLI already exists - #14

Merged
DragonnZhang merged 1 commit into
mainfrom
fix/skip-install-if-exists
Aug 3, 2026
Merged

fix: skip install when qwen CLI already exists#14
DragonnZhang merged 1 commit into
mainfrom
fix/skip-install-if-exists

Conversation

@yiliang114

Copy link
Copy Markdown
Collaborator

Summary

  • Add if-missing guard: skip npm install --global entirely when qwen is already in PATH, matching the pattern in qwen-code-pr-review.yml. Version updates are managed by the fleet updater, not per-run installs.
  • Replace --silent with --loglevel=error so that when a fresh install is needed (new runner), failures are diagnosable from the Actions log.

Fixes intermittent exit 243 failures across the ECS runner fleet caused by non-root runners lacking write permission to the global npm prefix.

Test plan

  • Trigger a triage run on a runner with qwen pre-installed → should print version and skip install
  • Trigger on a fresh runner without qwen → should install and show errors if any

Add if-missing guard matching qwen-code-pr-review.yml pattern:
skip npm install entirely when qwen is already in PATH. Version
updates are managed by the fleet updater, not per-run installs.

Also replace --silent with --loglevel=error so fresh-install
failures are diagnosable from the Actions log.

Fixes intermittent exit 243 across ECS runners caused by
non-root users lacking write permission to the global npm prefix.
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Hi @yiliang114, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new “already installed” branch can fail the step due to set -e on qwen --version and currently skips honoring qwen_cli_version without warning.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR updates the composite action’s “Install Qwen Code” step to avoid global installs on runners that already have qwen available, and to make fresh-install failures more diagnosable in GitHub Actions logs.

Changes:

  • Skip npm/pnpm --global installation when qwen is already present in PATH.
  • Replace --silent installs with --loglevel=error to surface actionable failure output.
  • Restructure install/verification flow so verification happens after the conditional install path.
File summaries
File Description
action.yml Adds a presence guard around Qwen CLI installation and adjusts npm/pnpm logging for debuggability.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread action.yml
Comment on lines 149 to 152
if command -v qwen >/dev/null 2>&1; then
qwen --version || echo "Qwen Code installed successfully (version command not available)"
echo "Qwen Code already installed, skipping install:"
qwen --version
else
@DragonnZhang
DragonnZhang merged commit 97db4d3 into main Aug 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants