Skip to content

feat: add reusable Gradle configuration cache mode - #13

Open
cdsap wants to merge 16 commits into
mainfrom
feat/configuration-cache-option
Open

feat: add reusable Gradle configuration cache mode#13
cdsap wants to merge 16 commits into
mainfrom
feat/configuration-cache-option

Conversation

@cdsap

@cdsap cdsap commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Summary

Experiment workflows can now run Gradle with configuration cache enabled and reuse the seeded configuration state across execution jobs. The seed job primes the configuration cache, saves the Gradle user-home inputs that Gradle fingerprints, and stores included-build outputs with the project cache entry. Execution jobs restore that complete set before invoking Gradle.

The workflow exposes off, disabled, on, warn, and read-only modes for configuration-cache runs, and wires the same option into Gradle Profiler scenarios. off leaves Gradle's default behavior alone. disabled explicitly passes --no-configuration-cache. read-only passes --configuration-cache -Dorg.gradle.configuration-cache.read-only=true, so Gradle can reuse an existing entry but will not write a new one on a miss.

This adds a separate project_isolation input with off, on, and diagnostics modes. Project isolation uses the same restored configuration-cache inputs because Gradle enables configuration-cache infrastructure when Isolated Projects is enabled; the Gradle 9.7 path uses --isolated-projects, with diagnostics adding -Dorg.gradle.unsafe.isolated-projects.diagnostics=true.

This also adds configuration_cache_entry with restore and skip modes. restore keeps the seeded CC-entry reuse path. skip still builds with --configuration-cache or --isolated-projects, but intentionally skips the explicit configuration-cache entry path setup, restore, prime, and save steps.

Validation

  • Parsed the touched workflow YAML files locally.
  • Ran git diff --check.
  • Created GRADLE_ENCRYPTION_KEY for cdsap/Telltale.
  • Dispatched experiment.yaml on this branch: https://github.com/cdsap/Telltale/actions/runs/31440340933
  • The run passed, and all 10 execution jobs printed Reusing configuration cache.
  • Dispatched experiment-with-gradle-profiler.yaml on this branch: https://github.com/cdsap/Telltale/actions/runs/31443035558
  • The profiler run passed, and both profiler variants reused configuration cache after the first invocation.
  • Dispatched a project_isolation=on smoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31515873565
  • The smoke verified the new input reaches Gradle as --isolated-projects, then failed in the target experiment build because :core:checkout is not Isolated Projects compatible (Project ':core:checkout' cannot access task dependencies directly).
  • Dispatched a configuration_cache=on plus configuration_cache_entry=skip smoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31522487020
  • The no-entry smoke passed. Logs show Set Configuration Cache Paths, Restore Configuration Cache, Prime Configuration Cache, and Save Configuration Cache were skipped; execution jobs still invoked Gradle with --configuration-cache and calculated the task graph because no cached configuration entry was provided.
  • Dispatched a configuration_cache=disabled smoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31647317157
  • The disabled-mode smoke passed. Logs show seed and execution jobs invoked Gradle with --no-configuration-cache, and the explicit configuration-cache entry path setup, restore, prime, and save steps were skipped.
  • Dispatched a configuration_cache=read-only smoke on this branch: https://github.com/cdsap/Telltale/actions/runs/31648564651
  • The read-only smoke is currently queued in GitHub Actions; local YAML parsing and diff checks passed before dispatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants