Skip to content

Add configurable path_prefix parameter - #6674

Merged
dlvenable merged 1 commit into
opensearch-project:mainfrom
Pigueiras:urlprefix
Jun 4, 2026
Merged

dlvenable merged 1 commit into
opensearch-project:mainfrom
Pigueiras:urlprefix

Conversation

@Pigueiras

@Pigueiras Pigueiras commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Introduce an optional path_prefix sink parameter to support OpenSearch instances served behind a reverse proxy under a custom subdirectory.

Issues Resolved

Resolves #6654

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

@dlvenable dlvenable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @Pigueiras for this contribution!

@Pigueiras Pigueiras changed the title Add configurable url_prefix parameter Add configurable path_prefix parameter Mar 30, 2026
@Pigueiras

Copy link
Copy Markdown
Contributor Author

Thank you @Pigueiras for this contribution!

No problem :) I changed the parameter to path_prefix, let me know if I can do anything else.

@Pigueiras
Pigueiras requested a review from dlvenable April 13, 2026 12:12
dlvenable
dlvenable previously approved these changes May 6, 2026

@dlvenable dlvenable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Pigueiras !

divbok
divbok previously approved these changes May 6, 2026

@Davidding4718 Davidding4718 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address a minor change for ConnectionConfigurationTests.java

Copilot AI review requested due to automatic review settings May 7, 2026 06:28
@Pigueiras
Pigueiras dismissed stale reviews from divbok and dlvenable via c68fb8c May 7, 2026 06:28
@Pigueiras
Pigueiras requested a review from Zhangxunmt as a code owner May 7, 2026 06:28
Introduce an optional `path_prefix` sink parameter to support OpenSearch
instances served behind a reverse proxy under a custom subdirectory.

Resolves opensearch-project#6654

Signed-off-by: Luis Pigueiras <luis.pigueiras@cern.ch>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new optional path_prefix configuration parameter to the OpenSearch sink so it can communicate with OpenSearch clusters exposed behind a reverse proxy under a sub-path (e.g., /os).

Changes:

  • Added path_prefix to OpenSearchSinkConfig and propagated it into ConnectionConfiguration.
  • Configured the underlying RestClientBuilder to use the configured path prefix.
  • Added unit tests and test YAML configuration coverage for parsing/reading path_prefix.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/ConnectionConfiguration.java Threads path_prefix through connection config and applies it to the REST client builder.
data-prepper-plugins/opensearch/src/main/java/org/opensearch/dataprepper/plugins/sink/opensearch/configuration/OpenSearchSinkConfig.java Introduces the new path_prefix sink parameter for configuration parsing.
data-prepper-plugins/opensearch/src/test/java/org/opensearch/dataprepper/plugins/sink/opensearch/ConnectionConfigurationTests.java Adds coverage for default/null and configured path_prefix in connection configuration.
data-prepper-plugins/opensearch/src/test/java/org/opensearch/dataprepper/plugins/sink/opensearch/OpenSearchSinkConfigurationTests.java Adds YAML parsing coverage for path_prefix.
data-prepper-plugins/opensearch/src/test/resources/open-search-sink-configurations.yaml Adds a sample pipeline config including path_prefix.

๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 298 to 301
if (serverlessOptions != null) {
builder = builder.withServerlessNetworkPolicyName(serverlessOptions.getNetworkPolicyName())
.withServerlessCollectionName(serverlessOptions.getCollectionName())
.withServerlessVpceId(serverlessOptions.getVpceId());
Comment on lines 659 to 660
private String password;
private String apitoken;
@dlvenable
dlvenable merged commit f853bea into opensearch-project:main Jun 4, 2026
2 of 6 checks passed
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 1, 2026
Introduce an optional `path_prefix` sink parameter to support OpenSearch
instances served behind a reverse proxy under a custom subdirectory.

Resolves opensearch-project#6654

Signed-off-by: Luis Pigueiras <luis.pigueiras@cern.ch>
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.

Add support for sinking data to an Opensearch instance behind a reverse proxy

5 participants