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

[Bundle Build Break]: Error building dashboards-reports plugin #907

Closed
zelinh opened this issue Nov 8, 2021 · 5 comments
Closed

[Bundle Build Break]: Error building dashboards-reports plugin #907

zelinh opened this issue Nov 8, 2021 · 5 comments
Labels
bug Something isn't working untriaged Issues that have not yet been triaged

Comments

@zelinh
Copy link
Member

zelinh commented Nov 8, 2021

Describe the bug

Currently our bundle-build workflow is broken.
Here is the context of errors.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 26s
1 actionable task: 1 executed
2021-11-08 19:16:20 ERROR    Error building dashboards-reports, retry with: ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports --snapshot

> Task :opensearch:compileJava
/tmp/tmpdju4ovvp/sql/opensearch/src/main/java/org/opensearch/sql/opensearch/executor/protector/ResourceMonitorPlan.java:45: 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 :compileKotlin FAILED
e: /tmp/tmpgefk_kj7/dashboards-reports/reports-scheduler/src/main/kotlin/org/opensearch/reportsscheduler/notifications/NotificationsActions.kt: (19, 67): Unresolved reference: FEATURE_REPORTS
e: /tmp/tmpgefk_kj7/dashboards-reports/reports-scheduler/src/main/kotlin/org/opensearch/reportsscheduler/notifications/NotificationsActions.kt: (99, 58): Unresolved reference: FEATURE_REPORTS

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 26s
1 actionable task: 1 executed
2021-11-08 19:16:22 ERROR    Error building dashboards-reports, retry with: ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports

To reproduce

Run ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports

Expected behavior

No response

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

No response

Additional context

No response

Relevant log output

No response

@zelinh zelinh added bug Something isn't working untriaged Issues that have not yet been triaged labels Nov 8, 2021
@gaiksaya
Copy link
Member

gaiksaya commented Nov 8, 2021

@joshuali925 looks like build is failing for dashboard-reports component. Can you take a look?

@joshuali925
Copy link
Member

@gaiksaya
I merged a PR that should fix this. opensearch-project/reporting#221

Also curious how do I reproduce the build error? I ran ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports but got this:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'opensearch-reports-scheduler'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.opensearch.gradle:build-tools:1.2.0.
     Searched in the following locations:
       - file:<user-home>/.m2/repository/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://repo.maven.apache.org/maven2/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://jcenter.bintray.com/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://plugins.gradle.org/m2/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
     Required by:
         project :

* 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

BUILD FAILED in 11s
2021-11-08 20:02:00 ERROR    Error building dashboards-reports, retry with: ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports
Traceback (most recent call last):
  File "./src/run_build.py", line 65, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 53, in main
    builder.build(build_recorder)
  File "<user-home>/projects/os/opensearch-build/src/build_workflow/builder_from_source.py", line 49, in build
    self.git_repo.execute(build_command)
  File "<user-home>/projects/os/opensearch-build/src/git/git_repository.py", line 77, in execute
    subprocess.check_call(command, cwd=cwd, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash <user-home>/projects/os/opensearch-build/scripts/default/opensearch/build.sh -v 1.2.0 -p linux -a x64 -s false -o builds' returned non-zero exit status 1.

@gaiksaya
Copy link
Member

gaiksaya commented Nov 8, 2021

Thanks @joshuali925! You can checkout the readme steps to see if you missed any step: https://github.com/opensearch-project/opensearch-build#how-it-works.
On quick look I found this

The build order first publishes OpenSearch followed by common-utils, and publishes these artifacts to maven local so that they are available for each component. In order to ensure that the same versions are used, a -Dopensearch.version flag is provided to each component's build script that defines which version the component should build against.

@zelinh
Copy link
Member Author

zelinh commented Nov 8, 2021

@gaiksaya I merged a PR that should fix this. opensearch-project/dashboards-reports#221

Also curious how do I reproduce the build error? I ran ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports but got this:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'opensearch-reports-scheduler'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.opensearch.gradle:build-tools:1.2.0.
     Searched in the following locations:
       - file:<user-home>/.m2/repository/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://repo.maven.apache.org/maven2/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://jcenter.bintray.com/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
       - https://plugins.gradle.org/m2/org/opensearch/gradle/build-tools/1.2.0/build-tools-1.2.0.pom
     Required by:
         project :

* 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

BUILD FAILED in 11s
2021-11-08 20:02:00 ERROR    Error building dashboards-reports, retry with: ./build.sh manifests/1.2.0/opensearch-1.2.0.yml --component dashboards-reports
Traceback (most recent call last):
  File "./src/run_build.py", line 65, in <module>
    sys.exit(main())
  File "./src/run_build.py", line 53, in main
    builder.build(build_recorder)
  File "<user-home>/projects/os/opensearch-build/src/build_workflow/builder_from_source.py", line 49, in build
    self.git_repo.execute(build_command)
  File "<user-home>/projects/os/opensearch-build/src/git/git_repository.py", line 77, in execute
    subprocess.check_call(command, cwd=cwd, shell=True)
  File "/usr/lib64/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'bash <user-home>/projects/os/opensearch-build/scripts/default/opensearch/build.sh -v 1.2.0 -p linux -a x64 -s false -o builds' returned non-zero exit status 1.

Oh I think you didn't have OpenSearch dependency in maven local. The way for you to try is ./build.sh manifests/1.2.0/opensearch-1.2.0.yml within the docker container; but it may take some time since it builds everything in sequence.

@gaiksaya
Copy link
Member

gaiksaya commented Nov 8, 2021

Recent build was successful. Closing this issue.
Thanks!

@gaiksaya gaiksaya closed this as completed Nov 8, 2021
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 Issues that have not yet been triaged
Projects
None yet
Development

No branches or pull requests

3 participants