From 4e9ed5a68e37c92bf261ecb71048abef8a186228 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 2 Sep 2026 13:46:59 +0200 Subject: [PATCH] test(e2e): Always run create-remix-app-v2 with orchestrion Orchestrion is always used now, so the `INJECT_ORCHESTRION` split in the create-remix-app-v2 E2E app was redundant. It ran as two CI jobs: a default one without orchestrion (DB and build-injection tests skipped) and an orchestrion variant that force-bundled/transformed the instrumented deps, booted real databases and ran everything. Collapse this into a single always-orchestrion run: drop the `sentryTest.variants` block and the `:orchestrion` scripts, add `sentryOrchestrionPlugin()` unconditionally, always boot MySQL/Redis via the Playwright global setup, and remove the `INJECT_ORCHESTRION` skip guards so the DB and build-time injection suites become part of the regular run. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01SFugqE3KWYfwqEfqEbjLsB --- .../create-remix-app-v2/package.json | 13 +------------ .../create-remix-app-v2/playwright.config.mjs | 16 ++++++---------- .../tests/build-injection.test.ts | 4 +--- .../create-remix-app-v2/tests/db.test.ts | 6 ++---- .../create-remix-app-v2/vite.config.ts | 11 ++++------- 5 files changed, 14 insertions(+), 36 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json index c2e57047bd2b..269fe3571de7 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json @@ -9,9 +9,7 @@ "typecheck": "tsc", "clean": "npx rimraf node_modules pnpm-lock.yaml", "test:build": "pnpm install && pnpm build", - "test:assert": "pnpm playwright test", - "test:build:orchestrion": "INJECT_ORCHESTRION=true pnpm test:build", - "test:assert:orchestrion": "INJECT_ORCHESTRION=true pnpm test:assert && INJECT_ORCHESTRION=true TEST_ENV=development pnpm playwright test db" + "test:assert": "pnpm playwright test && TEST_ENV=development pnpm playwright test db" }, "dependencies": { "@sentry/remix": "file:../../packed/sentry-remix-packed.tgz", @@ -43,15 +41,6 @@ "resolutions": { "@types/react": "18.2.22" }, - "sentryTest": { - "variants": [ - { - "build-command": "pnpm test:build:orchestrion", - "assert-command": "pnpm test:assert:orchestrion", - "label": "create-remix-app-v2 (orchestrion)" - } - ] - }, "volta": { "extends": "../../package.json" } diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.mjs b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.mjs index 3540ff4884f0..cccd1736e6b3 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.mjs +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.mjs @@ -1,8 +1,6 @@ import { getPlaywrightConfig } from '@sentry-internal/test-utils'; import { fileURLToPath } from 'url'; -const injectOrchestrion = process.env.INJECT_ORCHESTRION === 'true'; - // `remix vite:dev` ignores PORT, so the port goes on the command. The dev server has no // bundle, so the SDK is loaded through `--import` the way `pnpm start` does it. const startCommand = @@ -14,14 +12,12 @@ const config = getPlaywrightConfig( { startCommand, }, - // The orchestrion variant exercises real MySQL/Redis. Boot them before the tests run, - // outside the webServer startup-timeout window. In the default variant no DB is needed. - injectOrchestrion - ? { - globalSetup: fileURLToPath(new URL('./global-setup.mjs', import.meta.url)), - globalTeardown: fileURLToPath(new URL('./global-teardown.mjs', import.meta.url)), - } - : {}, + // The DB tests exercise real MySQL/Redis. Boot them before the tests run, outside the + // webServer startup-timeout window. + { + globalSetup: fileURLToPath(new URL('./global-setup.mjs', import.meta.url)), + globalTeardown: fileURLToPath(new URL('./global-teardown.mjs', import.meta.url)), + }, ); export default config; diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/build-injection.test.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/build-injection.test.ts index 714cfd5e9d6e..a90ccf1feddf 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/build-injection.test.ts +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/build-injection.test.ts @@ -7,10 +7,8 @@ import { expect, test } from '@playwright/test'; // failed to load, the deps would stay external and the runtime `--import` hook would // inject the channels at runtime instead - the span tests would still pass. These // assertions inspect the built server bundle directly so a broken plugin can't hide -// behind that runtime fallback. Only relevant in the orchestrion variant. +// behind that runtime fallback. test.describe('orchestrion build-time injection', () => { - test.skip(process.env.INJECT_ORCHESTRION !== 'true', 'Only runs in the orchestrion variant'); - const serverBundle = readFileSync(path.join(process.cwd(), 'build/server/index.js'), 'utf8'); test('force-bundles the instrumented deps instead of externalizing them', () => { diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/db.test.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/db.test.ts index 74cf5ae27e5f..28d38d56db88 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/db.test.ts +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/db.test.ts @@ -1,11 +1,9 @@ import { expect, test } from '@playwright/test'; import { waitForTransaction } from '@sentry-internal/test-utils'; -// These assertions only hold in the orchestrion variant (INJECT_ORCHESTRION=true), which -// force-bundles + transforms mysql/ioredis and boots the databases via docker-compose. +// Orchestrion force-bundles + transforms mysql/ioredis at build time, and the databases +// are booted via docker-compose in the Playwright global setup. test.describe('orchestrion DB instrumentation', () => { - test.skip(process.env.INJECT_ORCHESTRION !== 'true', 'Only runs in the orchestrion variant'); - test('Instruments ioredis automatically via orchestrion', async ({ baseURL }) => { const transactionEventPromise = waitForTransaction('create-remix-app-v2', transactionEvent => { return ( diff --git a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/vite.config.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/vite.config.ts index a0a15e923f76..42372f108ba8 100644 --- a/dev-packages/e2e-tests/test-applications/create-remix-app-v2/vite.config.ts +++ b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/vite.config.ts @@ -4,19 +4,16 @@ import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite'; import { defineConfig } from 'vite'; import tsconfigPaths from 'vite-tsconfig-paths'; -const injectOrchestrion = process.env.INJECT_ORCHESTRION === 'true'; - export default defineConfig({ plugins: [ remix({ ignoredRouteFiles: ['**/.*'], }), sentryRemixVitePlugin(), - // In the orchestrion variant, run the orchestrion code transform over the SSR - // server bundle and force-bundle the instrumented deps (mysql, ioredis, - // @remix-run/server-runtime, …) so their diagnostics-channel calls are injected - // at build time. - ...(injectOrchestrion ? [sentryOrchestrionPlugin()] : []), + // Run the orchestrion code transform over the SSR server bundle and force-bundle the + // instrumented deps (mysql, ioredis, @remix-run/server-runtime, …) so their + // diagnostics-channel calls are injected at build time. + sentryOrchestrionPlugin(), tsconfigPaths(), ], });