Migrate OpenSearchSink off of plugin Settings#5273
Migrate OpenSearchSink off of plugin Settings#5273kkondaka merged 67 commits intoopensearch-project:mainfrom
Conversation
…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>
There was a problem hiding this comment.
I should move this to opensearch/build.gradle file
…adle Signed-off-by: Maxwell Brown <mxwelwbr@amazon.com>
Signed-off-by: Maxwell Brown <55033421+Galactus22625@users.noreply.github.com>
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
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)); |
There was a problem hiding this comment.
Are these two tests not applicable anymore?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
ok, re added support
| final OpenSearchSink objectUnderTest2 = createObjectUnderTest(); | ||
| assertThat(objectUnderTest2.getDocument(event).getPipelineField(), equalTo(Optional.of(pipelineValue))); | ||
| } | ||
|
|
There was a problem hiding this comment.
Why is this test removed?
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
Why is this test removed?
There was a problem hiding this comment.
pipeline value is no longer retrieved from indexConfiguration, comes from pipelineDescription now
| final IndexConfiguration indexConfiguration = IndexConfiguration.readIndexConfig(pluginSetting); | ||
| assertEquals(expectedRoutingFieldValue, indexConfiguration.getRoutingField()); | ||
| } | ||
|
|
There was a problem hiding this comment.
Why is this test removed?
There was a problem hiding this comment.
forgot to re-add when routing Field was put back. readding
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; |
There was a problem hiding this comment.
We should stick with the interface instead of implementation class here.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I think that would not prevent us from using interface in the attribute declaration
There was a problem hiding this comment.
oh you are right, fixing.
|
|
||
| OpenSearchSinkConfiguration.readESConfig(pluginSetting); | ||
|
|
||
| @Test(expected = NullPointerException.class) |
There was a problem hiding this comment.
Can we throw a more informational Exception than NPE?
There was a problem hiding this comment.
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>
* 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>
* 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>
* 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>
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
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.