Skip to content

[APPS-2961] Add: CI matrix running local execution against real Vite 7 and 8 installs - #606

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
tiffany.trinh/apps-2961-vite-version-matrix
Oct 28, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
tiffany.trinh/apps-2961-vite-version-matrix

Conversation

@tyffical

@tyffical tyffical commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Architecture

flowchart TD
    A["CI matrix leg (Vite N)"] -->|npm pack| B["datadog-vite-plugin.tgz"]
    A --> C["node --test local-execution.mjs"]
    C --> D["Temp project: vite@N + the tgz + @datadog/apps-backend, npm install"]
    B --> D
    D --> E["Real dev server with datadogVitePlugin, fake Datadog API via fetch"]
    E -->|"POST /__dd/executeAction"| G["Assertions on each response"]
Loading
  • The suite runs the packed plugin's built entry by path, so it resolves vite from the temp project like a customer install.

Changes

6 changes across ci.yaml and local-execution.mjs
What changed File
A matrix job, after the unit tests, packs the plugin and runs the suite on Vite 7.3.7 and 8.3.3. ci.yaml
The job reuses the unit tests' build cache read-only, checks out without credentials and has read-only permissions. ci.yaml
An Apps local execution result job gives the matrix one stable check name. ci.yaml
A node:test suite installs the tgz with one exact Vite version in a temp project and drives a real dev server, with telemetry off. local-execution.mjs
It checks fresh state per call, parallel calls, the permission model and prefixed logs. local-execution.mjs
Every leg checks $.Source through @datadog/apps-backend. local-execution.mjs

QA Instructions

  • The suite passes on Vite 7.3.7 and 8.3.3 under Node 20.19.4 and Node 24.22.1, verified at 71953bda.
Check Result Evidence
Vite 7.3.7 and 8.3.3, Node 20.19.4 Pass Every test passes; one import.meta.resolve warning per leg.
Vite 7.3.7 and 8.3.3, Node 24.22.1 Pass Every test passes, no warnings.
No env vars set Fails as intended Error: Set DD_APPS_TEST_VITE_VERSION and DD_APPS_TEST_PLUGIN_TGZ.
Typecheck, lint, integrity Pass Exit 0, no file changes.
Apps unit tests Pass
yarn typecheck:all && yarn lint && yarn cli integrity  # Expected: exit 0, no changes
TMPDIR=/private/tmp yarn test:unit packages/plugins/apps  # Expected: all pass
# From a checkout outside the temp dir, after yarn build:all:
cd packages/published/vite-plugin && npm pack --ignore-scripts --pack-destination /tmp/pack && cd -
mv /tmp/pack/datadog-vite-plugin-*.tgz /tmp/pack/datadog-vite-plugin.tgz
for v in 7.3.7 8.3.3; do
  DD_APPS_TEST_VITE_VERSION=$v DD_APPS_TEST_PLUGIN_TGZ=/tmp/pack/datadog-vite-plugin.tgz \
    node --test packages/tests/src/apps-vite-versions/local-execution.mjs
done  # Expected: each version passes; repeat under Node 24 with `volta run --node 24 -- node --test ...`
node --test packages/tests/src/apps-vite-versions/local-execution.mjs  # Expected: fails, asking for both env vars
Output for Vite 8.3.3 under Node 20.19.4
# [warn|vite|apps] Local execution on Node.js 20.19.4 can't provide `import.meta.resolve` inside the sandbox; production runs Node 24. Upgrade to Node 22.15+ to match it.
    ok 1 - module state is fresh per call, each in its own process
    ok 2 - concurrent calls run in parallel
    ok 3 - the sandbox refuses writes outside the temp dir and subprocesses, and allows temp writes
    ok 4 - $.Source resolves through @datadog/apps-backend
    ok 5 - console output reaches the dev server's terminal, prefixed with its call
ok 1 - Local execution on Vite 8.3.3
# pass 5
# fail 0

Blast Radius

  • No feature flag: CI and test code only; the plugin is unchanged.
  • Low risk: two extra CI legs of 21 to 29 seconds each, run after the unit tests beside the end-to-end shards.

