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

[BUG][DISTRIBUTION][2.0.0] Could not resolve org.opensearch:opensearch:2.0.0-rc1 #566

Closed
peterzhuamazon opened this issue Apr 19, 2022 · 5 comments · Fixed by #567
Closed

Comments

@peterzhuamazon
Copy link
Member

> Task :opensearch:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':opensearch:compileJava'.
> Could not resolve all files for configuration ':opensearch:compileClasspath'.
   > Could not resolve org.opensearch:opensearch:2.0.0-rc1.
     Required by:
         project :opensearch
      > No matching variant of org.opensearch:opensearch:2.0.0-rc1 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' capability org.opensearch:opensearch:2.0.0-rc1 declares an API of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'runtimeElements' capability org.opensearch:opensearch:2.0.0-rc1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
   > Could not resolve org.opensearch.client:opensearch-rest-high-level-client:2.0.0-rc1.
     Required by:
         project :opensearch
      > No matching variant of org.opensearch.client:opensearch-rest-high-level-client:2.0.0-rc1 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' capability org.opensearch.client:opensearch-rest-high-level-client:2.0.0-rc1 declares an API of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'runtimeElements' capability org.opensearch.client:opensearch-rest-high-level-client:2.0.0-rc1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org/

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD FAILED in 1m 14s
20 actionable tasks: 20 executed
2022-04-19 17:03:28 ERROR    Error building sql, retry with: ./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component sql
Traceback (most recent call last):
  File "./src/run_build.py", line 80, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 68, in main
    builder.build(build_recorder)
  File "/var/jenkins/workspace/distribution-build-opensearch@2/src/build_workflow/builder_from_source.py", line 55, in build
    self.git_repo.execute(build_command)
  File "/var/jenkins/workspace/distribution-build-opensearch@2/src/git/git_repository.py", line 83, in execute
    subprocess.check_call(command, cwd=cwd, shell=True)
  File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash /var/jenkins/workspace/distribution-build-opensearch@2/scripts/default/opensearch/build.sh -v 2.0.0 -q rc1 -p linux -a x64 -s false -o builds' returned non-zero exit status 1.
@joshuali925
Copy link
Member

@peterzhuamazon could you provide command or steps to reproduce failure? do i run build.sh in main branch of opensearch-build?

@peterzhuamazon
Copy link
Member Author

Command in error logs already there:

2022-04-19 17:03:28 ERROR    Error building sql, retry with: ./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component sql

@peterzhuamazon
Copy link
Member Author

Also, I suggest you run the opensearch 1st

./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component OpenSearch
then
./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component sql

@vamsi-amazon
Copy link
Member

Cut 2.0 from wrong commit. I have raised a PR to fix this. #567

@peterzhuamazon peterzhuamazon linked a pull request Apr 19, 2022 that will close this issue
Merged
6 tasks
@vamsi-amazon
Copy link
Member

Closing this issue as the buiild is successful in latest jenkins run. Reopen if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants