Skip to content

Commit 4e9ed5a

Browse files
mydeaclaude
andcommitted
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFugqE3KWYfwqEfqEbjLsB
1 parent 1e14108 commit 4e9ed5a

5 files changed

Lines changed: 14 additions & 36 deletions

File tree

dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"typecheck": "tsc",
1010
"clean": "npx rimraf node_modules pnpm-lock.yaml",
1111
"test:build": "pnpm install && pnpm build",
12-
"test:assert": "pnpm playwright test",
13-
"test:build:orchestrion": "INJECT_ORCHESTRION=true pnpm test:build",
14-
"test:assert:orchestrion": "INJECT_ORCHESTRION=true pnpm test:assert && INJECT_ORCHESTRION=true TEST_ENV=development pnpm playwright test db"
12+
"test:assert": "pnpm playwright test && TEST_ENV=development pnpm playwright test db"
1513
},
1614
"dependencies": {
1715
"@sentry/remix": "file:../../packed/sentry-remix-packed.tgz",
@@ -43,15 +41,6 @@
4341
"resolutions": {
4442
"@types/react": "18.2.22"
4543
},
46-
"sentryTest": {
47-
"variants": [
48-
{
49-
"build-command": "pnpm test:build:orchestrion",
50-
"assert-command": "pnpm test:assert:orchestrion",
51-
"label": "create-remix-app-v2 (orchestrion)"
52-
}
53-
]
54-
},
5544
"volta": {
5645
"extends": "../../package.json"
5746
}
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { getPlaywrightConfig } from '@sentry-internal/test-utils';
22
import { fileURLToPath } from 'url';
33

4-
const injectOrchestrion = process.env.INJECT_ORCHESTRION === 'true';
5-
64
// `remix vite:dev` ignores PORT, so the port goes on the command. The dev server has no
75
// bundle, so the SDK is loaded through `--import` the way `pnpm start` does it.
86
const startCommand =
@@ -14,14 +12,12 @@ const config = getPlaywrightConfig(
1412
{
1513
startCommand,
1614
},
17-
// The orchestrion variant exercises real MySQL/Redis. Boot them before the tests run,
18-
// outside the webServer startup-timeout window. In the default variant no DB is needed.
19-
injectOrchestrion
20-
? {
21-
globalSetup: fileURLToPath(new URL('./global-setup.mjs', import.meta.url)),
22-
globalTeardown: fileURLToPath(new URL('./global-teardown.mjs', import.meta.url)),
23-
}
24-
: {},
15+
// The DB tests exercise real MySQL/Redis. Boot them before the tests run, outside the
16+
// webServer startup-timeout window.
17+
{
18+
globalSetup: fileURLToPath(new URL('./global-setup.mjs', import.meta.url)),
19+
globalTeardown: fileURLToPath(new URL('./global-teardown.mjs', import.meta.url)),
20+
},
2521
);
2622

2723
export default config;

dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/build-injection.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import { expect, test } from '@playwright/test';
77
// failed to load, the deps would stay external and the runtime `--import` hook would
88
// inject the channels at runtime instead - the span tests would still pass. These
99
// assertions inspect the built server bundle directly so a broken plugin can't hide
10-
// behind that runtime fallback. Only relevant in the orchestrion variant.
10+
// behind that runtime fallback.
1111
test.describe('orchestrion build-time injection', () => {
12-
test.skip(process.env.INJECT_ORCHESTRION !== 'true', 'Only runs in the orchestrion variant');
13-
1412
const serverBundle = readFileSync(path.join(process.cwd(), 'build/server/index.js'), 'utf8');
1513

1614
test('force-bundles the instrumented deps instead of externalizing them', () => {

dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/db.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { expect, test } from '@playwright/test';
22
import { waitForTransaction } from '@sentry-internal/test-utils';
33

4-
// These assertions only hold in the orchestrion variant (INJECT_ORCHESTRION=true), which
5-
// force-bundles + transforms mysql/ioredis and boots the databases via docker-compose.
4+
// Orchestrion force-bundles + transforms mysql/ioredis at build time, and the databases
5+
// are booted via docker-compose in the Playwright global setup.
66
test.describe('orchestrion DB instrumentation', () => {
7-
test.skip(process.env.INJECT_ORCHESTRION !== 'true', 'Only runs in the orchestrion variant');
8-
97
test('Instruments ioredis automatically via orchestrion', async ({ baseURL }) => {
108
const transactionEventPromise = waitForTransaction('create-remix-app-v2', transactionEvent => {
119
return (

dev-packages/e2e-tests/test-applications/create-remix-app-v2/vite.config.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite';
44
import { defineConfig } from 'vite';
55
import tsconfigPaths from 'vite-tsconfig-paths';
66

7-
const injectOrchestrion = process.env.INJECT_ORCHESTRION === 'true';
8-
97
export default defineConfig({
108
plugins: [
119
remix({
1210
ignoredRouteFiles: ['**/.*'],
1311
}),
1412
sentryRemixVitePlugin(),
15-
// In the orchestrion variant, run the orchestrion code transform over the SSR
16-
// server bundle and force-bundle the instrumented deps (mysql, ioredis,
17-
// @remix-run/server-runtime, …) so their diagnostics-channel calls are injected
18-
// at build time.
19-
...(injectOrchestrion ? [sentryOrchestrionPlugin()] : []),
13+
// Run the orchestrion code transform over the SSR server bundle and force-bundle the
14+
// instrumented deps (mysql, ioredis, @remix-run/server-runtime, …) so their
15+
// diagnostics-channel calls are injected at build time.
16+
sentryOrchestrionPlugin(),
2017
tsconfigPaths(),
2118
],
2219
});

0 commit comments

Comments
 (0)