Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/java-gradle/pre-merge/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ runs:
mkdir -p reports/java-tests
cp -r foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/build/test-results reports/java-tests/flink
fi
if [ -d "foreign/java/external-processors/iggy-connector-pinot/build/test-results" ]; then
echo "Found test reports in pinot"
mkdir -p reports/java-tests
cp -r foreign/java/external-processors/iggy-connector-pinot/build/test-results reports/java-tests/pinot
fi

- name: Stop Iggy server
if: always() && inputs.task == 'test'
Expand Down Expand Up @@ -188,4 +193,5 @@ runs:
paths: |
foreign/java/java-sdk/build/test-results/**/TEST-*.xml
foreign/java/external-processors/iggy-connector-flink/iggy-connector-library/build/test-results/**/TEST-*.xml
foreign/java/external-processors/iggy-connector-pinot/build/test-results/**/TEST-*.xml
if: ${{ !cancelled() && inputs.task == 'test' }}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

plugins {
id("iggy.java-library-conventions")
alias(libs.plugins.shadow)
}

dependencies {
Expand All @@ -43,20 +44,36 @@ dependencies {
testImplementation(platform(libs.junit.bom))
testImplementation(libs.bundles.testing)
testImplementation(libs.pinot.spi) // Need Pinot SPI for tests
testImplementation(libs.testcontainers)
testRuntimeOnly(libs.slf4j.simple)
}

// Assemble connector plugin with all dependencies for Docker deployment
tasks.register<Copy>("assemblePlugin") {
from(tasks.named("jar"))
from(configurations.runtimeClasspath)
tasks.shadowJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
relocate("io.netty", "org.apache.iggy.connector.pinot.shaded.io.netty")
mergeServiceFiles()
}

// Assemble connector plugin with isolated dependencies for Docker deployment
tasks.register<Sync>("assemblePlugin") {
from(tasks.named("shadowJar"))
into(layout.buildDirectory.dir("plugin"))
}

tasks.named("jar") {
finalizedBy("assemblePlugin")
}

tasks.named<Test>("test") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test task doesn't declare deployment/ as an input, so editing schema.json / table.json and rerunning test can report UP-TO-DATE with stale results. Suggest adding:

inputs.dir(layout.projectDirectory.dir("deployment"))

dependsOn("assemblePlugin")
inputs.dir(layout.projectDirectory.dir("deployment"))
inputs.property("useExternalServer", providers.environmentVariable("USE_EXTERNAL_SERVER").isPresent)
inputs.property("externalTcpPort", providers.environmentVariable("EXTERNAL_TCP_PORT").orElse("8090"))
systemProperty("iggy.pinot.image", "apachepinot/pinot:${libs.versions.pinot.get()}")
systemProperty("iggy.pinot.plugin.dir", layout.buildDirectory.dir("plugin").get().asFile.absolutePath)
systemProperty("iggy.pinot.deployment.dir", layout.projectDirectory.dir("deployment").asFile.absolutePath)
}

publishing {
publications {
named<MavenPublication>("maven") {
Expand Down

This file was deleted.

Loading
Loading