Skip to content

Error/failure when uploading a cache that already exists #85

@rcowsill

Description

@rcowsill

Describe the bug
The post step is marked as failed when attempting to upload a cache that already exists.

It looks like the cache API is now returning a different error message when the cache already exists. It used to say:

Cache already exists: Error: reserveCache failed: Cache already exists. Scope: [...], Key: [...], Version: [...]

Now it says:

Error: Unexpected error: ReserveCacheError: Unable to reserve cache with key [...], another job may be creating this cache.

The LayerCache searches for "Cache already exists" in error messages to ignore that case, but the new message doesn't match that.

To Reproduce

  1. Run a workflow using this action to cache docker layers
  2. Push a change that will cause some new layers to build
  3. Run the workflow again with the same cache keys
  4. Observe the error message when already-cached files are uploaded

Expected behavior
Action to detect the new Unable to reserve cache and treat it as non-fatal.

Debug logs
https://github.com/satackey/action-docker-layer-caching/runs/1507974881

Runner Environment (please complete the following information):

  • OS: ubuntu-18.04
  • Action version: v0.0.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions