Skip to content

chore(NODE-7512): add Windows Node Latest to smoke test configuration#4940

Open
RaschidJFR wants to merge 4 commits into
mongodb:mainfrom
RaschidJFR:feat/NODE-7512_smoke_test_windows
Open

chore(NODE-7512): add Windows Node Latest to smoke test configuration#4940
RaschidJFR wants to merge 4 commits into
mongodb:mainfrom
RaschidJFR:feat/NODE-7512_smoke_test_windows

Conversation

@RaschidJFR
Copy link
Copy Markdown

@RaschidJFR RaschidJFR commented May 15, 2026

Description

Summary of Changes

This PR adds Windows testing for the latest Node.js version (currently 25.x) to the smoke test configuration. Previously, latest Node.js testing was only performed on RHEL 8.

Changes:

  • Updated the regex filter in .evergreen/generate_evergreen_tasks.js:420 to include Windows in addition to RHEL for latest Node smoke tests: os.match(/^(rhel|windows)/)
  • Generated new build variant windows-2022-latest-large-node-latest in .evergreen/config.yml with comprehensive test coverage across all MongoDB server versions (4.2-latest) and topologies

What is the motivation for this change?

See Jira ticket NODE-7512.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@RaschidJFR RaschidJFR requested a review from a team as a code owner May 15, 2026 19:01
Copilot AI review requested due to automatic review settings May 15, 2026 19:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Windows (windows-2022-latest-large) to the latest Node.js smoke test matrix, which previously only ran on RHEL 8. The generator's regex is broadened and the corresponding generated build variant is committed to config.yml.

Changes:

  • Broaden the latest-Node smoke test OS filter to include windows in addition to rhel.
  • Add the auto-generated windows-2022-latest-large-node-latest build variant covering all server versions and topologies.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.evergreen/generate_evergreen_tasks.js Updates regex to enable latest-Node smoke variant for Windows OS variants.
.evergreen/config.yml Adds the generated Windows Node Latest build variant with full server/topology task coverage.

@dariakp dariakp changed the title chore: add Windows Node Latest to smoke test configuration chore(NODe-7512): add Windows Node Latest to smoke test configuration May 16, 2026
@tadjik1 tadjik1 self-assigned this May 18, 2026
@tadjik1 tadjik1 added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label May 18, 2026
@tadjik1 tadjik1 changed the title chore(NODe-7512): add Windows Node Latest to smoke test configuration chore(NODE-7512): add Windows Node Latest to smoke test configuration May 18, 2026
tadjik1 added 3 commits May 21, 2026 09:39
…st variant

The node-latest smoke test build variant was missing CLIENT_ENCRYPTION from
its expansions when clientEncryption is false (as it is on Windows per NODE-3401).
run-tests.sh requires the var to be exactly "true" or "false" and exits 1
otherwise, causing all Windows node-latest tasks to fail before any tests run.

Align with the regular variant loop by always emitting String(!!clientEncryption)
instead of conditionally setting it only when truthy.
On some Windows Evergreen hosts, install-node.sh resolves NODE_ARTIFACTS_PATH
to Z: (via realpath following an NTFS junction) but DRIVERS_TOOLS is always
set to C: by prepare-shell.sh. When run-tests.sh later calls
init-node-and-npm-env.sh via the C: path, NODE_ARTIFACTS_PATH gets recomputed
to C: and npm is not found.

Fix by persisting the correctly-resolved NODE_ARTIFACTS_PATH to
$DRIVERS_TOOLS/.env in install-dependencies.sh, and restoring it in
run-tests.sh if npm is inaccessible after init-node-and-npm-env.sh runs.
Comment on lines +15 to +23
# On Windows, install-node.sh resolves SCRIPT_DIR via realpath which may follow an NTFS
# junction (e.g. C: -> Z:), so NODE_ARTIFACTS_PATH is now correctly set to the real drive.
# Persist it to .env so that subsequent shells (e.g. run-tests.sh) can recover it even
# when they call init-node-and-npm-env.sh via the C: DRIVERS_TOOLS path.
if [ "${OS:-}" = "Windows_NT" ] && [ -n "${NODE_ARTIFACTS_PATH:-}" ]; then
echo "NODE_ARTIFACTS_PATH=${NODE_ARTIFACTS_PATH}" >> "${DRIVERS_TOOLS}/.env"
fi
_INSTALL_DEPS_NODE_ARTIFACTS_PATH="${NODE_ARTIFACTS_PATH:-}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Strictly speaking this change is not covered by the ticket AC, however I've discovered that tests are flaky some particular windows hosts (like this one), so I decided to include fix here. Please let me know if you prefer more formal process of ticket->separate PR, otherwise I would update PR description and ticket AC.

@tadjik1 tadjik1 force-pushed the feat/NODE-7512_smoke_test_windows branch from 141fd97 to cd4f890 Compare May 21, 2026 12:20
@tadjik1 tadjik1 requested a review from a team May 22, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants