CLXP-879: resilient node version-manager step (nvm β n fallback)#156
Merged
Conversation
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #156 +/- ##
=======================================
Coverage 75.12% 75.12%
=======================================
Files 19 19
Lines 619 619
=======================================
Hits 465 465
Misses 154 154 β View full report in Codecov by Harness. π New features to boost your workflow:
|
update-node's post-bump verification hard-coded `nvm`, but the CodeBuild PR-hook images ship `n` (the buildspec runs `n auto`). On a node bump the `. $NVM_DIR/nvm.sh` source failed with "cannot open /root/.nvm/nvm.sh" (exit 2), turning the master-webhook auto-bump builds red β though deploys were unaffected. Use nvm when present, fall back to `n auto`, and no-op gracefully when neither exists so a missing manager can never red the build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ea88a46 to
2723be1
Compare
chrisdugne
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
update-nodeauto-bump bot runs in the master-webhook PR-hook CodeBuild builds (coorp-PR-codebuild-<svc>-AllTheTests,post_build,npm run update -- --auto). On a Node bump it hard-coded:But the CodeBuild images ship
n, notnvm(the buildspec usesn auto). So the source failed:β red webhook builds across api-progression, cockpit, connect, β¦ The deploy pipelines were never affected (this step isn't in the
Build_and_Deploystage), but the auto-bump PRs silently stopped. The integration test masked the bug via the stubtest/integration/nvm.sh.Fix
Make the version-manager activation resilient: use nvm when present (dev machines + integration stub), fall back to
n auto(CI images), and no-op when neither exists so a missing manager can never red a build.Verification (
/bin/sh, the shell execa uses)nnpresent (CodeBuild)n auto, exit 0 βVersion bumped 7.7.0 β 7.7.1. Consumers pin
^7.2.0, so once published the next master push picks it up onnpm ciβ no per-repo change needed.π€ Generated with Claude Code