Skip to content
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

Default to cache-read-only for non-default branches #149

Merged
merged 3 commits into from Jun 4, 2022

Commits on Jun 4, 2022

  1. Use 'cache-read-only' for all but default_branch

    Cache entries _written_ from jobs run on a non-default branch will be private
    to other jobs for that branch. When development flow involves working on a
    feature branch and then merging into 'main', these branch-private cache
    entries can result in eviction of other (shared) cache entries generated
    for the default branch.
    
    With this change, we make the recommended setup the default, by running
    with `cache-read-only: true` for any jobs run on a non-default branch.
    These jobs will be able to read cache entries written from the main branch,
    but will not write any cache entries.
    
    Fixes #143
    bigdaz committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    0a36ca9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b02f4f1 View commit details
    Browse the repository at this point in the history
  3. Explicitly allow cache-write for test invocations

    The `gradle-build-action` test workflows need to write cache entries,
    even when run on non-default branches. This change add explicit configuration
    to set `cache-read-only: false` when cache writing is required.
    bigdaz committed Jun 4, 2022
    Configuration menu
    Copy the full SHA
    00cdd4d View commit details
    Browse the repository at this point in the history