Repository navigation
Redesign the caching Job Summary - #985
Merged
Merged
Conversation
Render the caching report from structured CacheReport data using a single unified layout, replacing the three divergent code paths (NoOp / basic / enhanced) that previously each rendered their own markdown. Every variant now shares one skeleton: a section heading (`#### <icon> Gradle Caching — <Provider> (<status>)`), a status line, an integrated provider note, and an expandable cache-entry-details section. The Enhanced/Basic provider note is woven into the report under the heading and is now shown unconditionally (no longer gated on license acceptance). The two disabled variants (explicitly disabled, and skipped due to a pre-existing Gradle User Home) render as compact callouts with no expandable section. - caching-report.ts: new central renderer + all framing copy. - cache-service.ts: CacheReport/CacheEntryReport/status types; save() returns CacheReport. - cache-service-loader.ts: NoOp returns a CacheReport, drop LicenseWarningCacheService, add getProviderNote(). - cache-service-basic.ts: build a CacheReport, so basic caching now also gets expandable entry details. - job-summary.ts / setup-gradle.ts: thread CacheReport + ProviderNote. - configuration.ts: remove now-unused isCacheLicenseAccepted(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Render the heading as <h4> so it displays as a heading (markdown ATX headings were rendered literally in the Job Summary). - Heading reads "Gradle Caching — <Enhanced|Basic> Provider"; drop the status suffix since status now lives inside the details expando. - Provider note: lead with a linked "Enhanced Caching" / "Basic Caching" to the docs; the proprietary provider name is now inline code. - Move the status and cache-cleanup messages inside the details expando. The clickable summary now reads "Entries: N restored, M saved (expand for more details)". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Title now reads "Gradle State Caching — <icon> <Provider> (<status>)", consistent across all variants, with the status qualifier restored. - Make both provider notes parallel: "Enhanced Caching uses the proprietary ..." / "Basic Caching uses the basic open-source ...". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The terms-of-use / opt-out link is only relevant to the proprietary Enhanced provider, so the Basic note now ends after the upgrade suggestion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Use a hyphen rather than an em-dash in the report title. - Basic note reads "uses the basic open-source caching provider". - Details summary now reports restored/saved sizes when available: "Entries: 10 restored (120Mb), 1 saved (10Mb) - Expand for more details". Size is omitted when no metrics are available (basic caching), consistent with the metrics table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Redesigns the caching section of the Job Summary into a single, consistent layout across every cache provider and state, and integrates the provider message into the report rather than appending it disconnected at the bottom.
Motivation
The caching report was produced by three divergent code paths (NoOp / basic / enhanced), each rendering its own markdown:
<details>block.The Enhanced/Basic provider note floated at the very bottom, disconnected from the report.
What changed
save()now returns structuredCacheReportdata instead of pre-rendered HTML, and a single renderer (caching-report.ts) produces one unified layout for all variants:#### <icon> Gradle Caching — <Provider> (<status>)The two disabled variants (explicitly disabled, and skipped due to a pre-existing Gradle User Home) render as compact callouts with no expandable section.
Main repo
caching-report.ts(new): central renderer + all framing copy + entry table/<pre>helpers.cache-service.ts:CacheReport/CacheEntryReport/ status types;save()returnsCacheReport.cache-service-loader.ts:NoOpreturns a report;LicenseWarningCacheServiceremoved; newgetProviderNote().cache-service-basic.ts: builds aCacheReport.job-summary.ts/setup-gradle.ts: threadCacheReport+ProviderNote.configuration.ts: remove now-unusedisCacheLicenseAccepted().Vendored library
The structured contract requires gradle-actions-caching v0.7.0 (gradle/actions-caching#74). This PR updates the vendored library to that release — the official
Update gradle-actions-caching library to v0.7.0vendor commit is included here, so merging this PR ships the redesign together with the library it depends on.Testing
gradle/actions: 363/363 Jest tests pass, including newcaching-report.test.tscovering every variant.gradle-actions-caching: 74/74 pass under JDK 17.🤖 Generated with Claude Code