Skip to content

Migrate OpenSearchSink off of plugin Settings#5273

Merged
kkondaka merged 67 commits intoopensearch-project:mainfrom
Galactus22625:openSearch-sink-configuration-changes
Feb 24, 2025
Merged

Migrate OpenSearchSink off of plugin Settings#5273
kkondaka merged 67 commits intoopensearch-project:mainfrom
Galactus22625:openSearch-sink-configuration-changes

Conversation

@Galactus22625
Copy link
Copy Markdown
Member

@Galactus22625 Galactus22625 commented Dec 18, 2024

Description

Migrate OpenSearchSink off of plugin Settings.
Tested that I can write with a pipeline into OpenSearch Sink. Tested that writing to s3 dlq works. Integration tests pass.

Issues

This resolves #5246

Notes:
IndexConfiguration.getPipeline() would always return null since it pulled form a non existent field in pipelineSettings., meaning the pipeline field for objects in bulkRequest is always null. If pipeline field is populated bulkRequest would fail.

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.

…nstead of PluginSettings. Rebuild readConnectionConfiguration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
…OpenSearchSink. Remove commented out code

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I should move this to opensearch/build.gradle file

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

moved

Galactus22625 and others added 2 commits January 8, 2025 12:43
…adle

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
@Galactus22625 Galactus22625 requested a review from san81 as a code owner January 16, 2025 18:21
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
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.

These should not show up as changes in this PR since they were already applied. You may need to rebase from main to correct this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed by merging main into branch

this.failedBulkOperationConverter = new FailedBulkOperationConverter(pluginSetting.getPipelineName(), pluginSetting.getName(),
pluginSetting.getName());
this.failedBulkOperationConverter = new FailedBulkOperationConverter(pipeline, PLUGIN_NAME,
PLUGIN_NAME);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If passing plugin_name is Ok in the place of plugin_id here then I would recommend not passing it and fixing the FailedBulkOperationConverter to just take one plugin_name

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

changed

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
configurationMetadata.put("authentication", Map.of("username", TEST_USERNAME, "password", TEST_PASSWORD));
final PluginSetting pluginSetting = getPluginSettingByConfigurationMetadata(configurationMetadata);
assertThrows(IllegalStateException.class,
() -> ConnectionConfiguration.readConnectionConfiguration(pluginSetting));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are these two tests not applicable anymore?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The "authentication: username: password:" fields were removed since they aren't listed in the documentation, and "username: password:" already exist separately. Also part of the goal of the migration was to not allow people to put in fields that weren't valid in the configuration and I was under the impression that these fields are not supposed to be valid. since they were removed the tests arent needed anymore

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@dlvenable Are you OK with this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I talked to david earlier and he said that we should continue to support this configuration and then disallow in osi instead. I will readd

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok, re added support

final OpenSearchSink objectUnderTest2 = createObjectUnderTest();
assertThat(objectUnderTest2.getDocument(event).getPipelineField(), equalTo(Optional.of(pipelineValue)));
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this test removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

PipelineField is always null because of this comment. So test is no longer necessary
#5273 (comment)

metadata.put(PIPELINE, expectedPipelineValue);
final PluginSetting pluginSetting = getPluginSetting(metadata);
final IndexConfiguration indexConfiguration = IndexConfiguration.readIndexConfig(pluginSetting);
assertEquals(expectedPipelineValue, indexConfiguration.getPipeline());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this test removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

pipeline value is no longer retrieved from indexConfiguration, comes from pipelineDescription now

final IndexConfiguration indexConfiguration = IndexConfiguration.readIndexConfig(pluginSetting);
assertEquals(expectedRoutingFieldValue, indexConfiguration.getRoutingField());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this test removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

forgot to re-add when routing Field was put back. readding

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
private FailedBulkOperationConverter failedBulkOperationConverter;

private DlqProvider dlqProvider;
private S3DlqProvider s3DlqProvider;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should stick with the interface instead of implementation class here.

