Use relative path for logfile_enc to fix Gradle build cache relocatability#661
Open
ribafish wants to merge 1 commit intoapache:mainfrom
Open
Use relative path for logfile_enc to fix Gradle build cache relocatability#661ribafish wants to merge 1 commit intoapache:mainfrom
ribafish wants to merge 1 commit intoapache:mainfrom
Conversation
The logfile_enc option passed to the pekko-grpc protoc plugin contained an absolute path (project.buildDir), which the protobuf-gradle-plugin registers as a task input for GenerateProtoTask. This broke Gradle build cache relocatability: builds of the same commit from different checkout directories produced different cache keys. Switch to a path relative to the project directory. The protoc plugin process runs with the project directory as its working directory, so the relative path resolves to the same file. The absolute Path used by printProtocLogs is unchanged.
ribafish
added a commit
to gradle/develocity-oss-projects
that referenced
this pull request
Mar 19, 2026
…hing Replace infra-dependent test tasks (testCoverageLean, reportCoverage) with compileScala/compileTestScala to exercise caching without Docker/CouchDB. Add doNotCacheIf hook for GenerateProtoTask — pekko-grpc's logfile_enc option contains an absolute path that breaks cache relocatability in exp3. Upstream: apache/pekko-grpc#661 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 tasks
pjfanning
approved these changes
Mar 19, 2026
Member
pjfanning
left a comment
There was a problem hiding this comment.
lgtm
The CI issue is unrelated. TimonVS/pr-labeler-action seems like it is no working but I don't think we even get any benefit from that action.
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.
Problem
The
logfile_encoption passed to the pekko-grpc protoc plugin contains an absolute path (project.buildDir), which theprotobuf-gradle-pluginregisters as a task input forGenerateProtoTask. This breaks Gradle build cache relocatability: builds of the same commit from different checkout directories produce different cache keys, causing unnecessary cache misses.Closes #660
Fix
Use a path relative to the project directory instead of an absolute path. The protoc plugin process runs with the project directory as its working directory, so the relative path (
build/pekko-grpc-gradle-plugin.log) resolves to the same file.The absolute
Pathused byprintProtocLogsis unchanged — only the string passed as a protoc plugin option is affected.