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] org.gradle.api.GradleException: Compilation error #2858

Closed
peterzhuamazon opened this issue Apr 11, 2022 · 19 comments
Assignees
Labels
release v2.0.0 Version 2.0.0

Comments

@peterzhuamazon
Copy link
Member

2022-04-11 16:04:20 INFO     Building alerting
2022-04-11 16:04:20 INFO     Executing "git init" in /tmp/tmpwt0c0hx7/alerting
2022-04-11 16:04:20 INFO     Executing "git remote add origin https://github.com/opensearch-project/alerting.git" in /tmp/tmpwt0c0hx7/alerting
2022-04-11 16:04:20 INFO     Executing "git fetch --depth 1 origin main" in /tmp/tmpwt0c0hx7/alerting
2022-04-11 16:04:21 INFO     Executing "git checkout FETCH_HEAD" in /tmp/tmpwt0c0hx7/alerting
2022-04-11 16:04:21 INFO     Executing "git rev-parse HEAD" in /tmp/tmpwt0c0hx7/alerting
2022-04-11 16:04:21 INFO     Checked out https://github.com/opensearch-project/alerting.git@main into /tmp/tmpwt0c0hx7/alerting at dcf7acfacc871680a10e47752a2b4a175b5094f4
2022-04-11 16:04:21 INFO     Executing "bash /tmp/tmpwt0c0hx7/alerting/scripts/build.sh -v 2.0.0 -q alpha1 -p linux -a x64 -s true -o builds" in /tmp/tmpwt0c0hx7/alerting
+ 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/plugins
+ ./gradlew assemble --no-daemon --refresh-dependencies -DskipTests=true -Dopensearch.version=2.0.0-alpha1-SNAPSHOT -Dbuild.version_qualifier=alpha1 -Dbuild.snapshot=true -x ktlint
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.3.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.3
  OS Info               : Linux 4.14.243-185.433.amzn2.x86_64 (amd64)
  JDK Version           : 17 (Eclipse Adoptium JDK)
  JAVA_HOME             : /opt/java/openjdk-17
  Random Testing Seed   : E1E7F1A1A0ED3D06
  In FIPS 140 mode      : false
=======================================
> Task :assemble UP-TO-DATE

> Task :alerting-core:compileKotlin
w: /tmp/tmpwt0c0hx7/alerting/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobStats.kt: (69, 63): 'toUpperCase(): String' is deprecated. Use uppercase() instead.
w: /tmp/tmpwt0c0hx7/alerting/core/src/main/kotlin/org/opensearch/alerting/core/action/node/ScheduledJobsStatsResponse.kt: (63, 80): 'toLowerCase(): String' is deprecated. Use lowercase() instead.
w: /tmp/tmpwt0c0hx7/alerting/core/src/main/kotlin/org/opensearch/alerting/core/model/ClusterMetricsInput.kt: (55, 37): 'toLowerCase(): String' is deprecated. Use lowercase() instead.
w: /tmp/tmpwt0c0hx7/alerting/core/src/main/kotlin/org/opensearch/alerting/core/model/Schedule.kt: (76, 84): 'toUpperCase(): String' is deprecated. Use uppercase() instead.

> Task :alerting-core:compileJava NO-SOURCE
> Task :alerting-core:processResources
> Task :alerting-core:classes
> Task :alerting-core:inspectClassesForKotlinIC
> Task :alerting-core:jar

