ribafish opened a new pull request, #21630:
URL: https://github.com/apache/kafka/pull/21630
### Motivation
Several `processMessages` / `processTestMessages` tasks were missing the
build cache in CI even when the source inputs were unchanged.
The task inputs comparison showed that the differing input was `args`. These
`JavaExec` tasks were passing an absolute output path via
`${projectDir}/build/...`, which makes the cache key depend on the checkout
location and prevents relocatable cache hits across workspaces/agents.
### Changes
This change updates the message generator tasks to:
- set `workingDir = projectDir`
- pass `build/generated/...` as a relative `-o` argument instead of
`${projectDir}/build/generated/...`
This keeps the generated output location unchanged while removing the
checkout-root-dependent absolute path from the task input fingerprint.
Affected tasks include the message generators in:
- `:metadata`
- `:group-coordinator`
- `:transaction-coordinator`
- `:share-coordinator`
- `:clients`
- `:raft`
- `:storage`
- `:streams`
### Testing
Local Gradle verification was not completed in the sandbox because Gradle
startup attempted to reach `raw.githubusercontent.com`.
The expected validation is:
- `processMessages` / `processTestMessages` still generate sources in the
same locations
- subsequent CI builds can reuse cached outputs for these tasks across
different checkout paths
--
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]