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

[backend] update or index internalFile to avoid duplicates (#8235) #8299

Merged
merged 8 commits into from
Sep 16, 2024

Conversation

SouadHadjiat
Copy link
Member

@SouadHadjiat SouadHadjiat commented Sep 10, 2024

Proposed changes

  • fix elIndexExist
  • add tests on existing index
  • migration to delete duplicated files (keep the most recent file) : test first if there multiple internal objects indices, if not no need to try to deduplicate.
  • to avoid creation of internal files duplication: update file if index already exists, index file if not

Related issues

#8235

@Archidoit Archidoit linked an issue Sep 10, 2024 that may be closed by this pull request
@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Sep 10, 2024
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 92.59259% with 2 lines in your changes missing coverage. Please review.

Project coverage is 66.19%. Comparing base (695963a) to head (0afb0c0).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...l/src/modules/internal/document/document-domain.ts 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8299      +/-   ##
==========================================
+ Coverage   66.18%   66.19%   +0.01%     
==========================================
  Files         597      597              
  Lines       60379    60392      +13     
  Branches     6203     6207       +4     
==========================================
+ Hits        39963    39979      +16     
+ Misses      20416    20413       -3     

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

Copy link
Member

@aHenryJard aHenryJard left a comment

Choose a reason for hiding this comment

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

Migration tested locally both with 2 indices on internal file and only one. All good.

@Archidoit Archidoit merged commit d42b104 into master Sep 16, 2024
6 checks passed
@Archidoit Archidoit deleted the issue/8235 branch September 16, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InternalFiles can be duplicated after index rollover
4 participants