-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add lh canary first version (#637)
Included: - Metronome (synthetic monitoring simulator) - Aggregator (kafka stream topology) for calculating metrics - TaskRunLatency metric - Configurations - do-canary.sh script - Log level improvements - Protobuf classes - Docker build Future: - Finish DuplicatedTaskRun metric - Kafka Stream tests - gRPC server - gRPC health check - Prometheus integration --------- Co-authored-by: Mijail Rondon <[email protected]> Refers: #637
- Loading branch information
Showing
98 changed files
with
2,060 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Ignore everything | ||
* | ||
!canary/ | ||
!server/ | ||
!sdk-java/ | ||
!sdk-go/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# LittleHorse Canary App | ||
|
||
Start a local kafka cluster: | ||
|
||
``` | ||
../local-dev/setup.sh | ||
``` | ||
|
||
Start LH Server: | ||
|
||
``` | ||
../local-dev/do-server.sh | ||
``` | ||
|
||
Start LH Canary: | ||
|
||
``` | ||
../local-dev/do-canary.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
plugins { | ||
id 'java' | ||
id 'application' | ||
id 'checkstyle' | ||
id 'com.diffplug.spotless' version '6.25.0' | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
id 'io.freefair.lombok' version '8.4' | ||
id 'com.google.protobuf' version '0.9.4' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// LittleHorse | ||
implementation project(':sdk-java') | ||
|
||
// Tools | ||
implementation 'com.google.guava:guava:33.0.0-jre' | ||
|
||
// Configurations | ||
implementation 'io.smallrye.config:smallrye-config:3.5.2' | ||
|
||
// Logging | ||
implementation 'org.slf4j:slf4j-api:2.0.11' | ||
// implementation 'ch.qos.logback:logback-classic:1.4.14' | ||
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.22.1' | ||
|
||
// Kafka | ||
implementation 'org.apache.kafka:kafka-streams:3.6.1' | ||
|
||
// Tests | ||
testImplementation platform('org.junit:junit-bom:5.9.1') | ||
testImplementation 'org.junit.jupiter:junit-jupiter' | ||
testImplementation 'org.assertj:assertj-core:3.11.1' | ||
testImplementation 'org.junit-pioneer:junit-pioneer:2.2.0' | ||
testImplementation 'org.mockito:mockito-core:5.10.0' | ||
testImplementation 'org.mockito:mockito-junit-jupiter:5.10.0' | ||
testImplementation 'net.datafaker:datafaker:2.1.0' | ||
testImplementation 'org.apache.kafka:kafka-streams-test-utils:3.6.1' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events 'passed', 'skipped', 'failed' | ||
exceptionFormat = 'full' | ||
} | ||
jvmArgs = ['--add-opens', 'java.base/java.lang=ALL-UNNAMED', '--add-opens', 'java.base/java.util=ALL-UNNAMED'] | ||
} | ||
|
||
spotless { | ||
java { | ||
target('**/*.java') | ||
palantirJavaFormat() | ||
} | ||
} | ||
|
||
application { | ||
mainClass = 'io.littlehorse.canary.Main' | ||
} | ||
|
||
shadowJar { | ||
mergeServiceFiles() | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
compileJava { | ||
options.encoding = 'UTF-8' | ||
options.compilerArgs << '-parameters' | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
artifact = 'com.google.protobuf:protoc:3.25.2' | ||
} | ||
plugins { | ||
grpc { | ||
artifact = 'io.grpc:protoc-gen-grpc-java:1.61.0' | ||
} | ||
} | ||
} | ||
|
||
checkstyle { | ||
configFile = file("${rootDir}/canary/checkstyle.xml") | ||
checkstyleTest.enabled = false | ||
} | ||
|
||
tasks.withType(Checkstyle).configureEach { | ||
exclude('**io/littlehorse/canary/proto**') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Canary settings | ||
lh.canary.client.id=dev | ||
lh.canary.topic.creation.enable=true | ||
lh.canary.topic.creation.replicas=1 | ||
lh.canary.topic.creation.partitions=1 | ||
|
||
# Aggregator settings | ||
lh.canary.aggregator.enable=true | ||
|
||
# Metronome settings | ||
lh.canary.metronome.enable=true | ||
lh.canary.metronome.frequency.ms=1000 | ||
lh.canary.metronome.threads=1 | ||
lh.canary.metronome.runs=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | ||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | ||
<module name="Checker"> | ||
<module name="TreeWalker"> | ||
<module name="FinalParameters"/> | ||
<module name="FinalLocalVariable"/> | ||
</module> | ||
</module> |
Oops, something went wrong.