Skip to content

feat(customerio): support group relationship attributes - #5716

Merged
maheshkutty merged 2 commits into
developfrom
harness/RUD-3405-feat-customerio-support-group-r-7b33ffe3
Oct 26, 2026
Merged

maheshkutty merged 2 commits into
developfrom
harness/RUD-3405-feat-customerio-support-group-r-7b33ffe3

Conversation

@rudder-devbox

@rudder-devbox rudder-devbox Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Adds CustomerIO Track API v2 relationship_attributes support for person-to-object relationships created by Group events in both legacy and Event Stream V2 paths.

Valid, non-empty plain objects from traits.relationshipAttributes are emitted under cio_relationships[].relationship_attributes and excluded from object-level attributes. Missing, empty, array, string, and other invalid values are omitted without changing the existing payload shape.

The CustomerIO live integration suite now seeds relationship attributes through both event-stream API modes and reads them back from the real person-to-object relationship, while confirming they are absent from object attributes.

What is the related Linear task?

Resolves RUD-3405

Please explain the objectives of your changes below

Support CustomerIO relationship metadata consistently across both live Group event-stream implementations while preserving existing behavior for Group events without the new trait. Identify events and existing object action/default logic are unchanged.

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

Group events may now populate CustomerIO relationship attributes using traits.relationshipAttributes. Invalid values are ignored, and the attribute is discarded when no person identifier resolves.

Any new dependencies introduced with this change?

N/A

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

Added a CustomerIO-local relationshipAttributesFor helper shared by the legacy and V2 builders. It returns relationship attributes only for non-empty plain objects. A shared CustomerIORelationship type now describes the payload in both implementations.

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

No material performance impact. Validation consists of plain-object and non-empty checks during Group payload construction.

Validation

  • npm run lint - passed.
  • npm test -- --testPathPattern="customerio" --no-coverage - passed, 100 tests.
  • npm run test:ts -- component --destination=customerio - passed, 128 tests.
  • npx tsc --noEmit -p tsconfig.test.json - passed, including the CustomerIO live spec.
  • CustomerIO secret-path generation - passed in the original implementation and confirmed CUSTOMERIO: []; the scoped generator's destination-only output was not committed.
  • git diff --check - passed.
  • The real-account CustomerIO live suite was not run locally because LIVE_SECRET_CUSTOMERIO is unavailable; CI supplies the credential from Vault.
  • Code-simplify consolidated duplicate legacy/V2 validation and payload typing in the implementation; the review follow-up needed no further simplification.

Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes? - The change touches 14 files because both implementation paths, their mappings/types, unit and live tests, and the three requested documentation surfaces require updates.

  • 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 22, 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 22, 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
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 771a1936-8234-477f-9204-027f4991bf6a

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.

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.35%. Comparing base (c66f507) to head (ac29009).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5716      +/-   ##
===========================================
+ Coverage    92.31%   92.35%   +0.04%     
===========================================
  Files          732      737       +5     
  Lines        40743    40840      +97     
  Branches      9561     9587      +26     
===========================================
+ Hits         37612    37719     +107     
+ Misses        2867     2859       -8     
+ Partials       264      262       -2     

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

@maheshkutty
maheshkutty marked this pull request as ready for review October 23, 2026 10:03
@maheshkutty
maheshkutty requested review from a team as code owners October 23, 2026 10:03
@maheshkutty
maheshkutty requested a balanced review from Copilot October 23, 2026 10:03

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

maheshkutty
maheshkutty previously approved these changes Oct 23, 2026
@maheshkutty

Copy link
Copy Markdown
Contributor

@rudder-devbox Let's add this relationshipAttributes in the live integration test suite

@rudder-devbox

rudder-devbox Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Added relationshipAttributes to the CustomerIO live Group seed for both event-stream API modes. The read-back now verifies the attributes persisted on the person-object relationship and did not leak into the object's attributes. Lint, test TypeScript compilation, 100 CustomerIO unit tests, and 128 component tests pass; the real-account run will execute in CI because LIVE_SECRET_CUSTOMERIO is not available locally. Commit ac29009

@rudder-devbox

rudder-devbox Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Knowledge distillation completed

@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit a1ec80d into develop Oct 26, 2026
46 of 58 checks passed
@maheshkutty
maheshkutty deleted the harness/RUD-3405-feat-customerio-support-group-r-7b33ffe3 branch October 26, 2026 05:16
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.

3 participants