Skip to content

Delete cache on build failure - #1361

Merged
granny merged 4 commits into
PurpurMC:ver/1.20.1from
TheRealRyGuy:ver/1.20.1
Jul 3, 2023
Merged

granny merged 4 commits into
PurpurMC:ver/1.20.1from
TheRealRyGuy:ver/1.20.1

Conversation

@TheRealRyGuy

Copy link
Copy Markdown
Contributor

cc granny
This deletes cache on build fail, still requires a rerun though
If you wanted to combine the rerun, just needs a check (label?) to ensure it only runs once
POST /repos/:owner/:repo/actions/runs/:run_id/rerun
https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28 - cache API

@BillyGalbreath

Copy link
Copy Markdown
Contributor

why not just delete the cache before every run? :sipjuice:

image

@granny

granny commented Jun 23, 2023

Copy link
Copy Markdown
Member

because i'm extra

@TheRealRyGuy

Copy link
Copy Markdown
Contributor Author

i lowkey don't like the impl of that cache action so i may make my own
but this should do part of the trick - auto rerunning feels sketchy cause we can't check the error message

@TheRealRyGuy

TheRealRyGuy commented Jun 24, 2023 •

Copy link
Copy Markdown
Contributor Author

k this will have actual debug now when clearing cache and is readable & easier to modify
edit: still doesn't build that yaml library smh

@granny granny left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Proposal: Instead of clearing the actions cache, what if we just copy/pasted the "Apply Patches" & "Build Patches" steps but with the failure condition on both, as well as a step before that runs something like ./gradlew clean cleanCache.

So essentially:

  1. Apply Patches
  2. Build Patches
  3. If failed, run ./gradlew clean cleanCache
  4. If failed, run "Apply Patches"
  5. If failed, run "Build Patches"

@TheRealRyGuy

Copy link
Copy Markdown
Contributor Author

i mean clean (should?) depend on cleanCache, i'm not against fully clearing the actions cache either way as well
not a bad idea though to run it like that

@TheRealRyGuy

Copy link
Copy Markdown
Contributor Author

forgot abt this my fault - fixed it though. no longer deletes actions cache

@granny
granny merged commit 2577037 into PurpurMC:ver/1.20.1 Jul 3, 2023
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