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

[discover] cached data structures TTL #8271

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Sep 20, 2024

Description

PR builds off of this PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8226/files

If the dataset type config passes a meta object with updateAt
within the data structure we know that the config opts into the TTL.

If TTL over configuring UI setting then refetch in the case of S3
to get a new session ID in the cache.

Signed-off-by: Kawika Avilla kavilla414@gmail.com

Issues Partially Resolved

n/a

Screenshot

Testing the changes

Changelog

  • feat: cached data structures TTL to prevent stale objects in session

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 64.13%. Comparing base (b826df8) to head (a8a2652).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
...gins/query_enhancements/public/datasets/s3_type.ts 33.33% 5 Missing and 1 partial ⚠️
...on/search/search_source/fetch/get_search_params.ts 0.00% 1 Missing ⚠️
...ry/query_string/dataset_service/dataset_service.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8271      +/-   ##
==========================================
+ Coverage   64.05%   64.13%   +0.07%     
==========================================
  Files        3741     3743       +2     
  Lines       88629    88812     +183     
  Branches    13801    13848      +47     
==========================================
+ Hits        56771    56958     +187     
+ Misses      31260    31238      -22     
- Partials      598      616      +18     
Flag Coverage Δ
Linux_1 30.07% <0.00%> (+0.01%) ⬆️
Linux_2 58.86% <0.00%> (+0.02%) ⬆️
Linux_3 40.33% <33.33%> (-0.05%) ⬇️
Linux_4 31.59% <25.00%> (+0.13%) ⬆️
Windows_1 30.09% <0.00%> (+0.01%) ⬆️
Windows_2 58.81% <0.00%> (+0.02%) ⬆️
Windows_3 40.34% <33.33%> (-0.04%) ⬇️
Windows_4 31.59% <25.00%> (+0.13%) ⬆️

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.

If the dataset type config passes a meta object with `updateAt`
within the data structure we know that the config opts into the TTL.

If TTL over configuring UI setting then refetch in the case of S3
to get a new session ID in the cache.

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
@kavilla kavilla force-pushed the kavilla/updatecachedatastructure branch from a8a2652 to 97e7425 Compare September 23, 2024 17:51
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.

1 participant