Skip to content

Eliminate error messages from missing cache artifacts on first run #686

Description

@bschwedler

On the first run of a workflow (or when the artifact cache is missing), the Restore dependency version cache step in setup-bakery attempts to download a non-existent artifact, producing error messages like:

Unable to download artifact(s): Artifact not found for name: bakery-deps-*
Please ensure that your artifact is not expired and the artifact ...

Although the workflow continues due to continue-on-error: true, these error messages appear as failed steps in job logs, creating noise and confusion.

Expected behavior

The cache restore should fail gracefully on first run without producing visible error messages, while still showing actual retrieval failures (permissions, expiration, network issues).

Possible approach

Query the GitHub API in a bash step to check if the expected cache artifact exists before attempting to download it, conditionally running the download-artifact action only when the artifact exists.

Metadata

Metadata

Assignees

Labels

dockerRelated to container images we produce

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions