-
Notifications
You must be signed in to change notification settings - Fork 191
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
Breaking changes for type removal #132
Breaking changes for type removal #132
Conversation
.github/workflows/build.yml
Outdated
@@ -17,6 +17,19 @@ jobs: | |||
with: | |||
java-version: '14' | |||
distribution: 'adopt' | |||
|
|||
- name: Checkout OpenSearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm ... why we are building opensearch-project/opensearch
instead of using published snapshots from https://aws.oss.sonatype.org/content/repositories/snapshots/
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my bad! I can use that for build and unit test. I will update the workflows for the same.
if (propsSet == (_index | _type)) { | ||
StringBuilder buf = new StringBuilder(); | ||
buf.append("/"); | ||
SimpleEndpoint.pathEncode(request.index, buf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like _index
should not be dropped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ... not visible in changeset, thank you!
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190 | ||
- name: Run Docker Image | ||
run: | | ||
docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am 100% sure there is a staging repository for Docker images, @dblock @peterzhuamazon could you please refer to the right one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there is one, but the staging image is with all the plugins which isn't ready yet. This is to test against min OpenSearch image. This also helps in client development when a new version of OpenSearch is being developed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried the route of writing Dockerfile and related things to create a docker image for min OpenSearch and use the script in opensearch-build to use the build and run the image. But then I found this gradle task that runs in assemble for OpenSearch so used this one. LMK if you think the Dockerfile route is better. I can use that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think publishing min Docker images (along with artifacts) would be the best option, may be we could quickly address that? Another possibility is to use OpenSearch test scaffolding (available as set of Gradle plugins) to run clusters from the test suites. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use the Gradle plugins since I wanted to create a CI way for all the clients. It can work for java client but we would still end up in the same place for other clients. The main purpose of this is for clients to be ready to be released when a new version of OpenSearch is being released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, thank you, publishing min Docker images (along with artifacts) would be the answer, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that would be the best option. Till that happens, is it fine if we use this change so we can start the development for 2.0? WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure, I think it is viable option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we will be adding API for plugins too and we need unreleased complete distribution for testing. Shall we create an issue to track this if it is not created already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please do, I think it will useful for many
I will merge the changes from #134 once that is approved and merged and update the workflows with the appropriate JDK versions. |
Signed-off-by: Vacha Shah <[email protected]>
Signed-off-by: Vacha Shah <[email protected]>
Signed-off-by: Vacha Shah <[email protected]>
Signed-off-by: Vacha Shah <[email protected]>
35b7c06
to
c8b8720
Compare
Signed-off-by: Vacha Shah <[email protected]>
c8b8720
to
d82f4b6
Compare
Signed-off-by: Vacha Shah <[email protected]>
@VachaShah I see java client is using checkstyle for formatting. Moving forward do we have any plan to have Spotless as the formatting tool? |
No plans as such but you can create a PR :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for making the changes.
Not sure why the whitesource check is failing, the dependency was updated in #129. Will keep an eye on it. |
val jacksonVersion = "2.12.6" | ||
val jacksonDatabindVersion = "2.12.6.1" | ||
|
||
// Apache 2.0 | ||
implementation("org.opensearch.client", "opensearch-rest-client", opensearchVersion) | ||
testImplementation("org.opensearch.test", "framework", opensearchVersion) | ||
implementation("org.apache.logging.log4j", "log4j-core", "2.17.2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this introducing a hard-coded dependency on the Log4j framework? Surely the client should only be dependent on the facade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may be right @dermot-hardy! Care to open an issue/contribute a fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR contains the first set of breaking changes for 2.0 related to OpenSearch 2.0 - opensearch-project/OpenSearch#2480
The following changes are included in this PR:
test-integration-unreleased.yml
which runs integ tests for the client against unreleased OpenSearch. This will help in future development to prepare clients with the latest unreleased OpenSearch versions. Currently this workflow will test against 2.0 OpenSearch.test-integration.yml
is updated to work for released versions which the client is compatible with.indices.exists_type
andindices.flush_synced
and related files.Issues Resolved
Part of #139
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.