actions / actions/cache

Optionally suppress the warning about non-existing directory to be cached

Open
#1,241 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Situation: actions/cache is reused by a higher-level action that caches certain directory using it. This directory may or may not exist by the end of a workflow, and it not existing is not an error.

However, actions/cache then prints the following in the output:

Warning: Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.

While not a major concern, it still would be nice to avoid warnings in normal situations. As far as I see from the source code, there is no way to suppress this message. Can you add one so that outer action (or workflow) can decide between "such situation shouldn't happen, issue a warning" (as now) and "such situation is normal and completely possible, simply ignore it"?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the path-validation warning in the actions/cache source; the issue does not name a file or test. Determine how an outer action or workflow could opt out of this warning while preserving the current behavior by default, then verify that missing cache paths no longer produce the warning when suppression is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.