> Task :alerting-notification:compileJava
/tmp/tmpwt0c0hx7/alerting/notification/src/main/java/org/opensearch/alerting/destination/Notification.java:33: warning: [removal] AccessController in java.security has been deprecated and marked for removal
            return AccessController.doPrivileged((PrivilegedAction<BaseResponse>) () -> {
                   ^
Note: /tmp/tmpwt0c0hx7/alerting/notification/src/main/java/org/opensearch/alerting/destination/Notification.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning

> Task :alerting-notification:processResources NO-SOURCE
> Task :alerting-notification:classes
> Task :alerting-notification:jar

> Task :alerting:compileKotlin FAILED
e: /tmp/tmpwt0c0hx7/alerting/alerting/src/main/kotlin/org/opensearch/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregator.kt: (146, 85): No value passed for parameter 'p1'

FAILURE: Build failed with an exception.

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

* Try:
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':alerting:compileKotlin'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:145)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:143)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:131)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:402)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:389)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:382)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:368)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
Caused by: org.gradle.api.GradleException: Compilation error. See log for more details
	at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.throwGradleExceptionIfError(tasksUtils.kt:17)
	at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:140)
	at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runCompilerAsync(GradleKotlinCompilerRunner.kt:207)
	at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runCompilerAsync(GradleKotlinCompilerRunner.kt:198)
	at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvmCompilerAsync(GradleKotlinCompilerRunner.kt:97)
	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin(Tasks.kt:735)
	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin(Tasks.kt:491)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.executeImpl(Tasks.kt:404)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:357)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
	at org.gradle.api.internal.project.taskfactory.IncrementalInputsTaskAction.doExecute(IncrementalInputsTaskAction.java:32)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.AbstractIncrementalTaskAction.execute(AbstractIncrementalTaskAction.java:25)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.TaskExecution$2.run(TaskExecution.java:239)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:224)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:207)
	at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:190)
	at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:168)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:89)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:40)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:53)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:50)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:40)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:48)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:61)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:42)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:188)
	at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
	at org.gradle.internal.Either$Right.fold(Either.java:175)
	at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:38)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:27)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:109)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:56)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:56)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:38)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:73)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:44)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:89)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:50)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:114)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:57)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:76)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:50)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:93)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:93)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:43)
	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:31)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
	at org.gradle.api.internal.tasks.execution.TaskExecution$3.withWorkspace(TaskExecution.java:284)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:142)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:131)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:402)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:389)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:382)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:368)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)


* 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.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 33s
7 actionable tasks: 7 executed
2022-04-11 16:04:55 ERROR    Error building alerting, retry with: ./build.sh manifests/2.0.0/opensearch-2.0.0.yml --component alerting --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 /tmp/tmpwt0c0hx7/alerting/scripts/build.sh -v 2.0.0 -q alpha1 -p linux -a x64 -s true -o builds' returned non-zero exit status 1.
@lezzago
Copy link
Member

lezzago commented Apr 11, 2022

@peterzhuamazon Just to confirm, is this pulling from the main branch? I am not able to replicate this issue. Can you provide more details on how to replicate this?

@peterzhuamazon
Copy link
Member Author

@CEHENKLE @bbarani I have tested alerting assemble with both last thursday snapshot as well as latest snapshot.

The crash only happens on latest snapshot which indicate the core changes cause this issue.

I see there are a lot of changes between April 7 and today.
One of the commit that caused this issue.

https://github.com/opensearch-project/OpenSearch/commits/2.0

Thanks.

@peterzhuamazon peterzhuamazon transferred this issue from opensearch-project/alerting Apr 11, 2022
@anasalkouz
Copy link
Member

@peterzhuamazon Just to confirm my understanding. there are 3 PRs merged since April 7th. So, this issue could be caused by at least one of them. couldn't it?

@peterzhuamazon
Copy link
Member Author

I see a lot of commits within this period.
image

@anasalkouz I think one or more of this cause the issue.

Thanks.

@kartg
Copy link
Member

kartg commented Apr 11, 2022

This is tied to the stack overflow fix. Looks like the alerting plugin is using IncludeExclude.convertToStringFilter here. The signature of this was changed in the stack overflow commit to expect an IndexSettings object

@kartg
Copy link
Member

kartg commented Apr 11, 2022

