GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Explicit logging of cache key and restore key matches by Link- · Pull Request #2101 · actions/toolkit

Conversation

@Link-

@Link- Link- commented Jul 14, 2025

Copy link
Copy Markdown
Member

Fixes: actions/cache#1626

Improve logging for cache restoration in the restoreCacheV2 functionality. It adds more specific log messages to differentiate between cache hits for exact keys and restore keys, enhancing debugging and traceability.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Link- added 2 commits July 14, 2025 03:45
@Link-
Fix logging of cache key and restore key matches
0c5da92
@Link-
Fix linting issues
cf4886c
Copilot AI review requested due to automatic review settings July 14, 2025 10:50
@Link-
Link- requested a review from a team as a code owner July 14, 2025 10:50
Copilot AI reviewed Jul 14, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves cache restoration logging in the restoreCacheV2 functionality by adding explicit differentiation between exact cache key matches and restore key matches. This enhancement addresses issue #1626 by providing clearer debugging information during cache operations.

  • Replaces generic cache hit logging with specific messages for exact vs restore key matches
  • Adds logic to determine if the matched key differs from the requested key
  • Updates test cases to verify the new logging behavior

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/cache/src/cache.ts Implements conditional logging logic to distinguish between exact key and restore key cache hits
packages/cache/tests/restoreCacheV2.test.ts Adds test assertions to verify the new logging messages are generated correctly
Comments suppressed due to low confidence (1)

packages/cache/src/cache.ts:267

  • The variable name 'isRestoreKeyMatch' is misleading. When request.key !== response.matchedKey, it indicates a restore key was matched, but the variable name suggests it's checking if it IS a restore key match. Consider renaming to 'isExactKeyMatch' with inverted logic or 'matchedRestoreKey' for clarity.
    const isRestoreKeyMatch = request.key !== response.matchedKey

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BoomchainLabs
BoomchainLabs approved these changes Jul 14, 2025
View reviewed changes
@Link- Link- self-assigned this Jul 15, 2025
GrantBirki
GrantBirki approved these changes Jul 17, 2025
View reviewed changes
danwkennedy
danwkennedy approved these changes Jul 18, 2025
View reviewed changes
GhadimiR
GhadimiR approved these changes Jul 18, 2025
View reviewed changes

@GhadimiR GhadimiR left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Link-
Link- merged commit 79e1d8b into main Jul 18, 2025
@Link-
Link- deleted the Link-/clarify-cache-hit-log branch July 18, 2025 15:20
@Link- Link- mentioned this pull request Aug 6, 2025
Prepare @actions/cache 4.0.4 #2111
Merged
Derrick-MUGISHA pushed a commit to Derrick-MUGISHA/toolkit that referenced this pull request Oct 12, 2026
@Link-
Merge pull request actions#2101 from actions/Link-/clarify-cache-hit-log
4c27cf1
Explicit logging of cache key and restore key matches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@GhadimiR GhadimiR GhadimiR approved these changes
+3 more reviewers
@danwkennedy danwkennedy danwkennedy approved these changes
@GrantBirki GrantBirki GrantBirki approved these changes
@BoomchainLabs BoomchainLabs BoomchainLabs approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@Link- Link-

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Conflicting log message for Cache hit for

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Link- @danwkennedy @GrantBirki @GhadimiR @BoomchainLabs
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.