Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(integrations): introduced new status codes to suppress or filter events #2611

Merged
merged 22 commits into from
Oct 9, 2023

Conversation

mihir-4116
Copy link
Contributor

@mihir-4116 mihir-4116 commented Sep 14, 2023

Description of the change

  • This pr adds 2 new status codes for filter events (statusCode = 298) and for suppress events(statusCode=299)
  • For klaviyo destination in identify call we are already processing event at transformer so no need to process it again from server, in such cases we will return 299 statusCode so that server will not process same event again
  • For braze destination we are throwing an error if event is duplicate in identify call. we do not need to throw error here rather we need to mark it as succeeded. To handle this transformer will return 298 statusCode and server will merk event as succeeded
  • with new statusCode we are also taking care of cross compatibility

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

@mihir-4116 mihir-4116 self-assigned this Sep 14, 2023
@mihir-4116 mihir-4116 requested review from a team as code owners September 14, 2023 06:23
@mihir-4116 mihir-4116 marked this pull request as draft September 14, 2023 06:23
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (bbf7ad4) 87.12% compared to head (0339c44) 87.20%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2611      +/-   ##
===========================================
+ Coverage    87.12%   87.20%   +0.08%     
===========================================
  Files          639      640       +1     
  Lines        28416    28461      +45     
  Branches      6738     6759      +21     
===========================================
+ Hits         24757    24820      +63     
+ Misses        3331     3314      -17     
+ Partials       328      327       -1     
Files Coverage Δ
src/routes/destination.ts 100.00% <100.00%> (ø)
src/services/destination/nativeIntegration.ts 88.88% <100.00%> (ø)
src/services/misc.ts 61.11% <100.00%> (+1.11%) ⬆️
src/util/errorNotifier/bugsnag.js 38.46% <ø> (ø)
src/v0/destinations/braze/transform.js 92.88% <100.00%> (+2.30%) ⬆️
src/v0/destinations/braze/util.js 98.21% <100.00%> (+0.75%) ⬆️
src/v0/destinations/klaviyo/transform.js 93.52% <100.00%> (+2.56%) ⬆️
src/v0/destinations/klaviyo/util.js 99.23% <100.00%> (+0.01%) ⬆️
src/v0/util/constant.js 81.81% <100.00%> (+1.81%) ⬆️
src/v0/util/errorTypes/filteredEventsError.js 100.00% <100.00%> (ø)
... and 3 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mihir-4116 mihir-4116 marked this pull request as ready for review September 15, 2023 03:21
@mihir-4116 mihir-4116 requested review from sivashanmukh and a team as code owners October 3, 2023 04:54
@mihir-4116 mihir-4116 force-pushed the feat.new_actions branch 2 times, most recently from 96d33bf to f583bce Compare October 3, 2023 06:01
chandumlg
chandumlg previously approved these changes Oct 5, 2023
chandumlg
chandumlg previously approved these changes Oct 5, 2023
@mihir-4116 mihir-4116 changed the title feat(integrations): introduced new actions to suppress or filter events feat(integrations): introduced new status codes to suppress or filter events Oct 5, 2023
src/services/destination/nativeIntegration.ts Outdated Show resolved Hide resolved
src/services/destination/nativeIntegration.ts Outdated Show resolved Hide resolved
src/services/destination/nativeIntegration.ts Outdated Show resolved Hide resolved
src/services/misc.ts Outdated Show resolved Hide resolved
@mihir-4116 mihir-4116 requested a review from chandumlg October 6, 2023 05:17
src/services/destination/nativeIntegration.ts Outdated Show resolved Hide resolved
src/v0/destinations/braze/transform.js Outdated Show resolved Hide resolved
src/v0/destinations/braze/transform.js Show resolved Hide resolved
src/v0/destinations/klaviyo/transform.js Outdated Show resolved Hide resolved
src/v0/destinations/klaviyo/transform.js Outdated Show resolved Hide resolved
src/v0/destinations/klaviyo/util.js Outdated Show resolved Hide resolved
@mihir-4116 mihir-4116 requested a review from utsabc October 6, 2023 09:07
@mihir-4116 mihir-4116 requested a review from utsabc October 9, 2023 04:48
@mihir-4116 mihir-4116 changed the title feat(integrations): introduced new status codes to suppress or filter events feat(INT-515): introduced new status codes to suppress or filter events Oct 9, 2023
@mihir-4116 mihir-4116 changed the title feat(INT-515): introduced new status codes to suppress or filter events feat(INT-516): introduced new status codes to suppress or filter events Oct 9, 2023
@mihir-4116 mihir-4116 changed the title feat(INT-516): introduced new status codes to suppress or filter events feat(integrations): introduced new status codes to suppress or filter events Oct 9, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 9, 2023

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 1 Code Smell

99.0% 99.0% Coverage
0.0% 0.0% Duplication

@mihir-4116 mihir-4116 merged commit 6bdb01e into develop Oct 9, 2023
14 checks passed
@mihir-4116 mihir-4116 deleted the feat.new_actions branch October 9, 2023 10:39
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