KAFKA-20531: ducker-ak: Add --clean-build option to replace REBUILD env var#22186
Open
ryan-cho-i wants to merge 1 commit intoapache:trunkfrom
Open
KAFKA-20531: ducker-ak: Add --clean-build option to replace REBUILD env var#22186ryan-cho-i wants to merge 1 commit intoapache:trunkfrom
ryan-cho-i wants to merge 1 commit intoapache:trunkfrom
Conversation
…nv var Add a --clean-build / -c flag to both `ducker-ak up` and `ducker-ak test` that triggers clean Gradle builds, replacing the REBUILD=t environment variable used by run_tests.sh. * `ducker-ak up --clean-build`: forces `prepare_native_dir` to rebuild the Kafka release tarball even if a cached one exists. No effect in JVM mode. * `ducker-ak test --clean-build`: runs `./gradlew clean systemTestLibs` instead of the incremental build before running tests. Deprecate REBUILD=t in tests/docker/run_tests.sh. The existing path is preserved for backward compatibility, but it now emits a warning pointing users to the new flag, with a TODO to remove the env var path in 5.0.
577cdc1 to
337154b
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
--clean-build/-cflag to bothducker-ak upandducker-ak test, providing a discoverable CLI replacement for theREBUILD=tenvironment variable intests/docker/run_tests.sh.What changed
tests/docker/ducker-akprepare_native_dir()now accepts an optionalforce_rebuildargument. When set, the Kafka release tarball is rebuilt even
if a cached one already exists, addressing the stale-tarball
problem when source code has changed since the last build.
ducker_upparses-c|--clean-buildand forwards it toprepare_native_dir. Has no effect in JVM mode.ducker_testparses-c|--clean-buildand runs./gradlew clean systemTestLibsinstead of the incremental build.upandtest.tests/docker/run_tests.shREBUILD=tbehavior is preserved for backwardcompatibility, but the path now emits a deprecation warning
pointing to the new flag.
in 5.0.
Why split across
upandtest?The two commands handle different caches:
ducker-ak up'sprepare_native_dirproduces the Kafka nativetarball that gets baked into the Docker image. Stale here means
testing against an outdated binary.
ducker-ak testbuildssystemTestLibs, which is consumed atducktape execution time inside the already-running cluster.
Adding the flag to both keeps the responsibility split intact and
matches the description in the JIRA issue ("forces native tarball
rebuild in
prepare_native_dir").Testing
bash -npasses on both modified files../tests/docker/ducker-ak --helpcorrectly shows the new flagunder both
upandtestsections.REBUILD=tis set onrun_tests.sh.Follow-up
A separate ticket can track the removal of the
REBUILD=tcodepath in 5.0.