Skip to content
Merged
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
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,12 @@ jobs:
with:
name: combined-test-catalog

# JOOQ classes are generated on the previous validate job,
# but if generated with JDK 17, there are no warning suppressions for `this-escape` needed after JDK 21.
# see https://github.com/jOOQ/jOOQ/issues/15619
- name: Regenerate JOOQ classes (needed after JDK 21)
if: matrix.java != '17'
run: ./gradlew :storage:inkless:generateJooqClasses
# JOOQ classes are pre-committed with JDK 23 (includes @SuppressWarnings("this-escape") annotations)
# No regeneration needed for any JDK version
- name: Verify JOOQ classes are up-to-date in release branches
if: startsWith(github.ref_name, 'inkless-')
run: |
git diff --exit-code --stat -- storage/inkless/src/main/generated-jooq || (echo "JOOQ classes are not up-to-date, please run './gradlew :storage:inkless:generateJooqClasses' and commit the changes" && exit 1)
git diff --exit-code --stat -- storage/inkless/src/main/jooq || (echo "JOOQ classes are not up-to-date, please run 'make jooq' with JDK 23 and commit the changes" && exit 1)
- name: JUnit Tests
id: junit-test
uses: ./.github/actions/run-gradle
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/inkless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,39 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'

# Generate JOOQ classes with JDK 23 to include @SuppressWarnings("this-escape") annotations
- name: Setup JDK 23 for JOOQ generation
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 23

- name: Generate JOOQ classes
run: make jooq

- name: Verify JOOQ classes are up-to-date
run: |
if [[ -n $(git status -s -- storage/inkless/src/main/jooq) ]]; then
echo "JOOQ classes are not up-to-date with Flyway migrations:"
git status -s -- storage/inkless/src/main/jooq
git diff --stat -- storage/inkless/src/main/jooq
echo ""
echo "Please run 'make jooq' with JDK 23 and commit the changes"
exit 1
else
echo "JOOQ classes are up-to-date."
fi
shell: bash

# Switch to JDK 17 for compilation and validation
- name: Setup Gradle
uses: ./.github/actions/setup-gradle
with:
java-version: 17
gradle-cache-read-only: ${{ inputs.gradle-cache-read-only }}
gradle-cache-write-only: ${{ inputs.gradle-cache-write-only }}

- name: Compile and validate
env:
SCAN_ARG: ${{ inputs.is-public-fork && '--no-scan' || '--scan' }}
Expand All @@ -50,7 +77,7 @@ jobs:
# --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
# --no-scan: For public fork PRs, we won't attempt to publish the scan
run: |
./gradlew --build-cache --info $SCAN_ARG check -x test
./gradlew --build-cache --info $SCAN_ARG check -x test -x generateJooqClasses

- name: Gen docs
run: make docs
Expand Down Expand Up @@ -112,23 +139,19 @@ jobs:
gradle-cache-read-only: ${{ inputs.gradle-cache-read-only }}
gradle-cache-write-only: ${{ inputs.gradle-cache-write-only }}
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
# JOOQ classes are generated on the previous validate job,
# but if generated with JDK 17, there are no warning suppressions for `this-escape` needed after JDK 21.
# see https://github.com/jOOQ/jOOQ/issues/15619
- name: Regenerate JOOQ classes (needed after JDK 21)
if: matrix.java != '17'
run: ./gradlew :storage:inkless:generateJooqClasses
- name: Test
# Gradle flags
# --build-cache: Let Gradle restore the build cache
# --no-scan: Don't attempt to publish the scan yet. We want to archive it first.
# --continue: Keep running even if a test fails
# -PcommitId Prevent the Git SHA being written into the jar files (which breaks caching)
# JOOQ classes are pre-committed with JDK 23, so no regeneration needed
id: junit-test
env:
TIMEOUT_MINUTES: 30
GRADLE_ARGS: >-
--build-cache --no-scan
--build-cache --no-scan
-x generateJooqClasses
-PtestLoggingEvents=started,passed,skipped,failed
-PmaxParallelForks=2
-PmaxTestRetries=1 -PmaxTestRetryFailures=3
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VERSION := 4.1.0-inkless-SNAPSHOT

.PHONY: build
build:
./gradlew :core:build :storage:inkless:build :metadata:build -x test
./gradlew :core:build :storage:inkless:build :metadata:build -x test -x generateJooqClasses

core/build/distributions/kafka_2.13-$(VERSION).tgz:
echo "Building Kafka distribution with version $(VERSION)"
Expand Down Expand Up @@ -51,13 +51,13 @@ fmt:

.PHONY: test
test:
./gradlew :storage:inkless:test :storage:inkless:integrationTest
./gradlew :storage:inkless:test :storage:inkless:integrationTest -x generateJooqClasses
./gradlew :metadata:test --tests "org.apache.kafka.controller.*"
./gradlew :core:test --tests "*Inkless*"

.PHONY: pitest
pitest:
./gradlew :storage:inkless:pitest
./gradlew :storage:inkless:pitest -x generateJooqClasses

.PHONY: integration_test
integration_test_core:
Expand All @@ -67,6 +67,10 @@ integration_test_core:
clean:
./gradlew clean

.PHONY: jooq
jooq:
./gradlew :storage:inkless:generateJooqClasses

DEMO := s3-local
.PHONY: demo
demo:
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,7 @@ project(':storage:inkless') {
)
}
basePackageName.set("org.jooq.generated")
outputDirectory.set(project.layout.buildDirectory.dir("generated-jooq"))
outputDirectory.set(project.layout.projectDirectory.dir("src/main/jooq"))
includeFlywayTable.set(false)
outputSchemaToDefault.add("public")
inputs.dir("src/main/resources/db/migration")
Expand All @@ -2583,8 +2583,8 @@ project(':storage:inkless') {
java {
srcDirs = [
"src/main/java",
"${projectDir}/build/generated/main/java",
"${projectDir}/build/generated-jooq"
"src/main/jooq",
"${projectDir}/build/generated/main/java"
]
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading