Skip to content

feat: shopify enhancements - #2300

Merged
anantjain45823 merged 5 commits into
developfrom
feat.shopifyEnhancement
Jun 23, 2023
Merged

anantjain45823 merged 5 commits into
developfrom
feat.shopifyEnhancement

Conversation

@anantjain45823

@anantjain45823 anantjain45823 commented Jun 22, 2023 •

Copy link
Copy Markdown
Contributor

Description of the change

In this PR we are focusing on the following:

  1. Cart Update events would be dropped only if we have a duplicate of lineItemsHash in redis. In all other scenarios like redis failures or NO mapping in redis we pass the event.

  2. For mapping anonymousId we would be following this structure:
    A. Checks for rudderAnonymousId in note_atrributes
    B. if redis is enabled checks in redis
    C. This means we don't have anonymousId and hence events CAN NOT be stitched and we check for cartToken
    a. if cartToken is available we return its hash value
    b. else we check if the event is an SHOPIFY_ADMIN_ONLY_EVENT
    -> if true we return null;
    -> else we don't have any identifer (very edge case) we return random anonymousId

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 requested a review from utsabc June 22, 2023 06:48
@anantjain45823
anantjain45823 requested a review from a team as a code owner June 22, 2023 06:48
@anantjain45823 anantjain45823 self-assigned this Jun 22, 2023
@anantjain45823
anantjain45823 requested a review from ujjwal-ab June 22, 2023 06:48
@anantjain45823
anantjain45823 requested a review from a team as a code owner June 22, 2023 08:38
@codecov

codecov Bot commented Jun 22, 2023 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (develop@2361679). Click here to learn what that means.
Patch coverage: 97.14% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2300   +/-   ##
==========================================
  Coverage           ?   87.05%           
==========================================
  Files              ?      500           
  Lines              ?    25646           
  Branches           ?     6339           
==========================================
  Hits               ?    22327           
  Misses             ?     2947           
  Partials           ?      372           
Impacted Files Coverage Δ
src/util/prometheus.js 7.07% <ø> (ø)
src/v0/sources/shopify/util.js 97.29% <97.05%> (ø)
src/v0/sources/shopify/transform.js 97.61% <100.00%> (ø)

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

@anantjain45823
anantjain45823 requested a review from a team June 22, 2023 08:48
Comment thread src/v0/sources/shopify/util.js Resolved
Comment thread src/v0/sources/shopify/util.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

97.5% 97.5% Coverage
7.2% 7.2% Duplication

@utsabc

utsabc commented Jun 23, 2023

Copy link
Copy Markdown
Contributor

@anantjain45823 where did we update the cart update event behaviour? I am not seeing it

Comment thread src/v0/sources/shopify/util.js Resolved
@anantjain45823
anantjain45823 merged commit 98decef into develop Jun 23, 2023
if (isDefinedAndNotNull(noteAttributes)) {
anonymousId = getRudderIdFromNoteAtrributes(noteAttributes, "rudderAnonymousId");
}
// falling back to cartToken mapping or its hash in case no rudderAnonymousId is found

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong placement of comment, should be post this if clause

@devops-github-rudderstack
devops-github-rudderstack deleted the feat.shopifyEnhancement branch September 23, 2023 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants