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

Add arch to cache key #72

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cap10morgan
Copy link
Contributor

I was still seeing the x86-64 version installed in my self-hosted arm64 runner when using version 9.5, even after destroying and recreating it. So it seemed like a caching thing.

@cap10morgan
Copy link
Contributor Author

Hmm... even telling it to use this commit in my workflow I'm still getting the x86-64 version installed. I'll keep investigating.

@cap10morgan
Copy link
Contributor Author

Well, I guess it isn't actually using this commit after all. With debug logging turned on, the arch still isn't present in the cache key. So this might be the fix after all, I just need to make sure I'm actually using it in my testing. Maybe if I point it at my fork instead.

@cap10morgan
Copy link
Contributor Author

It helps if I point it at a commit where I've updated the compiled JS in dist/ :)

@cap10morgan
Copy link
Contributor Author

It also seems like the invalidate-cache: true param isn't invalidating the cache? It still says it's restoring from the cache even with that present.

@cap10morgan
Copy link
Contributor Author

cap10morgan commented Aug 29, 2022

OK, I had to manually delete the cache dir _work/_tool/Babashka (even with invalidate-cache: true) but once I did that w/ this code it did finally install the arm64 version of bb. So this PR is ready to merge if you're good w/ it @DeLaGuardo.

Want me to open an issue about invalidate-cache not working?

@cap10morgan
Copy link
Contributor Author

The invalidate-cache issue is likely specific to self-hosted runners. I imagine a lot of this stuff is ephemeral in GitHub-provided runners whereas self-hosted runners seem to persist the tool cache, for example. So skipping the cache restores when invalidate-cache is true is not sufficient because the cache is usually already there in its restored location on self-hosted runners. I can write up an issue and open a separate PR for that.

@cap10morgan
Copy link
Contributor Author

cap10morgan commented Sep 27, 2022

@DeLaGuardo Any thoughts on this and #74?

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.

None yet

1 participant