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

Template creation using context #14811

Merged

Conversation

mgodwan
Copy link
Member

@mgodwan mgodwan commented Jul 18, 2024

Description

  • Adds logic to create index template through the context field
  • Adds validation to not allow using system templates in composed_of
  • Adds validation to ensure only pre-determined loaders can add system templates
  • Updates logic where template data is applied during index creation/simulation.

Status 7/18: Modify and add new tests for the feature.

Related Issues

Resolves #12683

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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
Contributor

❌ Gradle check result for 8036645: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Copy link
Contributor

❌ Gradle check result for 7233318: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@mgodwan mgodwan marked this pull request as ready for review July 18, 2024 10:12
@mgodwan mgodwan marked this pull request as draft July 18, 2024 10:43
@github-actions github-actions bot added discuss Issues intended to help drive brainstorming and decision making enhancement Enhancement or improvement to existing feature or request labels Jul 18, 2024
@shwetathareja shwetathareja merged commit c76bfeb into opensearch-project:main Jul 24, 2024
30 of 31 checks passed
@shwetathareja shwetathareja added backport 2.x Backport to 2.x branch backport 2.16 labels Jul 24, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-14811-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c76bfebd49c8129b564edc68ce59f01853dc6722
# Push it to GitHub
git push --set-upstream origin backport/backport-14811-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-14811-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.16 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.16
# Create a new branch
git switch --create backport/backport-14811-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c76bfebd49c8129b564edc68ce59f01853dc6722
# Push it to GitHub
git push --set-upstream origin backport/backport-14811-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.16

Then, create a pull request where the base branch is 2.16 and the compare/head branch is backport/backport-14811-to-2.16.

mgodwan added a commit to mgodwan/OpenSearch that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
mgodwan added a commit to mgodwan/OpenSearch that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
mgodwan added a commit to mgodwan/OpenSearch that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
mgodwan added a commit to mgodwan/OpenSearch that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
dbwiddis pushed a commit that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
dbwiddis pushed a commit that referenced this pull request Jul 24, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
@shwetathareja
Copy link
Member

@dblock we have added one new request body parameter in the template API. Can you please help with details on changes to be made OpenAPI spec as well. cc: @mgodwan

@dblock
Copy link
Member

dblock commented Jul 30, 2024

@mgodwan Please open a PR that exercises these changes in that repo, see https://github.com/opensearch-project/opensearch-api-specification/blob/main/DEVELOPER_GUIDE.md for details.

harshavamsi pushed a commit to harshavamsi/OpenSearch that referenced this pull request Aug 20, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
* Template creation using context

Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport 2.16 backport-failed discuss Issues intended to help drive brainstorming and decision making enhancement Enhancement or improvement to existing feature or request feature New feature or request Indexing Indexing, Bulk Indexing and anything related to indexing RFC Issues requesting major changes Roadmap:Ease of Use Project-wide roadmap label skip-changelog v2.16.0 Issues and PRs related to version 2.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Application Based Configuration Templates
3 participants