Skip to content

fix(event-test): select CDK v2 destination service - #5646

Merged
achettyiitr merged 2 commits into
developfrom
harness/RUD-3275-fix-event-test-select-cdk-v2-de-c7caaff7
Oct 12, 2026
Merged

achettyiitr merged 2 commits into
developfrom
harness/RUD-3275-fix-event-test-select-cdk-v2-de-c7caaff7

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

  • Add ServiceSelector.getDestinationServiceByType(destType, workspaceId) and make the existing event-based selector delegate to it.
  • Route event-test destination transforms through the shared selector and initialize the selected service before use.
  • Convert missing destination transform modules into descriptive ConfigurationErrors while preserving nested dependency failures.
  • Add unit coverage for CDK v2/native selection, workspace kill switches, event-tester routing, and missing handlers.

What is the related Linear task?

Resolves RUD-3275

Please explain the objectives of your changes below

Event testing previously hardcoded the native integration service, causing CDK-v2-only destinations such as HTTP to fail and dual implementations such as Webhook to exercise behavior different from production. This change makes the event tester use the same destination type and workspace routing decision as production.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

Event tests for destinations with cdkV2: true, including Webhook, now exercise CDK v2 unless disabled by the existing DISABLE_<DEST>_CDK_V2 kill switch. This is intentional so tester output matches production. Native destinations and router-versus-processor capability selection remain unchanged.

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

ServiceSelector.getDestinationServiceByType exposes the existing CDK v2/native routing decision for callers that already hold destination type and workspace ID as scalar values.

Any technical or performance related pointers to consider with the change?

Services remain cached singletons. Event-test metadata intentionally does not fabricate a destination ID for unsaved destinations. Missing native modules now return a clear configuration error, while nested module-load failures remain unchanged.

Validation:

  • npm run lint
  • npm test -- --runTestsByPath src/helpers/__tests__/serviceSelector.test.ts src/services/eventTest/__tests__/eventTester.test.ts src/services/__tests__/misc.test.ts --no-coverage — exit 0; 3 suites and 32 tests passed
  • npm run build:test

⚠️ Known Issues

  • End-to-end local-stack verification was skipped because rudder-transformer is stock-image-only and cannot run the edited source in this sandbox. Provenance is therefore unconfirmed; starting the stock stack would not validate this diff.

Developer checklist

  • My code follows the style guidelines of this project
  • No breaking changes are being introduced.
  • All related docs linked with the PR? N/A
  • All changes manually tested?
  • Any documentation changes needed with this change? No
  • Is the PR limited to 10 file changes?
  • Is the PR limited to one linear task?
  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?
  • Verified that there are no credentials or confidential data exposed with the changes.

@rudder-devbox

rudder-devbox Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

👋 I'm rudder-devbox. I opened this PR from a Linear ticket.

Mention @devbox or @rudder-devbox and I'll act on it — on a top-level PR comment,
in a review summary, or on an inline comment on the diff. Without a mention I won't see it.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb9e78ad-778d-44bc-9ad2-b28c222c9d90

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.11%. Comparing base (25fca9d) to head (edd7c6d).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5646   +/-   ##
========================================
  Coverage    92.11%   92.11%           
========================================
  Files          708      708           
  Lines        39526    39529    +3     
  Branches      9262     9267    +5     
========================================
+ Hits         36409    36412    +3     
  Misses        2852     2852           
  Partials       265      265           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@achettyiitr
achettyiitr marked this pull request as ready for review October 12, 2026 06:53
@achettyiitr
achettyiitr requested review from a team as code owners October 12, 2026 06:53
@achettyiitr
achettyiitr merged commit f39e815 into develop Oct 12, 2026
48 checks passed
@achettyiitr
achettyiitr deleted the harness/RUD-3275-fix-event-test-select-cdk-v2-de-c7caaff7 branch October 12, 2026 06:53
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