Skip to content

[INT-184]feat: sessionId stitching - #2204

Merged
anantjain45823 merged 24 commits into
developfrom
feat/sessionIdStitching
Jul 30, 2023
Merged

anantjain45823 merged 24 commits into
developfrom
feat/sessionIdStitching

Conversation

@anantjain45823

@anantjain45823 anantjain45823 commented May 23, 2023 •

Copy link
Copy Markdown
Contributor

Description of the change

This pull request introduces an enhancement ofsessionId stitching functionality by leveraging the rudderSessionIdentifier event and using of Redis for storing the cartToken versus SessionId mapping.
Linear Card https://linear.app/rudderstack/issue/INT-184/collect-sessionid-from-shopify-client-side-events

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@anantjain45823 anantjain45823 self-assigned this May 23, 2023
@anantjain45823
anantjain45823 requested a review from a team as a code owner May 23, 2023 11:26
@anantjain45823
anantjain45823 requested a review from a team May 23, 2023 11:26
@codecov

codecov Bot commented May 23, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (b6d1018) 86.59% compared to head (a634d84) 86.61%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2204      +/-   ##
===========================================
+ Coverage    86.59%   86.61%   +0.02%     
===========================================
  Files          552      552              
  Lines        27655    27664       +9     
  Branches      6608     6615       +7     
===========================================
+ Hits         23947    23961      +14     
+ Misses        3353     3348       -5     
  Partials       355      355              
Impacted Files Coverage Δ
src/util/prometheus.js 7.07% <ø> (ø)
src/util/redis/redisConnector.js 95.45% <100.00%> (+1.08%) ⬆️
src/v0/sources/shopify/transform.js 99.27% <100.00%> (+1.65%) ⬆️
src/v0/sources/shopify/util.js 100.00% <100.00%> (+0.88%) ⬆️

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment thread src/v0/sources/shopify/util.js Resolved
Comment thread src/v0/sources/shopify/transform.js Resolved
Comment thread src/v0/sources/shopify/util.js Resolved
Comment thread src/v0/sources/shopify/transform.js Resolved
sanpj2292
sanpj2292 previously approved these changes Jun 5, 2023
ItsSudip
ItsSudip previously approved these changes Jun 7, 2023
@anantjain45823
anantjain45823 dismissed stale reviews from ItsSudip and sanpj2292 via be70868 June 8, 2023 04:45
@anantjain45823
anantjain45823 requested a review from a team as a code owner June 8, 2023 04:45
koladilip
koladilip previously approved these changes Jun 16, 2023
sanpj2292
sanpj2292 previously approved these changes Jun 16, 2023
@sanpj2292 sanpj2292 added the DO NOT MERGE Don't merge this PR without having discussion label Jun 22, 2023
Comment thread src/v0/sources/shopify/transform.js Resolved
Comment thread src/v0/sources/shopify/transform.js Resolved
@anantjain45823
anantjain45823 requested a review from sanpj2292 July 20, 2023 08:13
Comment thread src/util/redis/redisConnector.js Resolved
Comment thread src/v0/sources/shopify/transform.js Resolved
Comment thread src/v0/sources/shopify/util.js Resolved
Comment thread src/v0/sources/shopify/util.js Resolved
@utsabc

utsabc commented Jul 21, 2023

Copy link
Copy Markdown
Contributor

@anantjain45823 as part of new practices lets add unit test for all the util functions

  • Lets segregate all redis related unit tests for shopify in one file
  • And other util functions for shopify

@anantjain45823

Copy link
Copy Markdown
Contributor Author

@anantjain45823 as part of new practices lets add unit test for all the util functions

  • Lets segregate all redis related unit tests for shopify in one file
  • And other util functions for shopify

We already have a combined file . Will separate the one containing redis connection

Comment thread test/__mocks__/redis.js Resolved
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

98.6% 98.6% Coverage
0.0% 0.0% Duplication

@anantjain45823
anantjain45823 merged commit 40105f5 into develop Jul 30, 2023
@anantjain45823 anantjain45823 changed the title feat: sessionId stitching [INT-184]feat: sessionId stitching Aug 3, 2023
@linear

linear Bot commented Aug 3, 2023

Copy link
Copy Markdown
INT-184 Collect sessionID from shopify client-side events

Slack Thread :https://rudderlabs.slack.com/archives/C04BVF30FNX/p1680616644301329

Reviewers: Yashasvi Bajpai Polur Sai Sankeerth Rao

Description

In the first release, only AnonID is being added to the server-side events. To unlock few other use-cases, userID & sessionID also needs to be collected from the client side which depends on same cartToken mapping and use it to enrich server-side events.

Research Spec

Development PR's

rudderlabs/rudder-shopify-tracker#30

#2204

