Skip to content

ci: drop redundant NodeGYP install step#789

Merged
joeyzhao2018 merged 1 commit into
mainfrom
zarir/fix-ci-node-gyp
Jun 16, 2026
Merged

ci: drop redundant NodeGYP install step#789
joeyzhao2018 merged 1 commit into
mainfrom
zarir/fix-ci-node-gyp

Conversation

@zarirhamza

@zarirhamza zarirhamza commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What

Removes the Install NodeGYP step from the unit-test matrix in .github/workflows/build.yml.

-      - name: Install NodeGYP
-        if: matrix.node-version == '20.19' || matrix.node-version == '22.11' || matrix.node-version == '24.11'
-        run: yarn global add node-gyp
-
       - name: Install dependencies
         run: yarn install

Why

Symptom

Every PR and main build was failing on Install NodeGYP with:

error proc-log@7.0.0: The engine "node" is incompatible with this module.
Expected version "^22.22.2 || ^24.15.0 || >=26.0.0". Got "20.19.6"
error Found incompatible module.
##[error]Process completed with exit code 1.

Root cause

node-gyp@13.0.0 bumped its transitive dependency on proc-log from ^6 to ^7. proc-log@7.0.0 tightened its engines.node declaration from ^20.17.0 || >=22.9.0 to ^22.22.2 || ^24.15.0 || >=26.0.0. None of the Node versions in our CI matrix satisfy the new constraint:

Matrix Node Satisfies proc-log@7 engines?
18.12 no (also excluded by the conditional)
20.19 no
22.11 no (needs 22.22.2+)
24.11 no (needs 24.15.0+)

Why drop rather than pin

node-gyp is a fallback tool used to compile native C/C++ addons from source at install time when no prebuilt binary is available. Two reasons this global install step is no longer earning its keep:

  1. The modern npm bundled with Node 20+ already ships its own node-gyp and uses it automatically when a native build is needed. Installing one globally is redundant.
  2. The 18.12 matrix entry has never run this step (the conditional excludes it) and yarn install succeeds there. That's direct evidence the global install isn't required for the current dep tree.

If a future native dependency genuinely needs a specific node-gyp on a specific Node version, we can reintroduce a scoped, pinned step then.

Alternatives considered

  • Pin to node-gyp@12 (which uses proc-log@^6): works but treats a symptom rather than the underlying redundancy.
  • --ignore-engines flag: silently masks engine mismatches in the future.

Scope

CI-only change. No runtime/source code touched.

Test plan

  • All four unit-test matrix jobs (18.12, 20.19, 22.11, 24.11) go green on this PR (especially yarn install and yarn build, which is where any missing-native-binary fallout would surface).
  • lint and build (...) jobs are unaffected.

@zarirhamza zarirhamza requested review from a team as code owners June 16, 2026 18:24
@zarirhamza zarirhamza requested a review from duncanista June 16, 2026 18:24
@datadog-official

This comment has been minimized.

@joeyzhao2018 joeyzhao2018 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

Comment thread .github/workflows/build.yml Outdated
restore-keys: |
${{ runner.os }}-yarn-
- name: Install NodeGYP
- name: Install NodeGYP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

on a 2nd thought, we should remove this NodeGYP installation step because it's intended for a fallback way to build some native C/C++ addons. Can we try remove this step entirely?

The unit-test matrix had a step that ran `yarn global add node-gyp` for
Node 20.19, 22.11, and 24.11. This started failing on every PR and on
main once node-gyp@13 released, because node-gyp@13 pulls
proc-log@7.0.0, which declares engines as
^22.22.2 || ^24.15.0 || >=26.0.0 -- rejecting every Node version in
our matrix.

Rather than pin around the upstream churn, drop the step. node-gyp is
only needed as a fallback to compile native addons at install time,
and the modern npm bundled with Node 20+ already ships its own
node-gyp for that purpose. The 18.12 matrix entry has never run this
step and installs cleanly, which is evidence the global install was
already redundant.

If a future native dependency genuinely needs node-gyp on a specific
Node version, we can reintroduce it with an explicit pin scoped to
that need.
@zarirhamza zarirhamza force-pushed the zarir/fix-ci-node-gyp branch from 0a7a3d9 to 5a2d2a2 Compare June 16, 2026 19:10
@zarirhamza zarirhamza changed the title ci: pin node-gyp to v12 to unblock CI matrix ci: drop redundant NodeGYP install step Jun 16, 2026
@joeyzhao2018 joeyzhao2018 merged commit 655f5f2 into main Jun 16, 2026
41 of 42 checks passed
@joeyzhao2018 joeyzhao2018 deleted the zarir/fix-ci-node-gyp branch June 16, 2026 19:29
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