Support experimental project-entry caching (configuration-cache + build-logic) - #994
Merged
Conversation
bigdaz
force-pushed
the
config-cache-support
branch
6 times, most recently
from
June 16, 2026 17:41
c484532 to
6289a6c
Compare
Prepares the consumer for the gated project-entry caching feature in the gradle-actions-caching library. Source-only; the vendored bundle is refreshed in a later commit. - cache-service.ts: add develocityAccessToken / develocityServerUrl to the local CacheOptions mirror; replace ConfigurationCacheStatus (4 values) with the 9-value ProjectCacheStatus (not-active retired); rename CacheReport.configurationCache to projectCache. - caching-report.ts: PROJECT_CACHE_COPY is an exhaustive Record<ProjectCacheStatus, string> so a missed status fails compilation; not-enabled maps to '' (dropped by the existing .filter(Boolean)). renderConfigCacheLine becomes renderProjectCacheLine, reading report.projectCache. - Tests updated for the renamed field and new copy, including a not-enabled case that renders nothing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves the Develocity access key matching a given server URL, for threading into the new develocityAccessToken cache option (next commit). Reuses DevelocityAccessCredentials.parse and fails closed (returns undefined) when the access key is empty/malformed, the server URL is empty/unparseable, or no key matches the server host. Tolerates a bare hostname with no scheme. Extends short-lived-token.test.ts with coverage for full URLs, bare hostnames, host-only matching (ignoring scheme/port/path), multi-key selection, and the fail-closed cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Supplies develocityAccessToken / develocityServerUrl to the gated project-entry caching feature, on the save path only. Restore stays ungated, so it keeps passing no DevelocityConfig and the credentials remain undefined. - cacheOptionsFrom gains an optional develocityConfig; when present it sets develocityServerUrl from getDevelocityUrl() and resolves develocityAccessToken via resolveAccessKeyForServer (fail-closed when the URL or matching key is absent). - complete() takes a DevelocityConfig and passes it through to cacheOptionsFrom at the save call; setup()/restore continues to call cacheOptionsFrom with no DevelocityConfig. - Both post actions (setup-gradle, dependency-submission) pass new DevelocityConfig() to complete(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
At save time the Develocity access key has been swapped for a short-lived token (host=<JWT>), whose value the strict DevelocityAccessCredentials parser rejects (it requires host=\w+). Parse the host=value pairs leniently instead, so the per-host token resolves for both long-lived keys and short-lived tokens. Without this, threading credentials into the project-cache trial check fails with trial-not-licensed on every real save (caught by the configuration-cache integ-test). Adds a unit case for a JWT-shaped token value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Have setupToken take the DevelocityConfig and return the short-lived JWT matching the configured Develocity server, replacing resolveAccessKeyForServer with resolveTokenForServer. Call setupToken directly from setup-gradle's setup() (split out of buildScan.setup), persist the resolved token via core.saveState, and read it back in complete(). cacheOptionsFrom now takes the server URL and access token as parameters. This ensures CacheOptions.develocityAccessToken is always the resolved short-lived JWT on both restore and save, regardless of whether the access key was supplied as an action input or env var. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bigdaz
force-pushed
the
config-cache-support
branch
from
June 16, 2026 18:09
6289a6c to
578273a
Compare
bigdaz
enabled auto-merge (squash)
June 16, 2026 18:10
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.
Pass develocityAccessToken and develocityServerUrl the
gradle-actions-caching: required to support project-entry caching (build-logic + configuration-cache), which has experimental support in 'gradle-actions-cache@v0.8.0. This support is not yet released and will be available as a restricted trial.