The simplest possible mitigation would be to change the code in IncludeExclude to have a backwards compatible method signature. I'm not keen on doing this for two reasons:

  1. Doing so would re-open the stack overflow vulnerability via the alerting plugin
  2. IncludeExclude is an engine-internal parser class and should not need to guarantee compatibility outside the core codebase.

The ideal mitigation would be to have the alerting plugin adopt the new API signature so we can correctly impose the reg-ex limit and protect against the stack overflow bug. I'm not familiar with the alerting plugin codebase so I cannot speak to how feasible this is.

@peterzhuamazon
Copy link
Member Author

@lezzago ^^

@rishabhmaurya
Copy link
Contributor

rishabhmaurya commented Apr 11, 2022

copying my comment from #2810 (comment)

Sorry for posting this late, but I'm not convinced with the way this change is implemented due to following reasons -

  1. This change adds dependency on IndexSettings for IncludeExclude, which seems logically incorrect and down the line it may interrupt in modularity of codebase for such non-essential dependencies.
  2. Also, making IndexSettings to be mandatory, for one of the method, again looks logically incorrect. There could be consumers, who are using this class, which don't have instance of IndexSettings or are not related to index.
  3. Changing publicly exposed class constructor/public apis, doesn't seems like a good idea. If its really needed, it should be put on the deprecation path.

@peterzhuamazon
Copy link
Member Author

@kartg ^^

@kartg
Copy link
Member

kartg commented Apr 11, 2022

Working on a mitigation now. The quickest way forward would be to decouple IncludeExclude from IndexSettings as @rishabhmaurya suggested but still impose an int limit on the regex length with a hard-coded default value for code paths that cannot/don't need to specify an explicit limit.

@rishabhmaurya
Copy link
Contributor

rishabhmaurya commented Apr 11, 2022

sounds good to me, thanks!
Once you're done with the change, will create an issue in alerting to incorporate this limit change as default limit may not be optimal for all customers of alerting.

@kartg
Copy link
Member

kartg commented Apr 11, 2022

@rishabhmaurya PR is up, please take a look.

Also, is there a mechanism (that I'm unaware of) to identify classes or APIs such as these are not an explicit Opensearch core API but used outside the engine's code base? I'd like to explore what we can do to ensure this compatibility break doesn't recur.

@rishabhmaurya
Copy link
Contributor

there is no direct way to identify, one way is to search github globally or at least within the opensearch organization for consumers.
Integration with JPMS would solve this problem but its a long road!

@kartg
Copy link
Member

kartg commented Apr 11, 2022

FIx has been merged into 2.0. @peterzhuamazon Can we validate that this build failure no longer occurs?

Backport PRs for 2.x and main have been opened

@CEHENKLE
Copy link
Member

there is no direct way to identify, one way is to search github globally or at least within the opensearch organization for consumers. Integration with JPMS would solve this problem but its a long road!

@opensearch-project/opensearch-core @dblock @nknize

Ooof. That's really bad. Do folks have other thoughts on how we could get ahead of breaks like this?

@peterzhuamazon
Copy link
Member Author

FIx has been merged into 2.0. @peterzhuamazon Can we validate that this build failure no longer occurs?

Backport PRs for 2.x and main have been opened

Hi @kartg seems like it is fixed now I see alerting passed in pipeline.

Thanks.

@andrross
Copy link
Member

@CEHENKLE As @rishabhmaurya the modularization work (#1838) is probably the right long-term way to address this. The strong encapsulation offered by Java modules should prevent this.

@CEHENKLE
Copy link
Member

@andrross Sure -- but I don't know of any active work on that project (that doesn't mean it isn't happening, it just means I haven't seen it percolating around), and I don't wanna get pantsed on the regular while we wait.

/C

@rishabhmaurya
Copy link
Contributor

if we are concerned about late detection of breaking changes among plugins, then plugins integrating with nightly builds of core could be another way to detect and fix them sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release v2.0.0 Version 2.0.0
Projects
None yet
Development

No branches or pull requests

7 participants