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] Build broken in 2.0 distribution #528

Closed
Tracked by #1895
dblock opened this issue Apr 4, 2022 · 2 comments
Closed
Tracked by #1895

[BUG] Build broken in 2.0 distribution #528

dblock opened this issue Apr 4, 2022 · 2 comments
Labels
bug Something isn't working untriaged v2.0.0

Comments

@dblock
Copy link
Member

dblock commented Apr 4, 2022

Describe the bug

./build.sh manifests/2.0.0/opensearch-2.0.0.yml --snapshot --component=sql

> 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)
@joshuali925
Copy link
Member

how do i reproduce? build passed locally

❯ ./build.sh manifests/2.0.0/opensearch-2.0.0.yml --snapshot --component=sql
Installing dependencies in . ...
Creating a virtualenv for this project...
Pipfile: /local/home/user/projects/os-2.0/opensearch-build/Pipfile
Using /usr/bin/python3.7m (3.7.10) to create virtualenv...
⠦ Creating virtual environment...created virtual environment CPython3.7.10.final.0-64 in 369ms
  creator CPython3Posix(dest=/local/home/user/.local/share/virtualenvs/opensearch-build-Y_tIg13j, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/local/home/user/.local/share/virtualenv)
    added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

✔ Successfully created virtual environment!
Virtualenv location: /home/user/.local/share/virtualenvs/opensearch-build-Y_tIg13j
Installing dependencies from Pipfile.lock (16e10a)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 53/53 — 00:00:20
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Running ./src/run_build.py manifests/2.0.0/opensearch-2.0.0.yml --snapshot --component=sql ...
2022-04-04 18:12:12 INFO     Building in /tmp/tmp4y18jmca
2022-04-04 18:12:12 INFO     Building OpenSearch (x64) into /local/home/user/projects/os-2.0/opensearch-build/builds/opensearch
2022-04-04 18:12:12 INFO     Skipping OpenSearch
2022-04-04 18:12:12 INFO     Skipping common-utils
2022-04-04 18:12:12 INFO     Skipping job-scheduler
2022-04-04 18:12:12 INFO     Skipping ml-commons
2022-04-04 18:12:12 INFO     Skipping k-NN
2022-04-04 18:12:12 INFO     Building sql
2022-04-04 18:12:12 INFO     Executing "git init" in /tmp/tmp4y18jmca/sql
2022-04-04 18:12:12 INFO     Executing "git remote add origin https://github.com/opensearch-project/sql.git" in /tmp/tmp4y18jmca/sql
2022-04-04 18:12:12 INFO     Executing "git fetch --depth 1 origin main" in /tmp/tmp4y18jmca/sql
2022-04-04 18:12:16 INFO     Executing "git checkout FETCH_HEAD" in /tmp/tmp4y18jmca/sql
2022-04-04 18:12:16 INFO     Executing "git rev-parse HEAD" in /tmp/tmp4y18jmca/sql
2022-04-04 18:12:16 INFO     Checked out https://github.com/opensearch-project/sql.git@main into /tmp/tmp4y18jmca/sql at d3a76c907b022e3859f6f7ebd8e73188c9cfdf8f
2022-04-04 18:12:16 INFO     Executing "bash /local/home/user/projects/os-2.0/opensearch-build/scripts/default/opensearch/build.sh -v 2.0.0 -q alpha1 -p linux -a x64 -s true -o builds" in /tmp/tmp4y18jmca/sql
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ VERSION=2.0.0
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ QUALIFIER=alpha1
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ SNAPSHOT=true
+ getopts :h:v:q:s:o:p:a: arg
+ case $arg in
+ OUTPUT=builds
+ getopts :h:v:q:s:o:p:a: arg
+ '[' -z 2.0.0 ']'
+ [[ ! -z alpha1 ]]
+ VERSION=2.0.0-alpha1
+ [[ true == \t\r\u\e ]]
+ VERSION=2.0.0-alpha1-SNAPSHOT
+ '[' -z builds ']'
+ mkdir -p builds
+ ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=2.0.0-alpha1-SNAPSHOT -Dbuild.snapshot=true -Dbuild.version_qualifier=alpha1
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 7.3
  OS Info               : Linux 5.4.176-103.347.amzn2int.x86_64 (amd64)
  JDK Version           : 11 (OpenJDK)
  JAVA_HOME             : /local/home/user/.local/jdk-11.0.2
  Random Testing Seed   : 7E6A4688CD30E3EB
  In FIPS 140 mode      : false
=======================================

> Task :core:compileJava
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/expression/ParseExpression.java:25: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/ProjectOperator.java:29: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/RareTopNOperator.java:36: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/DedupeOperator.java:29: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/LimitOperator.java:31: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/AggregationOperator.java:28: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/FilterOperator.java:24: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/RemoveOperator.java:31: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/SortOperator.java:35: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/planner/physical/RenameOperator.java:31: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
/tmp/tmp4y18jmca/sql/core/src/main/java/org/opensearch/sql/ast/tree/Limit.java:20: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 warnings

> 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/tmp4y18jmca/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:compileJava
/tmp/tmp4y18jmca/sql/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java:23: warning: Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.
@EqualsAndHashCode
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning

> Task :sql:generateGrammarSource
Execution optimizations have been disabled for task ':sql:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/tmp/tmp4y18jmca/sql/sql/build/generated-src/antlr/main/org/opensearch/sql/sql/antlr/parser'. Reason: Task ':sql:generateEffectiveLombokConfig' uses this output of task ':sql: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(184): OpenSearchSQLLexer.g4:112:0: One of the token MISSING values unreachable. MISSING is always overlapped by token MISSING_LITERAL

> Task :legacy:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :ppl:generateGrammarSource
Execution optimizations have been disabled for task ':ppl:generateGrammarSource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/tmp/tmp4y18jmca/sql/ppl/build/generated-src/antlr/main/org/opensearch/sql/ppl/antlr/parser'. Reason: Task ':ppl:generateEffectiveLombokConfig' uses this output of task ':ppl: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.

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 3 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 1m 8s
43 actionable tasks: 43 executed
++ find . -path '*build/distributions/*.zip'
+ zipPath=./plugin/build/distributions/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip
++ dirname ./plugin/build/distributions/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip
+ distributions=./plugin/build/distributions
+ echo 'COPY ./plugin/build/distributions/*.zip'
COPY ./plugin/build/distributions/*.zip
+ mkdir -p builds/plugins
+ cp ./plugin/build/distributions/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip ./builds/plugins
2022-04-04 18:13:25 INFO     Recording plugins artifact for sql: plugins/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip (from /tmp/tmp4y18jmca/sql/builds/plugins/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip)
2022-04-04 18:13:25 INFO     Checked /tmp/tmp4y18jmca/sql/builds/plugins/opensearch-sql-2.0.0.0-alpha1-SNAPSHOT.zip (2.0.0.0-alpha1-SNAPSHOT)
2022-04-04 18:13:25 INFO     Skipping opensearch-observability
2022-04-04 18:13:25 INFO     Created build manifest /local/home/user/projects/os-2.0/opensearch-build/builds/opensearch/manifest.yml
2022-04-04 18:13:25 INFO     Done.

@dblock
Copy link
Member Author

dblock commented Apr 4, 2022

Since this passes in CI let’s close, I’ll clean and my environment and reopen if this happens again.

@dblock dblock closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged v2.0.0
Projects
None yet
Development

No branches or pull requests

2 participants