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

Fixing version for the client #254

Merged
merged 3 commits into from
Nov 3, 2022
Merged

Conversation

VachaShah
Copy link
Collaborator

Signed-off-by: Vacha Shah vachshah@amazon.com

Description

Realized that the version would not include SNAPSHOT, publishing to sonatype adds this suffix. Refer publish snapshots workflow.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

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.

Signed-off-by: Vacha Shah <vachshah@amazon.com>
reta
reta previously approved these changes Nov 3, 2022
@reta
Copy link
Collaborator

reta commented Nov 3, 2022

@VachaShah ah ... I see what is happening, the Apache Lucene snapshots come from our custom Cloudfront bucket .... let me quickly look for a fix there

@reta
Copy link
Collaborator

reta commented Nov 3, 2022

@VachaShah could you please make the following changes in the java-client/build.gradle.kts

  • add dependencies to buildscript section

    buildscript {
        repositories {
            mavenLocal()
            maven(url = "https://aws.oss.sonatype.org/content/repositories/snapshots")
            mavenCentral()
            maven(url = "https://plugins.gradle.org/m2/")
        }
        dependencies {
            "classpath"(group = "org.opensearch.gradle", name = "build-tools", version = "3.0.0-SNAPSHOT")
        }
    }
    
  • right after plugins section, add please apply(plugin = "opensearch.repositories"):

    plugins {
       ... /* unchanged */
    }
    
    apply(plugin = "opensearch.repositories")
    

Signed-off-by: Vacha Shah <vachshah@amazon.com>
@VachaShah
Copy link
Collaborator Author

@VachaShah could you please make the following changes in the java-client/build.gradle.kts

  • add dependencies to buildscript section
    buildscript {
        repositories {
            mavenLocal()
            maven(url = "https://aws.oss.sonatype.org/content/repositories/snapshots")
            mavenCentral()
            maven(url = "https://plugins.gradle.org/m2/")
        }
        dependencies {
            "classpath"(group = "org.opensearch.gradle", name = "build-tools", version = "3.0.0-SNAPSHOT")
        }
    }
    
  • right after plugins section, add please apply(plugin = "opensearch.repositories"):
    plugins {
       ... /* unchanged */
    }
    
    apply(plugin = "opensearch.repositories")
    

I added the changes. Its weird though on my local I keep getting compile errors for HttpClient:

/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/endpoints/SimpleEndpoint.java:36: error: package org.apache.hc.core5.net does not exist
import org.apache.hc.core5.net.URLEncodedUtils;
                              ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:52: error: package org.apache.hc.core5.http does not exist
import org.apache.hc.core5.http.ContentType;
                               ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:53: error: package org.apache.hc.core5.http does not exist
import org.apache.hc.core5.http.HttpEntity;
                               ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:54: error: package org.apache.hc.core5.http.io.entity does not exist
import org.apache.hc.core5.http.io.entity.BufferedHttpEntity;
                                         ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:55: error: package org.apache.hc.core5.http.io.entity does not exist
import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
                                         ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:56: error: package org.apache.hc.core5.http.io.entity does not exist
import org.apache.hc.core5.http.io.entity.EntityUtils;
                                         ^
/home/ubuntu/opensearch-java/java-client/src/main/java/org/opensearch/client/transport/rest_client/RestClientTransport.java:74: error: cannot find symbol
    static final ContentType JsonContentType = ContentType.APPLICATION_JSON;

Signed-off-by: Vacha Shah <vachshah@amazon.com>
@reta
Copy link
Collaborator

reta commented Nov 3, 2022

I added the changes. Its weird though on my local I keep getting compile errors for HttpClient:

I can think of stale 3.0.0 snapshots ... May be do ./gradlew check--refresh-dependencies

@VachaShah
Copy link
Collaborator Author

I added the changes. Its weird though on my local I keep getting compile errors for HttpClient:

I can think of stale 3.0.0 snapshots ... May be do ./gradlew check--refresh-dependencies

Yeah I tried that, even cleaning gradle caches and doing a clean build but keep running into it. But looks like it is just an issue on my local, the workflows in the repo are fine. Will look into how to fix on my local. Thank you!

@reta reta merged commit 4229b59 into opensearch-project:main Nov 3, 2022
@VachaShah VachaShah deleted the fix-version branch November 3, 2022 17:35
@VachaShah
Copy link
Collaborator Author

I added the changes. Its weird though on my local I keep getting compile errors for HttpClient:

I can think of stale 3.0.0 snapshots ... May be do ./gradlew check--refresh-dependencies

Yeah I tried that, even cleaning gradle caches and doing a clean build but keep running into it. But looks like it is just an issue on my local, the workflows in the repo are fine. Will look into how to fix on my local. Thank you!

Realized I didn't have OpenSearch 3.0.0-SNAPSHOT on my maven local. Publishing it to maven local fixed the issue.

@reta
Copy link
Collaborator

reta commented Nov 3, 2022

I added the changes. Its weird though on my local I keep getting compile errors for HttpClient:

I can think of stale 3.0.0 snapshots ... May be do ./gradlew check--refresh-dependencies

Yeah I tried that, even cleaning gradle caches and doing a clean build but keep running into it. But looks like it is just an issue on my local, the workflows in the repo are fine. Will look into how to fix on my local. Thank you!

Realized I didn't have OpenSearch 3.0.0-SNAPSHOT on my maven local. Publishing it to maven local fixed the issue.

Hm ... it should have been taken from https://aws.oss.sonatype.org/content/repositories/snapshots

@VachaShah VachaShah added the v3.0.0 Issues and PRs related to version v3.0.0 label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3.0.0 Issues and PRs related to version v3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants