adoroszlai opened a new pull request, #11515: URL: https://github.com/apache/ozone/pull/11515
## What changes were proposed in this pull request? HDDS-16940 makes `test` goals cacheable in general, but cache is populated only if `clean` is included in the same command. This change reorganizes Maven commands in `junit.sh` to: - enable cache read/write in `integration` check, - cache read for build in repeated local run, but - disable cache for `test` execution from both `flaky-test-check` or repeated local run. https://issues.apache.org/jira/browse/HDDS-16976 ## How was this patch tested? `flaky-test-check`: - 1x2 https://github.com/adoroszlai/ozone/actions/runs/38422123805 - 2x1 https://github.com/adoroszlai/ozone/actions/runs/38422058500 Local regular test: ```bash $ ./hadoop-ozone/dev-support/checks/integration.sh -B -Dorg.slf4j.simpleLogger.showDateTime=false -am -pl :hdds-config -Dtest='TestConfigurationSource' ... [INFO] --- clean:3.5.0:clean (default-clean) @ ozone-main --- ... [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 s -- in org.apache.hadoop.hdds.conf.TestConfigurationSource ... [INFO] BUILD SUCCESS ... [INFO] 47 goals, 43 executed, 4 from cache, saving at least 1s ``` Local repeated test: ```bash $ ITERATIONS=2 ./hadoop-ozone/dev-support/checks/integration.sh -B -Dorg.slf4j.simpleLogger.showDateTime=false -am -pl :hdds-config -Dtest='TestConfigurationSource' ... [INFO] --- clean:3.5.0:clean (default-clean) @ ozone-main --- ... [INFO] --- install:3.2.0:install (default-install) @ ozone-main --- ... [INFO] BUILD SUCCESS ... [WARNING] This build will only read from the build cache, since the clean lifecycle is not part of the build invocation. ... [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 s -- in org.apache.hadoop.hdds.conf.TestConfigurationSource ... [INFO] BUILD SUCCESS ... [INFO] 43 goals, 41 executed, 2 from cache Iteration 1 exit code: 0 ... [WARNING] This build will only read from the build cache, since the clean lifecycle is not part of the build invocation. ... [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.086 s -- in org.apache.hadoop.hdds.conf.TestConfigurationSource ... [INFO] BUILD SUCCESS ... [INFO] 43 goals, 41 executed, 2 from cache Iteration 2 exit code: 0 ``` Subsequent local repeated test can skip build since previous run `install`-ed artifacts: ```bash $ ITERATIONS=2 OZONE_REPO_CACHED=true ./hadoop-ozone/dev-support/checks/integration.sh -B -Dorg.slf4j.simpleLogger.showDateTime=false -am -pl :hdds-config -Dtest='TestConfigurationSource' [INFO] --- clean:3.5.0:clean (default-clean) @ ozone-main --- ... [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 s -- in org.apache.hadoop.hdds.conf.TestConfigurationSource ... [INFO] BUILD SUCCESS ... [INFO] 47 goals, 43 executed, 4 from cache, saving at least 1s Iteration 1 exit code: 0 ... [INFO] --- clean:3.5.0:clean (default-clean) @ ozone-main --- ... [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.089 s -- in org.apache.hadoop.hdds.conf.TestConfigurationSource ... [INFO] BUILD SUCCESS ... [INFO] 47 goals, 43 executed, 4 from cache, saving at least 1s Iteration 2 exit code: 0 ``` CI: https://github.com/adoroszlai/ozone/actions/runs/38419103803 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
