-
Notifications
You must be signed in to change notification settings - Fork 461
[WIP] Remove GitHub-actions caches every Tuesday midnight. #5165
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
357bed3 to
63ae05a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5165 +/- ##
=======================================
Coverage 51.35% 51.35%
=======================================
Files 273 273
Lines 24671 24671
=======================================
Hits 12670 12670
Misses 11212 11212
Partials 789 789 ☔ View full report in Codecov by Sentry. |
|
Can any of the maintainers test this by manually running this workflow? |
|
@nawazkh I'd love to run this but I'm not sure if I can run a workflow from your fork on GitHub actions. Do you know if there's a way for me to do this? |
You might want to run the below script from your local and see if a cache gets deleted. export MAX_CACHE_AGE_DAYS=30#!/bin/bash
echo "Fetching list of caches..."
# List caches
caches=$(gh actions-cache list --json id,createdAt)
echo "Caches found: $(echo "$caches" | jq '. | length')"
# Get current time
current_time=$(date +%s)
# Loop through all caches and delete those older than MAX_CACHE_AGE_DAYS
for cache_id in $(echo "$caches" | jq -r '.[] | select((('"$current_time"' - (.createdAt | fromdateiso8601 | mktime)) / 86400) > '"$MAX_CACHE_AGE_DAYS"') | .id'); do
echo "Deleting cache with ID: $cache_id"
gh actions-cache delete $cache_id --confirm
echo "Deleted cache $cache_id"
exit 0
done^ this shell script is a copy paste from the PR but with one extra |
|
I got this error when running the command: I also had to change |
We are removing all caches on Wednesday mid night since CAPZ dependencies get updated on Monday via Dependabot.
|
I was looking at the cache, and noticed that the older caches(more than 22 days) get auto deleted. Thank you for checking the code nonetheless @willie-yao ! /close |
|
@nawazkh: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
TODOs:
Release note: