Skip to content

refactor: Route bulk user attribute sync through onSetAllUserAttributes#691

Merged
denischilik merged 5 commits intoworkstation/6.0-Releasefrom
feat/migrate-set-all-user-attributes
Apr 2, 2026
Merged

refactor: Route bulk user attribute sync through onSetAllUserAttributes#691
denischilik merged 5 commits intoworkstation/6.0-Releasefrom
feat/migrate-set-all-user-attributes

Conversation

@denischilik
Copy link
Copy Markdown

Background

Bulk user attribute sync is now delivered through BaseAttributeListener.onSetAllUserAttributes so kits implement one callback instead of maintaining a separate setAllUserAttributes helper. AttributeListener no longer declares setAllUserAttributes.

What Has Changed

  • Added onSetAllUserAttributes on BaseAttributeListener; KitManagerImpl calls it when user attributes are received or lists are supported.
  • Removed setAllUserAttributes from AttributeListener; kits implement logic directly in onSetAllUserAttributes (including former dual-listener delegation).
  • Inlined prior setAllUserAttributes helpers in affected kits and AttributeListenerTestKit; updated KitManagerImplTest expectations.

Screenshots/Video

N/A

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

Target branch: workstation/6.0-Release.

…ner kits

AppsFlyer and Braze: forward snapshot maps to AttributeListener.setAllUserAttributes.
Singular: align override parameter names with UserAttributeListener and delegate.

Made-with: Cursor
…one call

- Declare onSetAllUserAttributes on BaseAttributeListener; remove from UserAttributeListener
- KitManagerImpl: call BaseAttributeListener.onSetAllUserAttributes only (no duplicate setAllUserAttributes)
- AttributeListener-only kits: delegate onSetAllUserAttributes to setAllUserAttributes
- AttributeListenerTestKit: align setAllUserAttributes maps with Java API

Made-with: Cursor
Compute getInstance(mpid, provider) once before the supportsAttributeLists branch.

Made-with: Cursor
Drop the method from KitIntegration.AttributeListener; full sync is delivered
via BaseAttributeListener.onSetAllUserAttributes. Kits keep setAllUserAttributes
as ordinary helpers (no override). Update KitManagerImplTest and
AttributeListenerTestKit accordingly.

Made-with: Cursor
Remove redundant setAllUserAttributes helpers from kits and AttributeListenerTestKit.
Update BaseAttributeListener Javadoc in KitIntegration.

Made-with: Cursor
@denischilik denischilik requested a review from a team as a code owner April 2, 2026 12:57
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Changes the core forwarding path for bulk user attribute synchronization across all kits; incorrect listener wiring or list-merging behavior could cause missing or malformed user attributes in partner SDKs.

Overview
Bulk user attribute synchronization is refactored to go through a single callback, BaseAttributeListener.onSetAllUserAttributes(userAttributes, userAttributeLists, user), and AttributeListener no longer exposes the legacy setAllUserAttributes method.

KitManagerImpl.onUserAttributesReceived is simplified to always target BaseAttributeListener and to consistently pass a FilteredMParticleUser, while preserving the existing behavior of merging list attributes into scalar CSV values when a kit reports supportsAttributeLists() == false.

Affected kits and test kits are updated to implement onSetAllUserAttributes directly (removing/inlineing prior setAllUserAttributes helpers), and KitManagerImplTest assertions are updated to verify the new callback signature.

Written by Cursor Bugbot for commit 641a6d3. This will update automatically on new commits. Configure here.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
71.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@denischilik denischilik merged commit 6584c0e into workstation/6.0-Release Apr 2, 2026
21 of 23 checks passed
@denischilik denischilik deleted the feat/migrate-set-all-user-attributes branch April 2, 2026 14:59
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