Out of Scope / Follow-ups

5 items deferred
Item Status Next step
The suite loads the plugin's built entry by path, so the published exports map isn't covered. Deliberate Cover it with a pack that applies publishConfig.
The temp project's npm install isn't locked. Accepted The job is read-only, has no credentials and skips install scripts.
The matrix runs only after the unit tests pass, to reuse their build. Accepted Give the build its own job if matrix signal is needed when unit tests fail.
The suite doesn't probe worker threads; the Jest suite does. Deferred Add a worker probe.
Apps local execution isn't a required check on master, so a red leg doesn't block merging. Deferred Add it to the master ruleset's required checks once this merges.

Documentation

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Live Debugger Runtime Benchmark

SDK-loaded dormant-probe runtime overhead, measured against an uninstrumented bundle in the same browser session.

Browser Workload Quality Per-call overhead upper
chrome Hot clean <= 2.58 ns
chrome Tiny clean <= 0.01 ns
firefox Hot clean <= 9.92 ns
firefox Tiny clean <= 0.03 ns
safari Hot clean <= 5.50 ns
safari Tiny clean <= 0.46 ns

What do the Tiny and Hot workloads represent?

Browser Debugger SDK: 7.16.2 · built 2026-10-27 · S3 ETag 872de873

Full diagnostics
browser  workload  quality  per-call overhead upper  overhead upper          95% CI        A/A diag        block CI  acf(1)   baseline  instrumented                         samples
-------  --------  -------  -----------------------  --------------  --------------  --------------  --------------  ------  ---------  ------------  ------------------------------
chrome   Hot       clean                 <= 2.58 ns        <= 5.19%   2.54..2.58 ns  -0.03..0.00 ns   2.54..2.58 ns   -0.02  52.590 ms     55.277 ms   102 (trim 20%, outliers 5.9%)
chrome   Tiny      clean                 <= 0.01 ns        <= 0.18%  -0.03..0.01 ns  -0.03..0.02 ns  -0.03..0.01 ns   -0.02  54.772 ms     54.703 ms  102 (trim 20%, outliers 16.7%)
firefox  Hot       clean                 <= 9.92 ns       <= 39.46%   9.90..9.92 ns  -0.01..0.01 ns   9.90..9.92 ns   -0.07  39.540 ms     55.120 ms   102 (trim 20%, outliers 8.8%)
firefox  Tiny      clean                 <= 0.03 ns        <= 0.18%   0.01..0.03 ns  -0.01..0.00 ns   0.01..0.03 ns   -0.02  59.320 ms     59.380 ms   102 (trim 20%, outliers 9.8%)
safari   Hot       clean                 <= 5.50 ns       <= 21.96%   5.48..5.50 ns  -0.00..0.01 ns   5.48..5.50 ns    0.36  45.260 ms     55.180 ms   102 (trim 20%, outliers 3.9%)
safari   Tiny      clean                 <= 0.46 ns       <= 12.28%   0.44..0.46 ns  -0.00..0.00 ns   0.44..0.46 ns    0.27  51.420 ms     57.600 ms   102 (trim 20%, outliers 3.9%)

Raw samples are in the live-debugger-runtime-bench-results artifact.

@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 93a01cb to 11af6d6 Compare October 21, 2026 19:41
@tyffical
tyffical changed the base branch from tiffany.trinh/apps-2961-shared-execution-helpers to tiffany.trinh/apps-2961-parallel-local-execution October 21, 2026 19:41
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from cfac113 to 401268c Compare October 21, 2026 19:51
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 11af6d6 to 1797661 Compare October 21, 2026 19:51
@tyffical
tyffical requested a balanced review from Copilot October 21, 2026 20:09
@tyffical

Copy link
Copy Markdown
Contributor Author

@codex review

@tyffical
tyffical added this pull request to stack #612 October 21, 2026 20:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-22T18:48:10.289942Z 676e2ce Manual request
ℹ️ 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.

