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

[Backport 2.x] Manual backport for Adding schema validation and placeholders for index mappings #3342

Open
wants to merge 4 commits into
base: 2.x
Choose a base branch
from

Conversation

pyek-bot
Copy link
Contributor

@pyek-bot pyek-bot commented Jan 7, 2025

Description

Raising a manual backport for 35daf90 as the jackson dependencies use the versions from opensearch-core to maintain compatibility and this variable is not found in 2.x. I am introducing it via 2 cherry-picks and a minor change for the http5 dependency to be compatible.

Please check: #3310

Check List

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

pyek-bot and others added 3 commits January 7, 2025 12:12
opensearch-project#3240)

* feat(index mappings): fetch mappings and version from json file instead of string constants

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: changing exception being thrown

Signed-off-by: Pavan Yekbote <[email protected]>

* chore: remove unused file

Signed-off-by: Pavan Yekbote <[email protected]>

* chore: fix typo in comment

Signed-off-by: Pavan Yekbote <[email protected]>

* chore: adding new line at the end of files

Signed-off-by: Pavan Yekbote <[email protected]>

* feat: add test cases

Signed-off-by: Pavan Yekbote <[email protected]>

* fix: remove test code

Signed-off-by: Pavan Yekbote <[email protected]>

* fix(test): in main the versions were not updated appropriately

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: move mapping templates under common module

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: ensure that conversationindexconstants reference mlindex enums rather than use their own mappings

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: update comment

Signed-off-by: Pavan Yekbote <[email protected]>

* feat: add enhancements to validate index schema and allow using placeholders

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: modifying comment

Signed-off-by: Pavan Yekbote <[email protected]>

* test: adding testcase for MLIndex to catch failures before runtime

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: rename dir from mappings to index-mappings

Signed-off-by: Pavan Yekbote <[email protected]>

* fix: add null checks

Signed-off-by: Pavan Yekbote <[email protected]>

* fix: modify mappin paths for placeholders

Signed-off-by: Pavan Yekbote <[email protected]>

* fix: adding dependencies for testing

Signed-off-by: Pavan Yekbote <[email protected]>

* fix(test): compare json object rather than strings to avoid eol character issue

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: combine if statements into single check

Signed-off-by: Pavan Yekbote <[email protected]>

* refactoring: null handling + clean code

Signed-off-by: Pavan Yekbote <[email protected]>

* spotless apply

Signed-off-by: Pavan Yekbote <[email protected]>

* tests: adding more UT

Signed-off-by: Pavan Yekbote <[email protected]>

* fix: dependencies to handle jarhell

Signed-off-by: Pavan Yekbote <[email protected]>

* spotless apply

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: add header and use single instance of mapper

Signed-off-by: Pavan Yekbote <[email protected]>

* fixed: doc syntax

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: renamed files, efficient loading of resources, better exception handling

Signed-off-by: Pavan Yekbote <[email protected]>

* refactor: cleaner comment

Signed-off-by: Pavan Yekbote <[email protected]>

---------

Signed-off-by: Pavan Yekbote <[email protected]>
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 20:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 21:22 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 21:22 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 7, 2025 21:22 — with GitHub Actions Inactive
dhrubo-os
dhrubo-os previously approved these changes Jan 9, 2025
Signed-off-by: Pavan Yekbote <[email protected]>
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Failure
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Error
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Inactive
@pyek-bot pyek-bot had a problem deploying to ml-commons-cicd-env-require-approval January 14, 2025 01:23 — with GitHub Actions Error
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 03:25 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 03:25 — with GitHub Actions Inactive
@pyek-bot pyek-bot temporarily deployed to ml-commons-cicd-env-require-approval January 14, 2025 03:25 — with GitHub Actions Inactive
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