Repository navigation
feat(customerio): support group relationship attributes - #5716
maheshkutty merged 2 commits into
Conversation
|
👋 I'm rudder-devbox. I opened this PR from a Linear ticket. Mention |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
@rudder-devbox Let's add this relationshipAttributes in the live integration test suite |
|
Added |
|
Knowledge distillation completed |
|



What are the changes introduced in this PR?
Adds CustomerIO Track API v2
relationship_attributessupport for person-to-object relationships created by Group events in both legacy and Event Stream V2 paths.Valid, non-empty plain objects from
traits.relationshipAttributesare emitted undercio_relationships[].relationship_attributesand excluded from object-levelattributes. 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
relationshipAttributesForhelper shared by the legacy and V2 builders. It returns relationship attributes only for non-empty plain objects. A sharedCustomerIORelationshiptype 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: []; the scoped generator's destination-only output was not committed.git diff --check- passed.LIVE_SECRET_CUSTOMERIOis unavailable; CI supplies the credential from Vault.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.