@tyffical
tyffical marked this pull request as ready for review October 21, 2026 20:10
@tyffical
tyffical requested a review from a team as a code owner October 21, 2026 20:10
@tyffical
tyffical requested review from ameesha and removed request for a team October 21, 2026 20:10

Copilot AI 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.

🟢 Approval recommended

No blocking issues were identified in the CI configuration or test suite, and production code is unchanged.

No open issues 🎉

What changed in this PR

Adds real-install CI coverage for Apps local backend execution across Vite 5–8, complementing Jest coverage without changing production code.

Changes:

  • Adds five Vite matrix legs and a stable aggregate status check.
  • Adds integration tests for execution state, concurrency, sandbox restrictions, runtime context, and logs.
File Description
packages/​tests/​src/​apps-vite-versions/​local-execution.mjs Tests the packed plugin against fresh Vite installs.
.github/​workflows/​ci.yaml Runs the version matrix using cached builds and read-only permissions.

Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 1797661c4d

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@tyffical
tyffical requested review from Scott-Meyer and sdkennedy2 and removed request for ameesha October 21, 2026 20:18
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from 401268c to 002f14e Compare October 22, 2026 01:07
@tyffical
tyffical requested a review from a team as a code owner October 22, 2026 01:07
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 1797661 to 63840ca Compare October 22, 2026 01:07
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from 002f14e to f698ad5 Compare October 22, 2026 02:02
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 63840ca to ee4b237 Compare October 22, 2026 02:02
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from f698ad5 to 7e9b4b4 Compare October 22, 2026 03:37
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from ee4b237 to fbc33a2 Compare October 22, 2026 04:15
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from 7e9b4b4 to cf49bfa Compare October 22, 2026 15:29
@tyffical
tyffical removed this pull request from stack #618 October 26, 2026 20:54
@tyffical
tyffical added this pull request to stack #623 October 26, 2026 20:55
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch 2 times, most recently from fbd073c to f0977cc Compare October 27, 2026 00:54
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from dca1b43 to a4728ff Compare October 27, 2026 00:55
@tyffical tyffical changed the title [APPS-2961] Add: CI matrix running local execution against real Vite 5 to 8 installs [APPS-2961] Add: CI matrix running local execution against real Vite 7 and 8 installs Oct 27, 2026
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from f0977cc to a1c4904 Compare October 27, 2026 02:47
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from a4728ff to b728d76 Compare October 27, 2026 03:05
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from a1c4904 to 9ac932c Compare October 27, 2026 20:16
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from b728d76 to 7dc8a99 Compare October 27, 2026 20:16
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from 9ac932c to 00ec61c Compare October 28, 2026 05:39
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 7dc8a99 to 71953bd Compare October 28, 2026 05:40
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-parallel-local-execution branch from 00ec61c to 1ed9fb5 Compare October 28, 2026 16:12
@tyffical
tyffical force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from 71953bd to c47e2d5 Compare October 28, 2026 16:13
A matrix job packs the plugin, installs it with one Vite version (7.3.7
or 8.3.3) in a fresh project, and runs a node:test suite through the real
dev server: fresh module state per call in its own process, parallel calls
with prefixed logs, the sandbox, and $.Source. Jest can't load Vite 7+,
which ships ESM only. The job runs after the unit tests so it can restore
their build cache, never writes that cache, and has read-only permissions,
since its npm install isn't locked. A result job gives the matrix one
stable check name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot force-pushed the tiffany.trinh/apps-2961-vite-version-matrix branch from c47e2d5 to 4d36430 Compare October 28, 2026 16:34
@tyffical
tyffical removed this pull request from stack #623 October 28, 2026 16:38
Base automatically changed from tiffany.trinh/apps-2961-parallel-local-execution to master October 28, 2026 17:01
@tyffical

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-10-28 17:28:39 UTC ℹ️ Start processing command /merge


2026-10-28 17:28:42 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2m (p90).


2026-10-28 17:30:10 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 2a2c69a into master Oct 28, 2026
12 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the tiffany.trinh/apps-2961-vite-version-matrix branch October 28, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants