fix(config-cache): Resolve CLI path via ValueSource task input (GRADLE-70)#1264
Merged
Conversation
runningcode
requested review from
0xadam-brown,
adinauer,
markushi and
romtsn
as code owners
June 4, 2026 11:07
runningcode
force-pushed
the
no/config-cache-cli-path
branch
from
June 4, 2026 12:43
0ae0479 to
889add0
Compare
0xadam-brown
approved these changes
Jun 4, 2026
romtsn
reviewed
Jun 8, 2026
romtsn
reviewed
Jun 8, 2026
…E-70) The sentry-cli path was memoized in a static field on SentryCliProvider. That field survives across builds in the Gradle daemon and is not invalidated when switching branches, so a stale path pointing at a sentry-cli temp file from a previous checkout could be reused, causing "No such file or directory" failures when configuration caching is on. Remove the static memoization and stop threading the cli path through the configure() call chain. Each SentryCliExecTask now resolves the path itself in asSentryCliExec() via the existing cliExecutableProvider() ValueSource, which is properly invalidated on branch switches, and wires its own buildDirectory input. Co-Authored-By: Claude Opus 4.8 <[email protected]>
runningcode
force-pushed
the
no/config-cache-cli-path
branch
from
June 8, 2026 15:40
889add0 to
ca5f687
Compare
Co-Authored-By: Claude Opus 4.8 <[email protected]>
runningcode
force-pushed
the
no/config-cache-cli-path
branch
from
June 8, 2026 15:41
ca5f687 to
eb3267a
Compare
This was referenced Jun 11, 2026
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.
Summary
The sentry-cli path was memoized in a
@Volatilestatic field onSentryCliProvider. That field survives across builds within the Gradle daemon and is not invalidated when switching branches, so a stale path pointing at a sentry-cli temp file extracted under a previous checkout could be reused — producingCould not start '…/.sentry-cliXXXX.exe' … No such file or directoryfailures when the configuration cache is enabled.This removes the static memoization and stops threading the cli path (
cliExecutable: Provider<String>) through theconfigure()call chain into every task. EachSentryCliExecTasknow resolves the path itself inasSentryCliExec()via the existingcliExecutableProvider()ValueSource(which Gradle correctly invalidates on branch switches), and wires its ownbuildDirectorytask input.This is one of two PRs splitting the config-cache work; the companion PR #1263 (GRADLE-82) makes the telemetry org lookup config-cache friendly. This PR keeps the
cliExecutableparameter onconfigure()because telemetry still needs it onmain; whichever PR lands second will drop that now-unused parameter in a small rebase.Fixes GRADLE-70
🤖 Generated with Claude Code