Skip to content

chore: added validations and optional chaining in customerIo to avoid bugsnag Issue - #2420

Merged
sanpj2292 merged 5 commits into
developfrom
chore.avoidBugsnagIssue
Aug 11, 2023
Merged

sanpj2292 merged 5 commits into
developfrom
chore.avoidBugsnagIssue

Conversation

@anantjain45823

Copy link
Copy Markdown
Contributor

Description of the change

We are seeing too many bugsnag alerts in respect of undefined or NULL fields.
To avoid these we are thinking of introducing additional checks for all integrations starting with customerIo destination.
In this PR I have included some validations and optional chaining in customerIo destination

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 sanpj2292 July 31, 2023 06:16
@anantjain45823 anantjain45823 self-assigned this Jul 31, 2023
@anantjain45823
anantjain45823 requested a review from a team as a code owner July 31, 2023 06:16
Comment thread src/v0/destinations/customerio/util.js Resolved
Comment thread src/v0/destinations/customerio/util.js Resolved
Comment thread src/v0/destinations/customerio/util.js Resolved
@codecov

codecov Bot commented Jul 31, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% ⚠️

Comparison is base (49dc36a) 86.62% compared to head (2834fee) 86.60%.

❗ Current head 2834fee differs from pull request most recent head e2f2b44. Consider uploading reports for the commit e2f2b44 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2420      +/-   ##
===========================================
- Coverage    86.62%   86.60%   -0.02%     
===========================================
  Files          564      556       -8     
  Lines        27828    27773      -55     
  Branches      6659     6650       -9     
===========================================
- Hits         24105    24053      -52     
+ Misses        3369     3365       -4     
- Partials       354      355       +1     
Files Changed Coverage Δ
src/v0/destinations/customerio/config.js 100.00% <100.00%> (ø)
src/v0/destinations/customerio/transform.js 87.28% <100.00%> (+0.10%) ⬆️
src/v0/destinations/customerio/util.js 94.23% <100.00%> (+0.19%) ⬆️

... and 20 files with indirect coverage changes

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

@mihir-4116
mihir-4116 self-requested a review August 1, 2023 05:40
mihir-4116
mihir-4116 previously approved these changes Aug 1, 2023

@koladilip koladilip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test cases?

@anantjain45823

Copy link
Copy Markdown
Contributor Author

Test cases?

Will first discuss these changes with @sanpj2292 once confirmed will add the test cases as well

Comment thread src/v0/destinations/customerio/util.js Resolved
@krishna2020 krishna2020 changed the title chore: added validations and optional chaing in customerIo to avoid bugsnag Issue chore: added validations and optional chaining in customerIo to avoid bugsnag Issue Aug 10, 2023
@yashasvibajpai

yashasvibajpai commented Aug 10, 2023 •

Copy link
Copy Markdown
Contributor

Do we plan to extend this practice to all or most used destinations too?

@koladilip

Copy link
Copy Markdown
Contributor

why is this still not merged?

@sanpj2292
sanpj2292 merged commit c01c44d into develop Aug 11, 2023
@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

90.0% 90.0% Coverage
0.0% 0.0% Duplication

@devops-github-rudderstack
devops-github-rudderstack deleted the chore.avoidBugsnagIssue branch November 12, 2023 01:27
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.

6 participants