Test Report:

https://www.notion.so/rudderstacks/Shopify-sessionId-Stitching-Test-Report-34e334641677483284c6395b5471f9fc?pvs=4

koladilip added a commit that referenced this pull request Aug 8, 2023
* chore: onboard swagger api on docker (#2400)

onboard swagger api on docker

* refactor: migrate destinations from cdk v1 to v2 (#2381)

* refactor: migrate autopilot to cdkv2

* refactor: migrate heap to cdkv2

Modified the tests according to cdk v2 style.

* refactor: migrate vitally to cdk v2

* chore: remove legacy profile routes

* chore: remove legacy profile routes

* refactor: migrate variance to cdk v2

* refactor: migrate statsig to cdkv2

* refactor: migrate userlist to cdkv2

* refactor: migrate zapier to cdk v2

* refactor: migrate lytics to cdk v2

* fix: pr comments

* refactor: migrate new relic to cdk v2

Migrate cdk v1 implementation to v2.

* refactor: migrate dcm_floodlight to cdk v1

* refactor: migrate kochava to cdk v2

* fix: pr comments

* fix:  stat labels (#2412)

fix stat labels

* feat: sessionId stitching (#2204)

* feat: sessionId stitching

* chore: comments addressed

* chore: test coverage improved

* chore: small fixes

* chore: update test file coverage and improvised metrics

* chore: update test file coverage

* Update src/v0/sources/shopify/transform.js

Co-authored-by: Utsab Chowdhury <[email protected]>

* chore: shifted to hgetall to retrieve all data from redis in one go

* chore: test case fix

* chore: increase test coverage

* chore: increase test coverage+1

* chore: sonarcloud issues

* chore: separate util test file for redis related test cases

---------

Co-authored-by: Sai Sankeerth <[email protected]>
Co-authored-by: Utsab Chowdhury <[email protected]>

* fix: customerIO source bugsnag issue for invalid timestamp (#2413)

* chore: outgoing request latency metric (#2421)

* fix: update images to fix integration tests (#2417)

* chore: update tiktok ads api version to 1.3 (#2423)

chore: update tiktok version to 1.3

* chore(transformation): set to default dns servers (#2416)

* chore: tags for missed destinations for latency metric (#2425)

Co-authored-by: Chandra shekar Varkala <[email protected]>

* fix: rETL timestamp order (#2343)

* fix(transformation): return retryable error when faas service exists … (#2427)

* feat: return relevant stack trace as error from ivm (#2314)

* feat: return relevant stack trace as error from ivm

* chore: throw platform error for get recordId

* chore: change error type for get recordId

* fix: continue on git action failure to next steps (#2429)

* fix(INT-256): handling non float price input for braze purchase events (#2431)

* fix: handling non fload price input for braze purchase events

Braze purchase events require the price value to be float. This commit is purposed to solve that

* fix: add test cases and refactored the code for puchase events for braze

---------

Co-authored-by: Mihir Bhalala <[email protected]>

* fix(tiktok_ads): format productId to string data type (#2434)

* fix: handle marketo auth token response when expires_in is 0 sec  (#2432)

* fix: handle marketo auth token response when expires_in is 0 sec

* Update src/v0/destinations/marketo/util.js

Co-authored-by: Dilip Kola <[email protected]>

---------

Co-authored-by: Dilip Kola <[email protected]>

* chore(release): 1.37.0

* fix(tiktok_ads): format products array product ids to string (#2445)

* fix: heap timestamp mapping (#2451)

* chore: update changelog entry for heap and tiktok (#2452)

---------

Co-authored-by: Utsab Chowdhury <[email protected]>
Co-authored-by: sandeepdigumarty <[email protected]>
Co-authored-by: Krishna Chaitanya <[email protected]>
Co-authored-by: Dilip Kola <[email protected]>
Co-authored-by: Anant Jain <[email protected]>
Co-authored-by: Sai Sankeerth <[email protected]>
Co-authored-by: chandumlg <[email protected]>
Co-authored-by: Jayachand <[email protected]>
Co-authored-by: Yashasvi Bajpai <[email protected]>
Co-authored-by: Chandra shekar Varkala <[email protected]>
Co-authored-by: Sankeerth <[email protected]>
Co-authored-by: Daniyal Parveez <[email protected]>
Co-authored-by: Gauravudia <[email protected]>
Co-authored-by: AASHISH MALIK <[email protected]>
Co-authored-by: Gauravudia <[email protected]>
Co-authored-by: Mihir Bhalala <[email protected]>
Co-authored-by: GitHub Actions <[email protected]>
@devops-github-rudderstack
devops-github-rudderstack deleted the feat/sessionIdStitching branch October 25, 2023 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE Don't merge this PR without having discussion Ready for Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants