Skip to content

[RUM-18686] Electron OS and Version testing [windows] - #229

Merged
cdn34dd merged 7 commits into
mainfrom
carlosnogueira/RUM-18686/electron-os-and-version-testing-windows
Oct 6, 2026
Merged

cdn34dd merged 7 commits into
mainfrom
carlosnogueira/RUM-18686/electron-os-and-version-testing-windows

Conversation

@cdn34dd

@cdn34dd cdn34dd commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The compatibility workflow currently covers Linux and macOS. This PR adds Windows coverage across the same Electron targets, reusing the existing E2E and integration suites.

Windows introduces differences in command execution, filesystem paths, dependency packaging, and container display availability. These changes let the suites run on shared Windows runners and add regression coverage for Windows packaging failures.

This PR is stacked on carlosnogueira/RUM-15522/electron-os-and-version-test, with the diff starting after 9b408f3e.

Changes

The Windows workflow has three steps:

  1. Prepare the environment. Build a Windows Server 2022 container on the existing windows-v2:2022 runner. The image supplies Node, Yarn, Git, 7-Zip, and the Visual C++ runtime. No dedicated AMI or published image is required.
  2. Prepare apps and run tests. Mount the checkout read-only, copy sources into the short container path C:\w, and run the existing compatibility preparation and test commands. Host dependencies and previous build artifacts are excluded.
  3. Collect results and clean up. Save command logs, environment details, container state, target metadata, and available Playwright reports and traces. Remove only the container and image created by the job.

Windows adds seven jobs to the compatibility matrix, bringing the full Linux/macOS/Windows matrix to 21 jobs. Existing default-branch, manual, scheduled, filtering, and nightly failure policies continue to apply.

Supporting changes:

  • Replace Unix-specific build commands and resolve Windows Yarn/npm entry points without shell interpolation.
  • Fix WASM chunk naming for Windows paths and verify that CJS/ESM chunks remain lazy and included in the package allowlist.
  • Adapt crash-test cleanup and display assertions for Windows containers.
  • Retain two CI retries, print Windows test errors immediately, retain failure traces, and stop after three failures.
  • Generate child-pipeline YAML from structured objects, with tests preserving command strings and scalar types.

The Windows payload regression checks that default-copy dd-trace paths would exceed MAX_PATH at a long temporary destination, while output built with copyRuntimeDependencies: false extracts completely using Windows PowerShell 5.1. Separate packaging assertions verify dependency placement in app.asar. This covers the extraction regression without running a full MSIX build or signing pipeline.

Review guide

The main commits separate portable commands, WASM packaging, test changes, container execution, and CI integration. Suggested reading order:

  • Portable commands: scripts/lib/commandInvocation.ts, scripts/lib/command.ts, and the SDK/fixture build scripts.
  • WASM packaging: rollup.config.mjs and scripts/check-sdk-chunks.spec.ts.
  • Test coverage: e2e/playwright.config.ts, the crash scenarios, and e2e/integration/scenarios/windows-payload-extraction.scenario.ts.
  • Container execution: ci/windows/run.ps1, scripts/run-windows-container-tests.ts, and scripts/lib/windowsContainer.ts.
  • CI orchestration: scripts/lib/compatibilityCi.ts and e2e/compatibility/config.json.

Test instructions

On a Windows host with Docker configured for Windows containers, use a regular Git clone:

docker info --format '{{.OSType}}' # Must print windows

powershell -NoProfile -ExecutionPolicy Bypass `
  -File ci/windows/run.ps1 -Target electron-41

Process isolation is the default. Hosts that require and support Hyper-V isolation can add -Isolation hyperv.

To run the regular suites through the same container:

powershell -NoProfile -ExecutionPolicy Bypass `
  -File ci/windows/run.ps1 -Suite e2e

powershell -NoProfile -ExecutionPolicy Bypass `
  -File ci/windows/run.ps1 -Suite integration

To exercise the compatibility workflow in GitLab, manually start a pipeline with:

COMPATIBILITY_TESTS=true
DD_ELECTRON_COMPATIBILITY_ENVIRONMENTS=windows
DD_ELECTRON_COMPATIBILITY_TARGETS=electron-41

Leave the target filter empty to run all configured Electron versions on Windows.

@cdn34dd
cdn34dd added this pull request to stack #230 September 28, 2026 13:58
@cdn34dd
cdn34dd marked this pull request as ready for review September 28, 2026 14:03
@cdn34dd
cdn34dd requested a review from a team as a code owner September 28, 2026 14:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T12:57:42.194541Z cf9dd2c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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


PR Review — Quality: 5.0 / 5 · Review load: Broad

At 5.0 / 5 this is ready to merge from a code-review perspective: I am approving. The change extends the Electron compatibility matrix to Windows via a Server 2022 container workflow, makes build/test scripts portable (including Yarn/npm invocation without a shell), fixes WASM chunk detection on Windows paths, and hardens crash and telemetry scenarios for headless Windows environments. The added unit and integration coverage matches the new surfaces. Review load is Broad because container orchestration, command bootstrap semantics, and packaging behavior land together—worth a second pair of eyes on Windows CI, even though I have no blocking findings.

Customer impact: Low — default SDK behavior is unchanged; the rollup path normalization fixes Windows packaging for the WASM chunk, and the rest is CI, fixtures, and test infrastructure.

Concern
Windows container CI (image, workspace copy, GitLab matrix jobs) Risky
Portable command() / Yarn and npm JavaScript entry-point resolution on Windows Risky
Rollup WASM manualChunks path normalization and package allowlist checks Risky
Playwright reporting, crash predicates, and display-count assertions Routine
YAML-based compatibility pipeline generation and filters Routine

Quality — 5.0: The design is coherent end to end: host run.ps1 keeps Docker scope narrow, in-container preparation reuses the same yarn targets as Linux/macOS, and exclusions in copyWindowsContainerWorkspace mirror compatibility materialization. Command invocation and logged retries are well tested; the WASM regression test exercises real Rollup output; crash tests now filter on is_crash, which addresses realistic intake noise on Windows.

Review load — Broad: Three risky boundaries (CI containers, bootstrap commands, Windows packaging) ship in one stack, though commits separate them logically. A Windows-runner owner should sanity-check the first real matrix jobs; nothing here blocks on that alone.

Suggested split

Not required for merge. If you ever need to land pieces independently: (1) portable scripts + rollup WASM fix + chunk tests, (2) Playwright/scenario hardening, (3) Windows container + GitLab matrix enablement last (depends on 1–2). Commits e4284b57 / 048a83be / 9d852f08 / 1b989df7 / b674ee7d already follow that rough order.

Open in Web View Automation 

Sent by Cursor Automation: electron-sdk reviews

@sbarrio
sbarrio requested a review from bcaudan September 29, 2026 07:09
@cdn34dd
cdn34dd force-pushed the carlosnogueira/RUM-18686/electron-os-and-version-testing-windows branch from 4a6731e to d0d53ee Compare September 29, 2026 10:47
Base automatically changed from carlosnogueira/RUM-15522/electron-os-and-version-test to main September 29, 2026 17:07
@cdn34dd
cdn34dd force-pushed the carlosnogueira/RUM-18686/electron-os-and-version-testing-windows branch from d0d53ee to 8da4e56 Compare September 30, 2026 15:53
Comment thread ci/windows/run.ps1
Comment thread ci/windows/Dockerfile
Comment thread e2e/integration/scenarios/integration.scenario.ts Outdated
Comment thread e2e/integration/scenarios/windows-payload-extraction.scenario.ts Outdated
Comment thread scripts/lib/compatibilityCi.ts Outdated
Comment thread scripts/lib/compatibilityCi.ts Outdated
@cdn34dd
cdn34dd force-pushed the carlosnogueira/RUM-18686/electron-os-and-version-testing-windows branch from 8da4e56 to cf9dd2c Compare October 2, 2026 12:51
@cdn34dd
cdn34dd requested a review from bcaudan October 2, 2026 12:56

@bcaudan bcaudan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great!

@cdn34dd
cdn34dd merged commit e6624c5 into main Oct 6, 2026
25 checks passed
@cdn34dd
cdn34dd deleted the carlosnogueira/RUM-18686/electron-os-and-version-testing-windows branch October 6, 2026 07: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