Skip to content

Failure to save the cache should not fail the entire run #592

Description

@thetorpedodog

Description:

When running a workflow, there may be an issue which causes the cache not to be saved. This should not cause the entire run to be reported as a failure.

Action version:

v4.5.0

Platform:

  • Ubuntu
  • macOS

Runner type:

  • Hosted

Tools version:

Independent of Python version.

Repro steps:

  1. Include a setup-python step in a workflow with caching enabled.
  2. Have it happen to run at a time when the cache servers are acting flaky.

Example failed run: https://github.com/single-cell-data/TileDB-SOMA/actions/runs/3960808578/attempts/1

Expected behavior:

If the run finishes successfully, but the cache cannot be uploaded to the cache server, the failure to create the cache entry should be ignored.

Actual behavior:

When the cache fails to upload, the run is failed despite completing successfully in all other respects.

Activity

  1. e-korolevskii commented on Jan 19, 2023

    @e-korolevskii
    Contributor

    Hello @thetorpedodog! Thank you for reporting this!
    We will investigate the issue and get back to you as soon as we have updates

  2. thetorpedodog commented on Jan 19, 2023

    @thetorpedodog
    Author

    For comparison, a failure to upload with the github/cache action does not fail the run: https://github.com/single-cell-data/TileDB-SOMA/actions/runs/3961705977/jobs/6787460842

    Post job cleanup.
    /usr/local/bin/gtar --posix -cf cache.tzst --exclude cache.tzst -P -C /Users/runner/work/TileDB-SOMA/TileDB-SOMA --files-from manifest.txt --delay-directory-restore --use-compress-program zstdmt
    Warning: Failed to save: uploadChunk (start: 0, end: 33554431) failed: Cache service responded with 503
    Cache saved with key: libtiledbsoma-build-dist-macos-12-3.10-79892bce4ca84bea3b28c1364692c753f17e1b0711f57db30aef7a6297fb0420
    

    It seems like the Python setup action needs to just ignore the failure to cache (and probably report it) the same way that the github/cache action does.

    Thank you for the quick response.

  3. e-korolevskii commented on Jan 19, 2023

    @e-korolevskii
    Contributor

    Thanks for the clarification, I'm sure it will help.

  4. dmitry-shibanov commented on Apr 25, 2023

    @dmitry-shibanov
    Contributor

    Hello @thetorpedodog. We released a new version of the action with changes to prevent the step from falling if there are issues with the cache services.

    For now I'm going to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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