Skip to content

fix(iterable): batching order issue - #2424

Merged
mihir-4116 merged 8 commits into
feat/iterable-refactorfrom
fix.iterable-batching-order-issue
Aug 3, 2023
Merged

mihir-4116 merged 8 commits into
feat/iterable-refactorfrom
fix.iterable-batching-order-issue

Conversation

@mihir-4116

Copy link
Copy Markdown
Contributor

Description of the change

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

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 requested review from chandumlg and utsabc August 3, 2023 05:28
@mihir-4116 mihir-4116 self-assigned this Aug 3, 2023
@mihir-4116
mihir-4116 requested review from a team as code owners August 3, 2023 05:28
@mihir-4116
mihir-4116 requested review from yashasvibajpai and removed request for a team August 3, 2023 05:28
return handleRtTfSingleEventError(event, error, reqMetadata);
}
}),
const groupedEvents = _.groupBy(inputs, (event) => event.message.rudderId);

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.

rudderId we need to take from metadata

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@codecov

codecov Bot commented Aug 3, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 96.00% and no project coverage change.

Comparison is base (2d06aef) 86.60% compared to head (46e4dbe) 86.61%.

❗ Current head 46e4dbe differs from pull request most recent head 3a13bc7. Consider uploading reports for the commit 3a13bc7 to get more accurate results

Additional details and impacted files
@@                   Coverage Diff                   @@
##           feat/iterable-refactor    #2424   +/-   ##
=======================================================
  Coverage                   86.60%   86.61%           
=======================================================
  Files                         552      552           
  Lines                       27662    27673   +11     
  Branches                     6592     6594    +2     
=======================================================
+ Hits                        23958    23969   +11     
  Misses                       3349     3349           
  Partials                      355      355           
Files Changed Coverage Δ
src/v0/destinations/iterable/transform.js 96.61% <96.00%> (+0.34%) ⬆️

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

@mihir-4116
mihir-4116 requested a review from utsabc August 3, 2023 06:06
} catch (error) {
return handleRtTfSingleEventError(event, error, reqMetadata);
}
const groupedEvents = _.groupBy(inputs, (event) => event.metadata.rudderId);

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.

Suggested change
const groupedEvents = _.groupBy(inputs, (event) => event.metadata.rudderId);
const eventsPerUser = _.groupBy(inputs, (event) => event.metadata.rudderId);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

return handleRtTfSingleEventError(event, error, reqMetadata);
}
const groupedEvents = _.groupBy(inputs, (event) => event.metadata.rudderId);
const eventsArrays = Object.values(groupedEvents);

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.

Suggested change
const eventsArrays = Object.values(groupedEvents);
const eachUserEvents = Object.values(groupedEvents);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Comment on lines +172 to +173
const singleEventArray = [];
const multipleEventsArray = [];

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.

Suggested change
const singleEventArray = [];
const multipleEventsArray = [];
const uniqueEventsPerUser = [];
const multipleEventsPerUser = [];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@mihir-4116
mihir-4116 requested a review from utsabc August 3, 2023 08:09
@mihir-4116
mihir-4116 merged commit e3c07db into feat/iterable-refactor Aug 3, 2023
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2023

Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

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

96.1% 96.1% Coverage
1.8% 1.8% Duplication

warning The version of Java (11.0.17) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

mihir-4116 added a commit that referenced this pull request Aug 9, 2023
mihir-4116 added a commit that referenced this pull request Aug 18, 2023
* fix(iterable): refactored destination code

* chore: monir code refactor

* chore: code review changes

* fix(iterable): batching order issue (#2424)

* fix(iterable): batching order issue

* chore: code review changes

* chore: added necessary documentation

* chore: code review changes

* chore: code review changes

* chore: replace rudderId with userId

* chore: replace rudderId with userId

* fix(optimizely): remove content type from get datafile call

* fix(iterable): batch job order (#2477)

* fix(iterable): batch job order

* chore: unit tests for orderEvents function

* chore: code review changes

* chore: add log for debugging

* chore: passing a clone to router transform funxtion

* chore: type fixes for dynamic config parser in controller

---------

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

---------

Co-authored-by: Gauravudia <[email protected]>
Co-authored-by: Utsab Chowdhury <[email protected]>
@devops-github-rudderstack
devops-github-rudderstack deleted the fix.iterable-batching-order-issue branch November 4, 2023 01:24
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.

3 participants