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-alpha1-SNAPSHOT #534

Closed
peterzhuamazon opened this issue Apr 5, 2022 · 7 comments
Assignees

Comments

@peterzhuamazon
Copy link
Member

> Task :legacy:generateGrammarSource
Execution optimizations have been disabled for task ':legacy:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/tmp/tmp44v5mz1a/sql/legacy/build/generated-src/antlr/main/org/opensearch/sql/legacy/antlr/parser'. Reason: Task ':legacy:generateEffectiveLombokConfig' uses this output of task ':legacy:generateGrammarSource' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#implicit_dependency for more details about this problem.
warning(125): OpenSearchLegacySqlParser.g4:280:47: implicit definition of token TIME in parser
warning(125): OpenSearchLegacySqlParser.g4:481:21: implicit definition of token ADDDATE in parser
warning(125): OpenSearchLegacySqlParser.g4:481:31: implicit definition of token ADDTIME in parser
warning(125): OpenSearchLegacySqlParser.g4:481:41: implicit definition of token GREATEST in parser
warning(125): OpenSearchLegacySqlParser.g4:481:52: implicit definition of token LEAST in parser

> Task :opensearch:generateEffectiveLombokConfig
> 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-alpha1-SNAPSHOT.
     Required by:
         project :opensearch
      > No matching variant of org.opensearch:opensearch:2.0.0-alpha1-SNAPSHOT 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-alpha1-SNAPSHOT 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-alpha1-SNAPSHOT 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-alpha1-SNAPSHOT.
     Required by:
         project :opensearch
      > No matching variant of org.opensearch.client:opensearch-rest-high-level-client:2.0.0-alpha1-SNAPSHOT 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-alpha1-SNAPSHOT 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-alpha1-SNAPSHOT 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 47s
20 actionable tasks: 20 executed
2022-04-05 02:45:15 ERROR    Error building sql, retry with: ./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component sql --snapshot
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/src/build_workflow/builder_from_source.py", line 55, in build
    self.git_repo.execute(build_command)
  File "/var/jenkins/workspace/distribution-build-opensearch/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/scripts/default/opensearch/build.sh -v 2.0.0 -q alpha1 -p linux -a x64 -s true -o builds' returned non-zero exit status 1.
@bbarani
Copy link
Member

bbarani commented Apr 5, 2022

@anirudha @joshuali925 @vamsi-amazon Can you look in to the build failures?

@vamsi-amazon
Copy link
Member

@bbarani looking into it.

@anirudha
Copy link
Collaborator

anirudha commented Apr 5, 2022

Could not resolve all files for configuration ':opensearch:compileClasspath'.

Could not resolve org.opensearch:opensearch:2.0.0-alpha1-SNAPSHOT.

@vamsi-amazon
Copy link
Member

@peterzhuamazon we tried running the command in our ec2 instances, but couldn't reproduce the issue. From this statement Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8, we changed sourceCompatibility and targetCompatibility to 11 in sql plugin.

But not sure how to verify if this works. Could you please help us in testing and replicating the bug.

@peterzhuamazon
Copy link
Member Author

#535

@peterzhuamazon
Copy link
Member Author

Synced with @vamsi-amazon already he checked the wrong pipeline.

@vamsi-amazon vamsi-amazon mentioned this issue Apr 5, 2022
6 tasks
@peterzhuamazon
Copy link
Member Author

1947 build successful on jenkins for opensearch, close this.
Thanks.

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

No branches or pull requests

4 participants