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

Create separate transport action for render search template action #11170

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into render-search-template
cwperks committed Dec 11, 2023
commit 61b9dfa6b41b7a668f9b73bc988a258925e629b4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -112,6 +112,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Implement on behalf of token passing for extensions ([#8679](https://github.com/opensearch-project/OpenSearch/pull/8679))
- Provide service accounts tokens to extensions ([#9618](https://github.com/opensearch-project/OpenSearch/pull/9618))
- [Streaming Indexing] Introduce new experimental server HTTP transport based on Netty 4 and Project Reactor (Reactor Netty) ([#9672](https://github.com/opensearch-project/OpenSearch/pull/9672))
- Add back half_float BKD based sort query optimization ([#11024](https://github.com/opensearch-project/OpenSearch/pull/11024))
- Request level coordinator slow logs ([#10650](https://github.com/opensearch-project/OpenSearch/pull/10650))
- Add template snippets support for field and target_field in KV ingest processor ([#10040](https://github.com/opensearch-project/OpenSearch/pull/10040))
- Allowing pipeline processors to access index mapping info by passing ingest service ref as part of the processor factory parameters ([#10307](https://github.com/opensearch-project/OpenSearch/pull/10307))
- Make number of segment metadata files in remote segment store configurable ([#11329](https://github.com/opensearch-project/OpenSearch/pull/11329))
- Allow changing number of replicas of searchable snapshot index ([#11317](https://github.com/opensearch-project/OpenSearch/pull/11317))
- Adding slf4j license header to LoggerMessageFormat.java ([#11069](https://github.com/opensearch-project/OpenSearch/pull/11069))
- [BWC and API enforcement] Introduce checks for enforcing the API restrictions ([#11175](https://github.com/opensearch-project/OpenSearch/pull/11175))
- Create separate transport action for render search template action ([#11170](https://github.com/opensearch-project/OpenSearch/pull/11170))

### Dependencies

Unchanged files with check annotations Beta

public class RenderSearchTemplateAction extends ActionType<SearchTemplateResponse> {
public static final RenderSearchTemplateAction INSTANCE = new RenderSearchTemplateAction();

Check warning on line 15 in modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RenderSearchTemplateAction.java

Codecov / codecov/patch

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RenderSearchTemplateAction.java#L15

Added line #L15 was not covered by tests
public static final String NAME = "indices:data/read/search/template/render";
private RenderSearchTemplateAction() {
super(NAME, SearchTemplateResponse::new);
}

Check warning on line 20 in modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RenderSearchTemplateAction.java

Codecov / codecov/patch

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RenderSearchTemplateAction.java#L19-L20

Added lines #L19 - L20 were not covered by tests
}
renderRequest.setScript(id);
}
return channel -> client.execute(RenderSearchTemplateAction.INSTANCE, renderRequest, new RestToXContentListener<>(channel));

Check warning on line 84 in modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java

Codecov / codecov/patch

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/RestRenderSearchTemplateAction.java#L84

Added line #L84 was not covered by tests
}
}
NamedXContentRegistry xContentRegistry,
NodeClient client
) {
super(RenderSearchTemplateAction.NAME, transportService, actionFilters, scriptService, xContentRegistry, client);
}

Check warning on line 29 in modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportRenderSearchTemplateAction.java

Codecov / codecov/patch

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportRenderSearchTemplateAction.java#L28-L29

Added lines #L28 - L29 were not covered by tests
}
NamedXContentRegistry xContentRegistry,
NodeClient client
) {
super(actionName, transportService, actionFilters, SearchTemplateRequest::new);
this.scriptService = scriptService;
this.xContentRegistry = xContentRegistry;
this.client = client;
}

Check warning on line 94 in modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java

Codecov / codecov/patch

modules/lang-mustache/src/main/java/org/opensearch/script/mustache/TransportSearchTemplateAction.java#L90-L94

Added lines #L90 - L94 were not covered by tests
@Override
protected void doExecute(Task task, SearchTemplateRequest request, ActionListener<SearchTemplateResponse> listener) {
You are viewing a condensed version of this merge commit. You can view the full changes here.