Skip to content

test(node): Automatically run all node-integration tests with orchestrion#21911

Merged
mydea merged 7 commits into
developfrom
fn/test-orchestrion
Jul 2, 2026
Merged

test(node): Automatically run all node-integration tests with orchestrion#21911
mydea merged 7 commits into
developfrom
fn/test-orchestrion

Conversation

@mydea

@mydea mydea commented Jul 2, 2026

Copy link
Copy Markdown
Member

Instead of manually building test matrixes for this, this runs node 20 and node 26 integration tests created via createEsmAndCjsTests with orchestrion automatically on CI.

I choose to keep the custom matrix for mysql as a placeholder, so we can test the different ways to run orchestrion there manually. but IMHO other, following instrumentation can simply skip this and rely on the auto running.

For differences in runs you can use the isOrchestrionEnabled() helper both in runtime code as well as in test code.

@mydea mydea self-assigned this Jul 2, 2026
Comment thread dev-packages/node-integration-tests/suites/tracing/mysql/test.ts

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5f165ca. Configure here.

Comment thread dev-packages/node-integration-tests/utils/runner/createEsmAndCjsTests.ts Outdated
@mydea mydea marked this pull request as ready for review July 2, 2026 10:42
@mydea mydea requested a review from a team as a code owner July 2, 2026 10:42
@mydea mydea requested review from JPeer264 and andreiborza and removed request for a team July 2, 2026 10:42
@mydea mydea force-pushed the fn/test-orchestrion branch from a146b15 to 4bb53a3 Compare July 2, 2026 10:42

return startInactiveSpan({
name: sql ?? 'mysql.query',
kind: SPAN_KIND.CLIENT,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is actually a regression that was found by this change!

},
withEnv: function (env: Record<string, string>) {
withEnv = env;
withEnv = {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

change this to extend instead of overwrite this, aligning with how withFlags works.

@JPeer264 JPeer264 left a comment

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.

Pretty nice chance

}

/** Returns true if orchestrion is enabled in env vars. */
export function isOrchestrionEnabled(): boolean {

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.

l: This can be removed, seems to be a duplicate from the utils/index.ts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is needed for usage in scenario usage where you need to do e.g. import { isOrchestrionEnabled } from '@sentry-internal/node-integration-tests' while the one in utils is for in-test usage. at least this is our current differentiation, not 100% sure if we need this 😅

@mydea mydea merged commit d6e57b1 into develop Jul 2, 2026
294 checks passed
@mydea mydea deleted the fn/test-orchestrion branch July 2, 2026 12:43
chargome added a commit that referenced this pull request Jul 2, 2026
PR #21911 makes createEsmAndCjsTests run every node integration test under orchestrion
automatically (INJECT_ORCHESTRION), so the manual OTel/orchestrion variant matrix is no
longer needed. Collapse the apollo-graphql suite back to a single variant per scenario and
branch only the span origin on isOrchestrionEnabled(); drop the redundant
instrument-orchestrion.mjs (the runner injects experimentalUseDiagnosticsChannelInjection).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chargome added a commit that referenced this pull request Jul 2, 2026
Rely on `createEsmAndCjsTests` auto-running the suite with orchestrion on
CI (#21911) instead of a manual instrument matrix: drop
`instrument-orchestrion.mjs` and branch the expected span origin on
`isOrchestrionEnabled()`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chargome added a commit that referenced this pull request Jul 2, 2026
develop now runs all node-integration tests a second time with INJECT_ORCHESTRION
(#21911). Under orchestrion, ioredis <5.11 is instrumented by the diagnostics-channel
subscriber, so its span origin is 'auto.db.orchestrion.redis' instead of the OTel
monkey-patch's 'auto.db.otel.redis'. Branch the expected ioredis origin on
isOrchestrionEnabled(); node-redis (redis-4/redis-5) is not ported and keeps the OTel
origin. All other span attributes are identical.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nicohrubec added a commit that referenced this pull request Jul 2, 2026
PR #21911 auto-runs all createEsmAndCjsTests under orchestrion, so the dedicated
openai/orchestrion suite is redundant. Deletes it and makes the proxy tests
orchestrion-aware:

- Drops the explicit `openAIIntegration()` from the no-option instrument files so
  orchestrion replaces the default integration under injection (proxy path is
  unaffected — it's a default).
- Branches the span-origin assertions on `isOrchestrionEnabled()`
  (`auto.ai.orchestrion.openai` vs `auto.ai.openai`).
- Keeps proxy-origin assertions for cases that can't run orchestrion: the
  mock/manual openai-tool-calls suite, and the truncation blocks whose
  `enableTruncation: true` must stay on the explicit integration (it overrides
  the streamGenAiSpans auto-disable).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chargome added a commit that referenced this pull request Jul 3, 2026
Rely on `createEsmAndCjsTests` auto-running the suite with orchestrion on
CI (#21911) instead of a manual instrument matrix: drop
`instrument-orchestrion.mjs` and branch the expected span origin on
`isOrchestrionEnabled()`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chargome added a commit that referenced this pull request Jul 3, 2026
Rely on `createEsmAndCjsTests` auto-running the suite with orchestrion on
CI (#21911) instead of a manual instrument matrix: drop
`instrument-orchestrion.mjs` and branch the expected span origin on
`isOrchestrionEnabled()`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chargome added a commit that referenced this pull request Jul 3, 2026
Rely on `createEsmAndCjsTests` auto-running the suite with orchestrion on
CI (#21911) instead of a manual instrument matrix: drop
`instrument-orchestrion.mjs` and branch the expected span origin on
`isOrchestrionEnabled()`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

4 participants