Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ee753c9
fix(ci): give the ECS runner resolve wait a 60-minute budget
yiliang114 Sep 3, 2026
3fc83d5
fix(ci): size the resolve wait on the measured 55-minute propagation
yiliang114 Sep 3, 2026
290d730
ci: print install-prefix diagnostics when the version check fails
yiliang114 Sep 3, 2026
c64936d
fix(ci): pin the fleet install to the /usr/local prefix
yiliang114 Sep 3, 2026
16b7737
fix(ci): fall back to a non-sudo install where passwordless sudo is m…
yiliang114 Sep 3, 2026
3eeeaf8
Merge branch 'main' into fix/ecs-runner-resolve-budget
yiliang114 Sep 3, 2026
72b49c5
test(ci): follow the fleet install step's array form
yiliang114 Sep 3, 2026
557fa66
fix(ci): keep the fleet verify diagnostics usable without sudo
yiliang114 Sep 3, 2026
4b4f265
fix(ci): capture the fleet qwen version tolerantly in verify
yiliang114 Sep 3, 2026
109ab64
test(ci): pin the fleet resolve budget against the job timeout
yiliang114 Sep 3, 2026
5622729
Merge branch 'main' into fix/ecs-runner-resolve-budget
wenshao Sep 4, 2026
b8de1c0
fix(ci): capture the fleet qwen version from stdout only
yiliang114 Sep 4, 2026
4aa5744
test(ci): assert the sudo probe class instead of today's verbs
yiliang114 Sep 4, 2026
6aab6c5
fix(ci): pick the ECS install mode by running it, not by probing sudo
yiliang114 Sep 5, 2026
9b3b664
fix(ci): try the sudoers-named argv as its own install mode
yiliang114 Sep 5, 2026
71ffce1
ci: record the ECS updater workflow's real size
yiliang114 Sep 5, 2026
9b9c5e0
Merge origin/main into fix/ecs-runner-resolve-budget
yiliang114 Sep 5, 2026
8a57856
fix(ci): retry a failed npm install in the same mode, not the next one
yiliang114 Sep 6, 2026
e372dda
Merge origin/main into fix/ecs-runner-resolve-budget
yiliang114 Sep 6, 2026
ba3c5a9
fix(ci): advance the install mode only on an identified sudo refusal
yiliang114 Sep 6, 2026
12a320b
fix(ci): require a sudo refusal to be the arm's whole story before ad…
yiliang114 Sep 6, 2026
a3d357f
Merge branch 'main' into fix/ecs-runner-resolve-budget
yiliang114 Sep 9, 2026
b526897
fix(ci): keep ECS resolver timeout change focused
yiliang114 Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .github/workflows/update-ecs-runner-qwen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
name: 'Resolve version'
if: "${{ github.repository == 'QwenLM/qwen-code' }}"
runs-on: 'ubuntu-latest'
timeout-minutes: 30
timeout-minutes: 100
outputs:
version: '${{ steps.version.outputs.version }}'
steps:
Expand All @@ -36,12 +36,16 @@ jobs:
# npm publishes asynchronously: `npm publish --provenance` returns
# "Your package is being processed and may take a few minutes to
# become available", and release.yml dispatches this workflow as soon
# as it returns. For v0.22.3 the gap was ~16 minutes (published
# 17:14Z, resolvable 17:30Z), so the single un-retried `npm view` this
# step used to run 404'd on 3 of the 4 pools and left the fleet split
# across two CLI versions until a maintainer noticed. Wait the
# registry out rather than losing the race.
RESOLVE_TIMEOUT_SECONDS: '1500'
# as it returns. The gap grows with the package size and varies
# widely: v0.22.3 took ~16 minutes, and v0.23.0 (a ~100 MB main
# package) took 55m22s measured end to end (npm accepted the upload
# 10:58:30Z, the registry served it 11:53:52Z). The previous 1500s
# budget gave up long before that and the run failed with the
# package still in flight, leaving the fleet on the old version.
# Budget ~1 hour for a main-package release and treat anything past
# 90 minutes as anomalous. The wait polls every 30s, so fast
# publishes still resolve immediately.
RESOLVE_TIMEOUT_SECONDS: '5400'
Comment thread
yiliang114 marked this conversation as resolved.
Comment thread
yiliang114 marked this conversation as resolved.
RESOLVE_INTERVAL_SECONDS: '30'
run: |-
set -euo pipefail
Expand Down Expand Up @@ -97,9 +101,22 @@ jobs:
# package dir (ENOTEMPTY). Clear trash left by crashed installs
# and retry through the seconds-long race window.
PKG_DIR='/usr/local/lib/node_modules/@qwen-code'
# --prefix pins the install to /usr/local: on the hk-4/hk-5
# machines root's npm global prefix is a custom Node directory
# (/usr/local/lib/nodejs/node-v22.23.2-linux-x64), so without
# it the update landed there while the pool kept resolving the
# stale /usr/local/bin/qwen -> /usr/local/lib/node_modules copy.
# Some pool machines have no passwordless sudo for the runner
# user; fall back to installing as that user, which works when
# it owns the prefix.
if sudo -n true 2>/dev/null; then
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
INSTALL=(sudo env -u NPM_CONFIG_PREFIX)
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
else
INSTALL=(env)
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
fi
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
for attempt in 1 2 3; do
sudo rm -rf "${PKG_DIR}"/.qwen-code-* 2>/dev/null || true
if sudo env -u NPM_CONFIG_PREFIX npm install -g --registry=https://registry.npmjs.org "@qwen-code/qwen-code@${VERSION}"; then
if "${INSTALL[@]}" npm install -g --prefix /usr/local --registry=https://registry.npmjs.org "@qwen-code/qwen-code@${VERSION}"; then
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
exit 0
fi
if [[ "${attempt}" -lt 3 ]]; then
Expand All @@ -121,6 +138,18 @@ jobs:
actual="$("${qwen_path}" --version)"
echo "qwen path: ${qwen_path}"
echo "qwen version: ${actual}"
if [[ "${actual}" != "${VERSION}" ]]; then
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
# Diagnose where the stale binary comes from before failing:
# the install step's npm may write to a different prefix than
# the one `command -v` resolves on this pool.
echo "--- diagnostics ---"
echo "readlink: $(readlink -f "${qwen_path}" 2>/dev/null || echo '(not a link)')"
ls -la /usr/local/bin/qwen /usr/bin/qwen 2>/dev/null || true
echo "npm prefix (sudo): $(sudo env -u NPM_CONFIG_PREFIX npm prefix -g 2>/dev/null || true)"
Comment thread
yiliang114 marked this conversation as resolved.
Outdated
sudo cat /usr/local/lib/node_modules/@qwen-code/qwen-code/package.json 2>/dev/null | grep '"version"' || true
sudo ls /usr/local/lib/node_modules/@qwen-code/ 2>/dev/null || true
echo "--- end diagnostics ---"
fi
test "${actual}" = "${VERSION}"

# A failed fleet update is otherwise invisible. `qwen-code-pr-review.yml` and
Expand Down
5 changes: 4 additions & 1 deletion scripts/tests/update-ecs-runner-qwen-workflow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ const DEFAULT_JOBS = jobsFixture({
describe('ECS runner qwen update workflow', () => {
it('installs without the selected runner npm prefix', () => {
expect(workflow).toContain('cd "${RUNNER_TEMP:?}"');
expect(workflow).toContain('sudo env -u NPM_CONFIG_PREFIX npm install -g');
expect(workflow).toContain('INSTALL=(sudo env -u NPM_CONFIG_PREFIX)');
expect(workflow).toContain(
'"${INSTALL[@]}" npm install -g --prefix /usr/local',
);
});

it('runs only when this workflow changes on main', () => {
Expand Down
Loading