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

Make GHA cache restore any cache from current month if dependencies do not match #510

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

carbolymer
Copy link
Contributor

Changelog

- description: |
    Make GHA cache restore any cache from current month if dependencies do not match
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
   - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Make GHA cache restore any cache from current month if dependencies do not match.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@carbolymer carbolymer requested review from erikd and smelc April 8, 2024 16:49
@carbolymer carbolymer marked this pull request as ready for review April 8, 2024 16:52
@carbolymer carbolymer requested a review from palas April 8, 2024 19:38
@@ -95,7 +103,11 @@ jobs:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
Copy link
Contributor Author

@carbolymer carbolymer Apr 8, 2024

Choose a reason for hiding this comment

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

I'm not sure about having dist-newstyle here now. I feel it may produce build errors due to accumulating builds' outputs. Or it may not. I'd leave it here for now, and remove if it starts giving us issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be fine.

Copy link
Contributor

@smelc smelc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -8,6 +8,10 @@ on:
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
branches:
- main
# GH caches are removed when not accessed within 7 days - this schedule runs the job every 6 days making
# sure that we always have some caches on main
schedule:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can increase how long we hold on to caches for a in the repo settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see this option. Artifacts and logs retention time can be configured, but I don't think caches can.

@carbolymer carbolymer added this pull request to the merge queue Apr 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 9, 2024
@carbolymer carbolymer force-pushed the mgalazyn/chore/improve-gha-caching branch from 1512f8b to ae182ef Compare April 10, 2024 08:17
@carbolymer carbolymer requested a review from a team as a code owner April 10, 2024 08:17
@carbolymer carbolymer enabled auto-merge April 10, 2024 08:19
@carbolymer carbolymer added this pull request to the merge queue Apr 10, 2024
Merged via the queue into main with commit 52d9a38 Apr 10, 2024
23 checks passed
@carbolymer carbolymer deleted the mgalazyn/chore/improve-gha-caching branch April 10, 2024 08:41
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.

3 participants