jprinet opened a new pull request, #11489:
URL: https://github.com/apache/ozone/pull/11489

   ## What changes were proposed in this pull request?
   
   Surefire passes paths under the module's `target/` directory to tests as 
system properties (`test.build.dir`, `test.build.data`, `hadoop.log.dir`, 
`hadoop.tmp.dir`, `java.security.krb5.conf`), and some modules pass native 
library paths via `-Djava.library.path` in `argLine`. The Develocity Maven 
extension requires such paths to be declared as goal inputs/outputs, otherwise 
it discards the cache key of `surefire:test`:
   
   ```
   Build caching was not enabled for this goal execution because system 
property 'test.build.dir' with value '.../target/test-dir' was used as a 
command line argument, but not declared as an input or output.
   ```
   
   Without a cache key:
   - test goals are not cacheable (build cache);
   - Develocity Predictive Test Selection (PTS) cannot learn from Ozone builds: 
every test class is reported as "insufficient data" in the [PTS 
simulator](https://develocity.apache.org/scans/test-selection?predictive-test-selection.view=simulator&search.rootProjectNames=*ozone*).
   
   This PR declares these paths in the Develocity configuration of the surefire 
goal: `localState` for the scratch directories, `inputs` for `krb5.conf` and 
the native libraries. No change to how tests run.
   
   This PR will be followed by another one in the next 2 weeks, to enable PTS 
on the test goals once it has collected enough data to deliver predictions.
   
   @adoroszlai this is a follow-up to our conversation during Community Over 
Code.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16940
   
   ## How was this patch tested?
   
   - Locally, running all surefire goals of the reactor (`-Dtest=NoSuchTest`): 
all 38 now get a cache key, no undeclared path is reported.
   - On the fork, running `clean test` twice on `hdds-config` and 
`ozone-integration-test` with the local build cache enabled (temporary 
verification workflow, not part of this PR):
     - [before](https://github.com/jprinet/ozone/actions/runs/38223114479): 
undeclared `test.build.dir` reported, tests re-executed on the 2nd run;
     - [after](https://github.com/jprinet/ozone/actions/runs/38223118027): no 
undeclared path, tests loaded from the build cache on the 2nd run.
   - CI on the fork: https://github.com/jprinet/ozone/actions/runs/38223412265
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to