You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To do npm trusted publishing for Selenium's release workflow, The current version of Node pinned in toolchain in MODULE.bazel changes from 22.22.0 to 24.18.0 to get a compatible npm version.
build: bump Bazel Node.js toolchain to 24.18.0 for npm trusted publishing
⚙️ Configuration changes✨ Enhancement🕐 Less than 5 minutes
AI Description
• Bump the Bazel-pinned Node.js toolchain from 22.22.0 to 24.18.0.
• Unblock npm trusted publishing by ensuring a compatible npm version in release workflows.
Diagram
graph TD
A["MODULE.bazel"] --> B["rules_nodejs toolchain"] --> C["npm / release workflow"]
subgraph Legend
direction LR
_cfg["Config"] ~~~ _tool["Toolchain"] ~~~ _flow["Workflow"]
end
Loading
High-Level Assessment
The following are alternative approaches to this PR:
1. Pin npm separately (keep Node 22)
➕ Avoids a major Node version jump if other tooling depends on Node 22 behavior
➕ Smaller surface-area change (npm-only)
➖ Harder to do cleanly in Bazel toolchain flows; npm is typically coupled to Node distribution
➖ May increase maintenance complexity and reduce reproducibility
2. Move publishing to a dedicated CI step with its own Node setup
➕ Decouples build toolchain from release/publishing requirements
➕ Lets publishing pick the minimal Node/npm version needed
➖ Adds divergence between Bazel-managed toolchains and CI environment
➖ More CI configuration and potential for drift
Recommendation: Bumping the Bazel-managed Node toolchain is the most straightforward way to ensure a compatible npm for trusted publishing while keeping builds reproducible. Consider a separate publishing-only Node setup only if the Node 24 bump causes downstream incompatibilities in build/test tooling.
Files changed (1) +1 / -1
Other (1) +1 / -1
MODULE.bazelUpdate rules_nodejs toolchain Node version to 24.18.0+1/-1
Update rules_nodejs toolchain Node version to 24.18.0
• Bumps the pinned Node.js toolchain version from 22.22.0 to 24.18.0 to align npm behavior/version with trusted publishing needs.
The publish matrix always includes a javascript leg and the skip decision happens inside the
run script, but the new node-version value makes the reusable bazel.yml workflow run
actions/setup-node before that skip check. A transient setup-node failure can therefore fail the
publish job and block downstream release steps even when JavaScript publishing was intended to be
skipped.
The publish job always includes javascript in its matrix and only skips JavaScript publishing
inside the provided run script. With the new node-version input, bazel.yml will run
actions/setup-node for the javascript matrix leg before executing that run script, meaning a
setup-node failure can fail the overall publish job; downstream github-release-publish
explicitly depends on publish.
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution
## Issue description
`release.yml` passes a non-empty `node-version` for the `javascript` matrix entry unconditionally. In the reusable workflow (`bazel.yml`), this triggers the `Setup Node` step before the `run` script gets to decide whether to skip publishing for that matrix leg, so a failure in Node setup can fail the overall `publish` job even when JavaScript publishing should be skipped.
## Issue Context
- `publish` always runs a matrix including `javascript`, and only skips inside `run` based on `needs.parse-tag.outputs.language`.
- `bazel.yml` executes `actions/setup-node` whenever `inputs.node-version != ''`, and this happens before the step that runs `${{ inputs.run }}`.
- `github-release-publish` depends on `publish`, so a failing matrix leg can block downstream release work.
## Fix
Update the `node-version` expression to only set a non-empty value when BOTH:
1) `matrix.language == 'javascript'`, and
2) the parsed tag indicates `all` or `javascript`.
For example:
```yaml
node-version: ${{ (matrix.language == 'javascript' && (needs.parse-tag.outputs.language == 'all' || needs.parse-tag.outputs.language == 'javascript')) && '24' || '' }}
```
## Fix Focus Areas
- .github/workflows/release.yml[129-156]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
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
B-buildIncludes scripting, bazel and CI integrations
2 participants
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.
To do npm trusted publishing for Selenium's release workflow, The current version of Node pinned in toolchain in MODULE.bazel changes from 22.22.0 to 24.18.0 to get a compatible npm version.