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

Fix bug handle empty mappings when removing mapping types #1178

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

peternied
Copy link
Member

Description

Fix bug handle empty mappings when removing mapping types

Issues Resolved

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.98%. Comparing base (d7889c3) to head (04724ff).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1178      +/-   ##
============================================
- Coverage     81.01%   80.98%   -0.04%     
- Complexity     2996     2997       +1     
============================================
  Files           407      407              
  Lines         15234    15241       +7     
  Branches       1021     1021              
============================================
+ Hits          12342    12343       +1     
- Misses         2265     2271       +6     
  Partials        627      627              
Flag Coverage Δ
unittests 80.98% <ø> (-0.04%) ⬇️

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.

transformIndex(indexTemplate, IndexType.TEMPLATE);
templates.set(template.getKey(), indexTemplate.getRawJson());
} catch (Exception e) {
log.atError()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we currently populate anything in the summary to say a transformation didn't work?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good callout - Nope, any items that are 'rejected' in this way will never show up in the UX (So at least there wouldn't be a false positive)

We will need to reorganize the data processing model to handle this cases :(

@peternied peternied merged commit 36098eb into opensearch-project:main Dec 4, 2024
22 checks passed
@peternied peternied deleted the empty-mappings branch December 4, 2024 23:05
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.

[BUG] Running the solution is getting null error in metadata migration
2 participants