Skip to content

Conversation

@jsuereth
Copy link
Contributor

@jsuereth jsuereth commented Feb 1, 2026

This Fixes a few things in the build.

  • First it forces a specific version for node and using pnpm as a package manager.
  • Second, it only issues warnings from build.rs if node is not build, and warnings if it is not up to date. It should not longer try to call node executables from inside cargo.
  • Last, it tries to do more fine-grained detection of staleness checks in build.rs to give better guidance on what you need to call to fix things.

This Fixes a few things in the build.

- First it forces a specific version for npm + node - the LTS version
- Second, it allows cargo to leverage docker in the event your local NPM fails (this may need to be configured better)
- Finally, this provides a better caching mechanism for cargo so we're not constantly farming out to `npm`.  This is pretty critical for the docker fallback.
@jsuereth jsuereth requested a review from a team as a code owner February 1, 2026 18:10
@jsuereth
Copy link
Contributor Author

jsuereth commented Feb 1, 2026

@jerbly Could really use your help trying this out.

If I've done this right, then you should have nothing to change because you're on LTS of node. Additionally, any machine that's on a different version will fallback to using docker to pull in the LTS version of node.

PTAL and let me know what you think!

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.0%. Comparing base (635c682) to head (788b459).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1173   +/-   ##
=====================================
  Coverage   79.9%   80.0%           
=====================================
  Files        109     109           
  Lines       8586    8586           
=====================================
+ Hits        6868    6869    +1     
+ Misses      1718    1717    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jerbly
Copy link
Contributor

jerbly commented Feb 2, 2026

@jsuereth - To have npm ci work I had to match the exact version of npm that's in the docker container, 11.6.2. This is a slightly old version. On 11.8.0, the latest, npm ci fails and therefore falls back to the docker container to build.
So, I would guess that we'll end up always building with the docker container since the version matching seems so exact.

@jsuereth jsuereth changed the title Force npm + node versions for UI Switch to pnpm and force its usafe for UI - Remove npm calls from build.rs Feb 12, 2026
Copy link
Contributor

@jerbly jerbly left a comment

Choose a reason for hiding this comment

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

LGTM

@jsuereth jsuereth merged commit 8c1dfdb into open-telemetry:main Feb 12, 2026
26 checks passed
@jsuereth jsuereth deleted the chore-lock-node-version-and-docker-backup branch February 12, 2026 21:04
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.

2 participants