-
Notifications
You must be signed in to change notification settings - Fork 119
fix(ci): bootstrap npm from tarball when runner's bundled npm is broken #3010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@inkeep/agents-core": patch | ||
| --- | ||
|
|
||
| Fix release workflow npm bootstrap for OIDC publishing | ||
|
Comment on lines
+1
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 MAJOR: Changeset should not exist for CI-only changes Issue: This changeset attributes a CI workflow fix to Why: Creating a changeset for this workflow-only change will trigger an unnecessary patch version bump of Fix: Delete this changeset file. The workflow fix does not require a version bump of any package. From AGENTS.md:
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,7 +45,17 @@ jobs: | |||||||||||||||||
| registry-url: "https://registry.npmjs.org" | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Ensure npm 11.5.1+ for OIDC support | ||||||||||||||||||
| run: npm install -g npm@latest | ||||||||||||||||||
| run: | | ||||||||||||||||||
| if npm install -g npm@latest 2>/dev/null; then | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 MAJOR: Error suppression hides legitimate failures Issue: The Why: When the primary upgrade path fails for any reason other than the specific Fix: Consider checking for the specific error pattern instead of blanket suppression: if npm install -g npm@latest 2>&1 | tee /tmp/npm-upgrade.log; then
echo "npm upgraded via bundled npm"
elif grep -qE 'MODULE_NOT_FOUND|Cannot find module' /tmp/npm-upgrade.log; then
echo "::warning::Bundled npm broken, bootstrapping from tarball"
# ... fallback logic
else
echo "::error::npm upgrade failed for unknown reason"
cat /tmp/npm-upgrade.log
exit 1
fiRefs: |
||||||||||||||||||
| echo "npm upgraded via bundled npm" | ||||||||||||||||||
| else | ||||||||||||||||||
| echo "::warning::Bundled npm broken, bootstrapping from tarball" | ||||||||||||||||||
| NPM_VER=$(node -e "fetch('https://registry.npmjs.org/npm/latest').then(r=>r.json()).then(d=>console.log(d.version))") | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If
Suggested change
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Minor: Consider using curl for version lookup Issue: The fallback uses Why: This avoids any Node.js environment dependency in the fallback path. If npm is broken, other aspects of the Node environment might also be affected. Fix:
Suggested change
Refs:
|
||||||||||||||||||
| curl -fsSL "https://registry.npmjs.org/npm/-/npm-${NPM_VER}.tgz" | tar xz -C /tmp | ||||||||||||||||||
| node /tmp/package/bin/npm-cli.js install -g "npm@${NPM_VER}" | ||||||||||||||||||
| rm -rf /tmp/package | ||||||||||||||||||
| fi | ||||||||||||||||||
| echo "npm $(npm --version)" | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Setup Turborepo cache | ||||||||||||||||||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changeset should be removed. The change is to
.github/workflows/release.yml— internal CI tooling, not published code in@inkeep/agents-core. Per repo conventions, internal tooling/scripts changes do not get changesets. Merging this would trigger a spurious patch release ofagents-corewith zero code changes to the package.If the goal is to trigger a publish run to verify the fix, a
workflow_dispatchon the release workflow achieves the same thing without a no-op version bump.