Skip to content

"Warning: Cache not found" on first run in branch #1552

@MikeMcC399

Description

@MikeMcC399

Current behavior

'actions/cache@v4' (SHA:1bd1e32a3bdc45362d1e726936510720a7c30a57)
actions/cache@v4.2.0

displays a warning such as:

Warning: Cache not found for keys: my-cache-Linux-e13c8d95e393dfdbfc3046a36b72e0d02da8e564e776fb3f7d5b53be6b568bc5
Cache not found for input keys: my-cache-Linux-e13c8d95e393dfdbfc3046a36b72e0d02da8e564e776fb3f7d5b53be6b568bc5

when a GitHub Actions workflow contains:

uses: actions/cache@v4

and the workflow is running for the first time in a branch.

This is a regression compared to how it used to work.

Expected behavior

No warning should be issued when a workflow runs for the first time in a branch.

Caches are linked to branches and if a workflow runs for the first time in a branch, then it is an expected condition that there is no cache available.

Warnings should only be issued if some corrective action is necessary. In this situation no user corrective action is necessary. After the workflow has run once, a cache will be established and any subsequent runs will use the cache. The situation is self-correcting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions