Files
conductor-oss--conductor/server/build.gradle
Viren Baraiya 431aeecb0a fix: ship netty's linux-aarch_64 epoll native so the server starts on arm64
reactor-netty pulls in netty-transport-classes-epoll together with the
linux-x86_64 native library only, so on arm64 the native library is missing.
The cassandra driver probes for the epoll transport with
Class.forName("io.netty.channel.epoll.Epoll") (NettyUtil), which triggers the
native load and throws UnsatisfiedLinkError - an Error, so neither of the
driver's catch clauses (ClassNotFoundException, Exception) sees it and it
escapes NettyUtil's static initializer, failing the cluster bean and the whole
context. Its FORCE_NIO escape hatch does not help: that check runs after the
Class.forName that throws.

Declare the native library for both linux architectures so arm64 images get
one, as verified in BOOT-INF/lib of the boot jar.
2026-08-03 17:34:47 -07:00

156 lines
6.7 KiB
Groovy

/*
* Copyright 2023 Conductor authors
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
plugins {
id 'org.springframework.boot'
}
dependencies {
implementation project(':conductor-core')
implementation project(':conductor-rest')
implementation project(':conductor-grpc-server')
implementation project(':conductor-ai')
// Embedded Conductor-Agents runtime (REST controllers, agent services); activated only when
// conductor.integrations.ai.enabled=true.
implementation project(':conductor-agentspan')
//Event Systems
implementation project(':conductor-amqp')
implementation project(':conductor-nats')
implementation project(':conductor-nats-streaming')
implementation project(':conductor-awssqs-event-queue')
implementation project(':conductor-kafka-event-queue')
//External Payload Storage
implementation project(':conductor-azureblob-storage')
implementation project(':conductor-postgres-external-storage')
implementation project(':conductor-awss3-storage')
implementation project(':conductor-file-storage')
implementation project(':conductor-gcs-storage')
//Persistence
implementation project(':conductor-redis-configuration')
implementation project(':conductor-redis-persistence')
implementation project(':conductor-cassandra-persistence')
implementation project(':conductor-postgres-persistence')
implementation project(':conductor-mysql-persistence')
implementation project(':conductor-sqlite-persistence')
// Indexing backend selection (build-time) to avoid Lucene conflicts between ES and OS
def indexingBackend = project.findProperty('indexingBackend') ?: 'elasticsearch'
if (indexingBackend == 'opensearch3' || indexingBackend == 'os3') {
implementation project(':conductor-os-persistence-v3')
} else if (indexingBackend == 'opensearch' || indexingBackend == 'os') {
implementation project(':conductor-os-persistence')
implementation project(':conductor-os-persistence-v2')
} else if (indexingBackend == 'elasticsearch8' || indexingBackend == 'es8') {
implementation project(':conductor-es8-persistence')
} else if (indexingBackend == 'elasticsearch7' || indexingBackend == 'es7' || indexingBackend == 'elasticsearch') {
implementation project(':conductor-es7-persistence')
} else {
implementation project(':conductor-es7-persistence')
}
implementation project(':conductor-redis-lock')
implementation project(':conductor-redis-concurrency-limit')
//System Tasks
implementation project(':conductor-http-task')
implementation project(':conductor-json-jq-task')
implementation project(':conductor-kafka')
//Scheduler
implementation project(':conductor-scheduler-core')
implementation project(':conductor-scheduler-postgres-persistence')
implementation project(':conductor-scheduler-mysql-persistence')
implementation project(':conductor-scheduler-cassandra-persistence')
implementation project(':conductor-scheduler-redis-persistence')
implementation project(':conductor-scheduler-sqlite-persistence')
//Metrics
implementation "io.micrometer:micrometer-registry-cloudwatch2:${revMicrometer}"
implementation "io.micrometer:micrometer-registry-azure-monitor:${revMicrometer}"
implementation "io.micrometer:micrometer-registry-prometheus:${revMicrometer}"
// Restores OTLP metrics export removed when the conductor-metrics module was
// retired (commit 396a09a4f, #1059). Spring Boot's OtlpMetricsAutoConfiguration
// wires OtlpMeterRegistry when management.otlp.metrics.export.enabled=true,
// mirroring how the prometheus registry is auto-configured.
implementation "io.micrometer:micrometer-registry-otlp:${revMicrometer}"
//Event Listener
implementation project(':conductor-workflow-event-listener')
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.retry:spring-retry'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'org.apache.logging.log4j:log4j-web'
implementation "redis.clients:jedis:${revJedis}"
implementation "org.postgresql:postgresql:${revPostgres}"
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation "io.orkes.queues:orkes-conductor-queues:${revOrkesQueues}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${revSpringDoc}"
runtimeOnly "org.glassfish.jaxb:jaxb-runtime:${revJAXB}"
// reactor-netty brings netty-transport-classes-epoll along with the linux-x86_64 native library
// only. The cassandra driver probes for the epoll transport with Class.forName (NettyUtil), and
// on linux-aarch_64 the missing native library surfaces as an UnsatisfiedLinkError, which the
// driver does not catch - the server then fails to start on arm64. Ship both architectures.
runtimeOnly group: 'io.netty', name: 'netty-transport-native-epoll', classifier: 'linux-x86_64'
runtimeOnly group: 'io.netty', name: 'netty-transport-native-epoll', classifier: 'linux-aarch_64'
testImplementation project(':conductor-rest')
testImplementation project(':conductor-common')
testImplementation "io.grpc:grpc-testing:${revGrpc}"
testImplementation "com.google.protobuf:protobuf-java:${revProtoBuf}"
testImplementation "io.grpc:grpc-protobuf:${revGrpc}"
testImplementation "io.grpc:grpc-stub:${revGrpc}"
}
jar {
enabled = true
}
bootJar {
mainClass = 'com.netflix.conductor.Conductor'
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
archiveClassifier = 'boot'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact bootJar
}
}
}
// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#integrating-with-actuator.build-info
// This will configure a BuildInfo task named bootBuildInfo
springBoot {
buildInfo()
}
compileJava.dependsOn bootBuildInfo