opensearch-project / geospatial

Future home of Geospatial features for OpenSearch
Apache License 2.0
33 stars 34 forks source link

[BUG] Unable to do local build of Plugin as lucene-core-9.3.0-SNAPSHOT throwing error #135

Closed navneet1v closed 2 years ago

navneet1v commented 2 years ago

Describe the bug Getting error while building the OpenSearch plugin

To Reproduce Steps to reproduce the behavior:

  1. Go to https://github.com/opensearch-project/geospatial
  2. Checkout the repo on you local
  3. Try to do ./gradlew build
  4. See error
Could not determine the dependencies of task ':thirdPartyAudit'.
> Could not resolve all files for configuration ':resolveableCompileOnly'.
   > Could not resolve org.apache.lucene:lucene-core:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-core:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-core/9.3.0-SNAPSHOT/lucene-core-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-core/9.3.0-SNAPSHOT/lucene-core-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-analysis-common:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-analysis-common:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-analysis-common/9.3.0-SNAPSHOT/lucene-analysis-common-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-analysis-common/9.3.0-SNAPSHOT/lucene-analysis-common-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-backward-codecs:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-backward-codecs:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-backward-codecs/9.3.0-SNAPSHOT/lucene-backward-codecs-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-backward-codecs/9.3.0-SNAPSHOT/lucene-backward-codecs-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-grouping:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-grouping:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-grouping/9.3.0-SNAPSHOT/lucene-grouping-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-grouping/9.3.0-SNAPSHOT/lucene-grouping-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-highlighter:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-highlighter:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-highlighter/9.3.0-SNAPSHOT/lucene-highlighter-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-highlighter/9.3.0-SNAPSHOT/lucene-highlighter-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-join:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-join:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-join/9.3.0-SNAPSHOT/lucene-join-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-join/9.3.0-SNAPSHOT/lucene-join-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-memory:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-memory:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-memory/9.3.0-SNAPSHOT/lucene-memory-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-memory/9.3.0-SNAPSHOT/lucene-memory-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-misc:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-misc:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-misc/9.3.0-SNAPSHOT/lucene-misc-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-misc/9.3.0-SNAPSHOT/lucene-misc-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-queries:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-queries:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-queries/9.3.0-SNAPSHOT/lucene-queries-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-queries/9.3.0-SNAPSHOT/lucene-queries-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-queryparser:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-queryparser:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-queryparser/9.3.0-SNAPSHOT/lucene-queryparser-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-queryparser/9.3.0-SNAPSHOT/lucene-queryparser-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-sandbox:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-sandbox:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-sandbox/9.3.0-SNAPSHOT/lucene-sandbox-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-sandbox/9.3.0-SNAPSHOT/lucene-sandbox-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-spatial-extras:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-spatial-extras:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-spatial-extras/9.3.0-SNAPSHOT/lucene-spatial-extras-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-spatial-extras/9.3.0-SNAPSHOT/lucene-spatial-extras-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-spatial3d:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-spatial3d:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-spatial3d/9.3.0-SNAPSHOT/lucene-spatial3d-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-spatial3d/9.3.0-SNAPSHOT/lucene-spatial3d-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict
   > Could not resolve org.apache.lucene:lucene-suggest:9.3.0-SNAPSHOT.
     Required by:
         project : > org.opensearch:opensearch:3.0.0-SNAPSHOT
      > Could not resolve org.apache.lucene:lucene-suggest:9.3.0-SNAPSHOT.
         > Could not get resource 'https://plugins.gradle.org/m2/org/apache/lucene/lucene-suggest/9.3.0-SNAPSHOT/lucene-suggest-9.3.0-SNAPSHOT.pom'.
            > Could not GET 'https://repo.gradle.org/artifactory/jcenter/org/apache/lucene/lucene-suggest/9.3.0-SNAPSHOT/lucene-suggest-9.3.0-SNAPSHOT.pom'. Received status code 409 from server: Conflict

Expected behavior A clear and concise description of what you expected to happen.

Plugins GeoSpatial

Screenshots If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

dblock commented 2 years ago

Moved to geospatial since that's where the issue is. The URL to get lucene snapshots comes from https://github.com/opensearch-project/OpenSearch/blob/1eda2bbe3ad5d60d10c60d5e4fd1e8711198b4c4/buildSrc/src/main/java/org/opensearch/gradle/RepositoriesSetupPlugin.java#L97, or otherwise you can add that explicitly like in https://github.com/opensearch-project/opensearch-sdk-java/blob/7af4f075757b292ae21f590df59419328b3f2dff/build.gradle#L49

navneet1v commented 2 years ago

@dblock I am not sure it is the issue with Geospatial plugin. Somehow, on my local development I am getting this error where I am not able to download the snapshot of Lucene. Not sure what is the issue. Can you provide some help regarding the debugging like 429 status is little tricky.

navneet1v commented 2 years ago

The bug seems to be specific with the maven cache. Even after clearing the lucene repo from the local maven didn't solve the issue.

At the end used rm -rf ~/.m2/repository to clear the whole local maven repo. Which resolved the issue.

dblock commented 2 years ago

I'm glad this is fixed for you!