Copy link
Copy Markdown
Member Author

@Galactus22625 Galactus22625 Feb 19, 2025

Choose a reason for hiding this comment

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

the problem is the dlqProvider is based on PluginSetting as well, which I think we don't want to use anymore, see OpenSearchSink line 195.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that would not prevent us from using interface in the attribute declaration

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh you are right, fixing.


OpenSearchSinkConfiguration.readESConfig(pluginSetting);

@Test(expected = NullPointerException.class)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we throw a more informational Exception than NPE?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Null pointer is thrown when the builder fails. We use @AssertTrue which throws a message when actions are invalid in the configuration, but I don't know how to trigger this in the test cases.

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Copy link
Copy Markdown
Member

@dlvenable dlvenable left a comment

Choose a reason for hiding this comment

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

Thank you @Galactus22625 !

@kkondaka kkondaka merged commit 91fd92e into opensearch-project:main Feb 24, 2025
67 of 68 checks passed
@Galactus22625 Galactus22625 deleted the openSearch-sink-configuration-changes branch February 27, 2025 03:03
chenqi0805 pushed a commit to chenqi0805/data-prepper that referenced this pull request Apr 2, 2025
* restruction OpenSearchSinkConfiguration to use openSearchSinkConfig instead of PluginSettings.  Rebuild readConnectionConfiguration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readIndexConfig and associated changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readRetryConfig.  Remove most instances of PluginSetting from OpenSearchSink.  Remove commented out code

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* save point

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework OpenSearchSinkConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework RetryConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* condense many test yaml files into one

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework ConnectionConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework IndexConfigurationTests.java.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* copy files over from source

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* adjust all unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* spotless check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration tests to OpenSearchSinkConfig from PluginSetting

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* build.gradle change?

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove hosts in integration test metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* changing enforcement for required and non required fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* reset awsauthconfig to normal

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace authentication field from unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document_id_field to document_id since deprecated

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace pluginSetting dependent parts of integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipeline name missing from integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* find what is null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pipelineDescription Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pluginSetting Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add pluginSetting name mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* me when I see stack trace

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert bulk retry strat

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert reversion

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipelineValue has to be null for documents to write.  Originally pipeline is always null because indexconfiguration pipelien value was always null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* unit test update

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration test changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove Routing Field since its not in documentation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove routing field integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustment :/

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix invalidactions integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* addressing various pr comments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action type as enum

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* indexconfiguration constants to opensearchsinkconfig

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd deprecated fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix integration tests to reuse deprecatd routing field and document id field

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action to enum integratin test fixes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* string should be fine for integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document id field should have testIdField as value in Integration Tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integraton tests should pass now

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Connection configuration switched back to using metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* yaml lines not needed conncection configuraion tests switched back to metadata approach

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* style fix

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* assert True issue

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* put routing field test back

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add license header to new files

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* move build.gradle changes to data-prepper-plugins/opensearch/build.gradle

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* update actions artifacts version for integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fixed new test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* FailedbulkOperationConveter takes the same input twice

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd a routing field test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove refernces to invalid authentication configuration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* we want to support authentication: username: password: config

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* use itnerface instead of implementation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

---------

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
Signed-off-by: George Chen <qchea@amazon.com>
amdhing pushed a commit to amdhing/data-prepper that referenced this pull request Apr 16, 2025
* restruction OpenSearchSinkConfiguration to use openSearchSinkConfig instead of PluginSettings.  Rebuild readConnectionConfiguration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readIndexConfig and associated changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readRetryConfig.  Remove most instances of PluginSetting from OpenSearchSink.  Remove commented out code

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* save point

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework OpenSearchSinkConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework RetryConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* condense many test yaml files into one

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework ConnectionConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework IndexConfigurationTests.java.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* copy files over from source

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* adjust all unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* spotless check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration tests to OpenSearchSinkConfig from PluginSetting

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* build.gradle change?

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove hosts in integration test metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* changing enforcement for required and non required fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* reset awsauthconfig to normal

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace authentication field from unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document_id_field to document_id since deprecated

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace pluginSetting dependent parts of integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipeline name missing from integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* find what is null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pipelineDescription Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pluginSetting Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add pluginSetting name mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* me when I see stack trace

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert bulk retry strat

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert reversion

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipelineValue has to be null for documents to write.  Originally pipeline is always null because indexconfiguration pipelien value was always null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* unit test update

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration test changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove Routing Field since its not in documentation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove routing field integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustment :/

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix invalidactions integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* addressing various pr comments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action type as enum

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* indexconfiguration constants to opensearchsinkconfig

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd deprecated fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix integration tests to reuse deprecatd routing field and document id field

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action to enum integratin test fixes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* string should be fine for integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document id field should have testIdField as value in Integration Tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integraton tests should pass now

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Connection configuration switched back to using metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* yaml lines not needed conncection configuraion tests switched back to metadata approach

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* style fix

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* assert True issue

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* put routing field test back

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add license header to new files

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* move build.gradle changes to data-prepper-plugins/opensearch/build.gradle

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* update actions artifacts version for integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fixed new test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* FailedbulkOperationConveter takes the same input twice

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd a routing field test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove refernces to invalid authentication configuration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* we want to support authentication: username: password: config

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* use itnerface instead of implementation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

---------

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
Davidding4718 pushed a commit to Davidding4718/data-prepper that referenced this pull request Apr 24, 2025
* restruction OpenSearchSinkConfiguration to use openSearchSinkConfig instead of PluginSettings.  Rebuild readConnectionConfiguration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readIndexConfig and associated changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* rebuild readRetryConfig.  Remove most instances of PluginSetting from OpenSearchSink.  Remove commented out code

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* save point

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework OpenSearchSinkConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework RetryConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* small changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* condense many test yaml files into one

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework ConnectionConfigurationTests.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Rework IndexConfigurationTests.java.java

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* copy files over from source

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* adjust all unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* spotless check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration tests to OpenSearchSinkConfig from PluginSetting

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* build.gradle change?

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove hosts in integration test metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* changing enforcement for required and non required fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* reset awsauthconfig to normal

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace authentication field from unit tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document_id_field to document_id since deprecated

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* replace pluginSetting dependent parts of integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipeline name missing from integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* find what is null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pipelineDescription Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* initialize pluginSetting Mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add pluginSetting name mock

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* me when I see stack trace

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert bulk retry strat

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* revert reversion

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* pipelineValue has to be null for documents to write.  Originally pipeline is always null because indexconfiguration pipelien value was always null

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* unit test update

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Integration test changes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove Routing Field since its not in documentation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove routing field integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integration test adjustment :/

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix invalidactions integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* addressing various pr comments

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action type as enum

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* indexconfiguration constants to opensearchsinkconfig

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd deprecated fields

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix integration tests to reuse deprecatd routing field and document id field

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* action to enum integratin test fixes

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* string should be fine for integration test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fix enum string check

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* document id field should have testIdField as value in Integration Tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* integraton tests should pass now

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* Connection configuration switched back to using metadata

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* yaml lines not needed conncection configuraion tests switched back to metadata approach

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* style fix

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* assert True issue

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* put routing field test back

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* add license header to new files

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* move build.gradle changes to data-prepper-plugins/opensearch/build.gradle

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* update actions artifacts version for integration tests

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* fixed new test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* FailedbulkOperationConveter takes the same input twice

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* readd a routing field test

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* remove refernces to invalid authentication configuration

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* we want to support authentication: username: password: config

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

* use itnerface instead of implementation

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>

---------

Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
Signed-off-by: Siqi Ding <dingdd@amazon.com>
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.

Migrate existing plugins to use POJO configuration classes.

6 participants