Skip to content

fix: rETL timestamp order - #2343

Merged
sanpj2292 merged 13 commits into
developfrom
fix.rETL-timestamp-order
Aug 3, 2023
Merged

sanpj2292 merged 13 commits into
developfrom
fix.rETL-timestamp-order

Conversation

@sanpj2292

@sanpj2292 sanpj2292 commented Jul 6, 2023 •

Copy link
Copy Markdown

Description of the change

  • For track event, we are considering properties.timestamp from payload as first preference for rETL events as this field contains the mapped timestamp column from warehouse.
  • For identify event, we are considering context.timestamp, context.traits.timestamp, traits.timestamp (in the same order) from payload as first preference for rETL events as this field contains the mapped timestamp column from warehouse.
  • If the timestamp is not present in any of the above mentioned fields, we would take the timestamp value from timestamp field(at the outermost level)
  • If the timestamp is not present in any of the outermost timestamp field, we would take the timestamp value from originalTimestamp field(at the outermost level)

Note:

  1. Root level timestamp is generated by rudder-server & will change each time a full sync is triggered

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

Signed-off-by: Sai Sankeerth <[email protected]>
@sanpj2292
sanpj2292 requested a review from a team July 6, 2023 02:53
@sanpj2292 sanpj2292 self-assigned this Jul 6, 2023
@sanpj2292
sanpj2292 requested a review from sivashanmukh as a code owner July 6, 2023 02:53
@codecov

codecov Bot commented Jul 6, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (8a071df) 86.60% compared to head (aa2cc43) 86.61%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2343   +/-   ##
========================================
  Coverage    86.60%   86.61%           
========================================
  Files          556      556           
  Lines        27763    27783   +20     
  Branches      6639     6641    +2     
========================================
+ Hits         24045    24065   +20     
  Misses        3363     3363           
  Partials       355      355           
Files Changed Coverage Δ
src/controllers/destination.ts 84.52% <100.00%> (+0.57%) ⬆️
src/controllers/util/index.ts 100.00% <100.00%> (ø)
src/routes/utils/constants.js 100.00% <100.00%> (ø)

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

Signed-off-by: Sai Sankeerth <[email protected]>
@sanpj2292
sanpj2292 requested a review from ruchiramoitra July 10, 2023 08:11
ruchiramoitra
ruchiramoitra previously approved these changes Jul 11, 2023

@ruchiramoitra ruchiramoitra 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.

LGTM

Sai Sankeerth added 3 commits July 11, 2023 16:56
- move constant values to appropriate constant files
- updated appropriate test-cases
@ruchiramoitra
ruchiramoitra self-requested a review July 20, 2023 08:35

@ruchiramoitra ruchiramoitra 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.

just checked the logic. LGTM.

@krishna2020 krishna2020 changed the title fix: rETL timestamp order fix: [INT-127] rETL timestamp order Jul 28, 2023
@linear

linear Bot commented Jul 28, 2023

Copy link
Copy Markdown
INT-127 Prioritise properties.timestamp for rETL source events

Consider properties.timestamp from payload as first preference for rETL events as this field contains the mapped timestamp column from warehouse.

Root level timestamp is generated by rudder-server & will change each time a full sync is triggered

{
  "type": "track",
  "user_id": "e792b605-f7aa-4577-bbe1-fc89b48c0be3",
  "anonymous_id": "e792b605-f7aa-4577-bbe1-fc89b48c0be3",
  "event": "store_page_view",
  "properties": {
    "EXPERT_ID": "e792b605-f7aa-4577-bbe1-fc89b48c0be3",
    "ORDER_ID": "null",
    "EXPERT_NAME": "barrett",
    "TIMESTAMP": "2023-06-08T22:01:31.267-07:00",
    "timestamp": "2023-06-08T22:01:31.267-07:00"// my code will work!!
  }
}

@krishna2020 krishna2020 changed the title fix: [INT-127] rETL timestamp order fix: rETL timestamp order Jul 28, 2023
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2023

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

100.0% 100.0% Coverage
0.0% 0.0% 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

@sanpj2292
sanpj2292 merged commit d949664 into develop Aug 3, 2023
@sanpj2292
sanpj2292 deleted the fix.rETL-timestamp-order branch August 3, 2023 10:23
workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg',
namespace: '',
instanceId: '1',
sourceType: 'HTTP',

@krishna2020 krishna2020 Aug 7, 2023 •

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.

test case can be limited to the required variables only

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]>
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.

4 participants