Skip to content

Change missing cache directory error to warning #1182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aparnajyothi-y
Copy link
Contributor

Description:
This PR updates the cache lookup logic to log a warning instead of throwing an error when a cache folder path is not found on disk.

Previously: action failed with Error: Cache folder path ... doesn't exist.

Now: action logs a warning via core.warning() and continues execution.

Motivation: In many cases, missing cache simply means there are no dependencies to cache, which should not fail the workflow.

This improves developer experience by preventing unnecessary workflow failures while still surfacing useful diagnostic information.

Related issue:
#436

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 10:47
@aparnajyothi-y aparnajyothi-y requested a review from a team as a code owner August 21, 2025 10:47
Copilot

This comment was marked as outdated.

@aparnajyothi-y aparnajyothi-y requested a review from Copilot August 21, 2025 11:19
Copy link
Contributor

@Copilot Copilot AI left a 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 changes the error handling behavior when cache directories don't exist during the cache save operation. Instead of throwing an error that would fail the workflow, the action now logs a warning and continues execution.

  • Replaces error throwing with warning logging when cache directories are missing
  • Adds early return to prevent further cache operations when directories don't exist
  • Improves developer experience by avoiding unnecessary workflow failures

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@simondeziel simondeziel left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants