fix: saveCache shouldn't error on existing cache, warn instead #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Commits
hotfix: saveCache shouldn't error on existing cache, warn instead
cache key run in parallel, one will saveCache first and the next will
error out when trying to saveCache
@actions/cache, it is now an error
(e.g. different Node version, same OS) and did occur in workflows
here too actually
a different root cause
ci: also run all workflows on PRs to ensure they pass
push
, meaning only for root repo branches,and not PRs from forks
after merge
checks should be very visible
Tags
Fixes #39 , workaround for upstream actions/cache#144
Follow-up to bug introduced by #37
Adding PR check to CI pretty much identical to jaredpalmer/tsdx#373
Review Notes
#37 passed the CI check / self-integration test matrix I added in my fork
and I believe it passed here too (says 0 checks now though, possibly due to the patch bump added there), but when it was merged here it then failed. Since then has caused many failures downstream per #39, which I too experiencedEDIT: nope, CI checks didn't run here as they weren't turned on for PRs, so I've added that to all CI checks now as a second commit in this PR
Testing
Screenshot differences in CI
Before on
master
:After on cache-busted version of current PR:
While the same error is printed as I
console.warn
'd it, it no longer throws and therefore doesn't fail the jobIt also passes on current PR, but these were all cache hits, probably because I was testing on this branch before.
As far as I understand, there is no way to force cache bust without changing the key in GitHub Actions right now (no API for it to be exact), which makes integration testing cache misses a bit difficult. If we were to add actual integration tests as opposed to this "self-CI integration test" as I've done here then we could randomize cache key there to force a cache miss