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

[SERVICES-2155] context tracker #1296

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

claudiulataretu
Copy link
Collaborator

Reasoning

  • use timestamp to query data from deep history

Proposed Changes

  • added context tracker from nestjs-sdk
  • use context tracker to propagate timestamp across services
  • query data with timestamp

How to test

  • any query with timestamp in request headers should return data from the past

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 38.09524% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 56.38%. Comparing base (87cfe3d) to head (4f15d71).
Report is 3 commits behind head on development.

❗ Current head 4f15d71 differs from pull request most recent head fa6a1fc. Consider uploading reports for the commit fa6a1fc to get more accurate results

Files Patch % Lines
src/helpers/proxy.network.provider.profiler.ts 37.50% 4 Missing and 1 partial ⚠️
src/helpers/api.config.service.ts 0.00% 3 Missing and 1 partial ⚠️
...ervices/multiversx-communication/mx.api.service.ts 25.00% 1 Missing and 2 partials ⚠️
src/helpers/decorators/caching.decorator.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development    #1296      +/-   ##
===============================================
- Coverage        56.43%   56.38%   -0.06%     
===============================================
  Files              236      236              
  Lines             7926     7946      +20     
  Branches           527      532       +5     
===============================================
+ Hits              4473     4480       +7     
- Misses            3004     3013       +9     
- Partials           449      453       +4     
Flag Coverage Δ
unittests 56.38% <38.09%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

context &&
context.deepHistoryTimestamp
) {
resourceUrl = `${resourceUrl}&timestamp=${context.deepHistoryTimestamp}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the & could cause issues when no other query arguments are present. It should be a ? in that case

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

- fix typo
- fix resource url generator in mx.api.service.ts

Signed-off-by: Claudiu Lataretu <[email protected]>
Signed-off-by: Claudiu Lataretu <[email protected]>
@claudiulataretu claudiulataretu merged commit 99b2aba into development Mar 5, 2024
1 check passed
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.

3 participants