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

Github Actions Cache #8008

Open
danoli3 opened this issue May 30, 2024 · 4 comments
Open

Github Actions Cache #8008

danoli3 opened this issue May 30, 2024 · 4 comments
Assignees

Comments

@danoli3
Copy link
Member

danoli3 commented May 30, 2024

Looks like we haven't been cleaning up caches

image

Cache list : https://github.com/openframeworks/openFrameworks/actions/caches

https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries

Shall test adding cache clean to PR on close

@danoli3 danoli3 self-assigned this May 30, 2024
@danoli3
Copy link
Member Author

danoli3 commented May 30, 2024

Added cleanup on PR close again should help fix some of the issues

@danoli3
Copy link
Member Author

danoli3 commented Jun 6, 2024

current cache cleaning not working:

gh extension install actions/gh-actions-cache
  REPO=openframeworks/openFrameworks
  BRANCH="refs/pull/8007/merge"
  echo "Fetching list of cache key"
  cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
  ## Setting this to not fail the workflow while deleting cache keys.
  set +e
  echo "Deleting caches..."
  for cacheKey in $cacheKeysForPR
  do
      gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
  done
  echo "Done"
  shell: /usr/bin/bash -e {0}
  env:
    GH_TOKEN: ***
Fetching list of cache key
Deleting caches...
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Done

@dimitre
Copy link
Member

dimitre commented Jul 28, 2024

it should be self pruning like mentioned here
https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
but it is well over 10Gb. did you find any issues related to this?

@danoli3
Copy link
Member Author

danoli3 commented Aug 1, 2024

It seems to auto-clear a few when it hits the top.

The cache clearing action is not functioning still might need @ofTheo to check the gh cache key or add one with permission to clear that cache

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

No branches or pull requests

2 participants