Repository navigation
test: keep npm's debug logs and Verdaccio's timestamps when a journey install fails - #3581
Conversation
… install fails Three journey lanes failed on 2026-12-02 with only `setup exited 3: Dependency install failed: npm install`. setup.stderr.log held npm's last line (ECONNRESET, network aborted) and verdaccio.log an uplink ESOCKETTIMEDOUT, but nothing tied the two in time and npm's debug log, the one with every request and its timing, stayed in the lane's npm cache, which is not uploaded. Copy the lane's npm debug logs into its diagnostics, and timestamp Verdaccio's log lines. `pretty-timestamped` only takes effect under the current `log` key, not the deprecated `logs` list, which also drops Verdaccio's deprecation warning. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVbPErbwzmWcPYv1gS
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain in the npm diagnostic-log collection and Verdaccio logging changes.
No open issues 🎉
What changed in this PR
Improves consumer journey failure diagnostics so npm request failures can be correlated with Verdaccio logs, without changing shipped behavior.
Changes:
- Copies lane-local npm debug logs into collected diagnostics.
- Enables timestamped Verdaccio output using the current
logconfiguration key.
| File | Description |
|---|---|
e2e/journey/scripts/run-local.mjs |
Collects npm cache debug logs under npm-logs. |
e2e/journey/scripts/local-registry.mjs |
Enables timestamped logging and replaces the deprecated logs key. |
Review effort: Balanced
Context
journey:nuxtandjourney:vuefailed.journey:preexisting-nuxtfailed.All three lanes printed only
setup exited 3: Dependency install failed: npm install, after 75–137 s insetup.Summary
What the uploaded diagnostics already showed
setup.stderr.log, the same in all three lanes:npm error code ECONNRESET/npm error network aborted. npm's full debug log stayed in the lane's npm cache (<lane>/.npm-cache/_logs), which is not uploaded.verdaccio.log: an uplinkESOCKETTIMEDOUT(the 60 stimeoutinlocal-registry.mjs), thenabortedandERR_HTTP_HEADERS_SENT.@vue/runtime-dom-3.5.46.tgz(vue),rollup-plugin-visualizer-7.3.0.tgz(nuxt) and one in the preexisting-nuxt lane.The mechanism
200before it asks npmjs:runtime-dom's200is logged 36 lines before itsmaking requestto the uplink.registry.npmjs.orgthen sends nothing for 60 s, Verdaccio can only abort a response npm has already accepted.tarballStream) retries a tarball only onEINTEGRITY,Z_DATA_ERROR,ENOENTandEISDIR, never on a body that aborts. One stalled stream fails the install.What it is not
ConflictError: this package is already presentlines are two concurrent npm requests for one tarball inside a single lane, and they are harmless.registry.npmjs.orggoing silent for at least 60 s while the runner was fully loaded. That is outside the repository: npm's CDN or the runner's egress.This PR: make the next one diagnosable
run-local.mjscopies the lane's npm debug logs intodiagnostics/<variant>/<framework>/npm-logs/. They hold every request with its status and timing.local-registry.mjstimestamps Verdaccio's log lines withpretty-timestamped, so a stalled tarball lines up between the two logs.pretty-timestampedonly works under the currentlogkey; under the deprecatedlogslist it printed no timestamps. Switching keys also drops Verdaccio's deprecation warning.Not in this PR: options to remove the failure
These need a decision; each is out of scope for a diagnostics change.
zitadel setupcould retrynpm installonce on a network-class npm error. Customers on flaky networks would benefit too, but it is product behavior and needs a changeset and SKILL.md.npm installskips them, and rerunningsetupon the scaffolded directory takes the patch path instead.Validation
vitest run --config journey/vitest.config.ts journey/scripts/local-registry.test.mjs(frome2e/): 9 pass.log:line: each line is prefixed[2026-12-02 19:09:41]. The oldlogs:list with the same format printed none.<npm_config_cache>/_logs/. That is the path the CI error message names (<frameworkWorkDir>/.npm-cache/_logs), and the one now copied.biome checkon both files: clean.Release notes / changeset
Notes
Generated by Claude Code