Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

retry cache install - #17

Open
CohenCyril wants to merge 3 commits into
v2from
v2localCache
Open

retry cache install#17
CohenCyril wants to merge 3 commits into
v2from
v2localCache

Conversation

@CohenCyril

Copy link
Copy Markdown
Member

No description provided.

@rikhuijzer

Copy link
Copy Markdown

Uhm, as far as I know, the jobs run concurrently on GitHub runners when you don't explicity use needs. Could that be the problem? I'm trying it out now on my fork

@rikhuijzer

Copy link
Copy Markdown

Nope. That's not it. I'm gonna give up on this one. I would start by doing some ls commands in the job and mess a bit around with that, but luckily this is not my project 😋 I hope that you'll figure it out 👍

@CohenCyril

Copy link
Copy Markdown
Member Author

Nope. That's not it. I'm gonna give up on this one. I would start by doing some ls commands in the job and mess a bit around with that, but luckily this is not my project I hope that you'll figure it out

Of course! I'm st***d... I forgot to checkout before... BTW does your action only cache the buildInput of the given nix_file?

@rikhuijzer

rikhuijzer commented Mar 11, 2021

Copy link
Copy Markdown

Nope. That's not it. I'm gonna give up on this one. I would start by doing some ls commands in the job and mess a bit around with that, but luckily this is not my project I hope that you'll figure it out

Of course! I'm st***d... I forgot to checkout before... BTW does your action only cache the buildInput of the given nix_file?

Haha, oh so I did go in the right direction even though my job in de fork failed.

BTW does your action only cache the buildInput of the given nix_file?

I'm not sure what you mean. Maybe the code of the action can answer your question. It basically moves the stuff over from the Nix store.

@CohenCyril

Copy link
Copy Markdown
Member Author

I'm not sure what you mean. Maybe the code of the action can answer your question. It basically moves the stuff over from the Nix store.

I mean, which parts of the store does it cache? Why is a default.nix even required?

@CohenCyril

CohenCyril commented Mar 11, 2021

Copy link
Copy Markdown
Member Author

@rikhuijzer

  • in b359658 since I put your action before cachix, it tries to recompile everything in default.nix (even though I checked or put it that it was in cachix before). Which circles back to why is there a nix_file to give in the first place? (In this action I'm actually doing much more than doing a build from a single default.nix file: I instantiate it many times with different arguments...)
  • in 25d796a it fails because I put cachix before your action and that's not authorized

@rikhuijzer

rikhuijzer commented Mar 11, 2021 via email

Copy link
Copy Markdown

@CohenCyril

CohenCyril commented Mar 11, 2021

Copy link
Copy Markdown
Member Author

It caches everything which is in the store after nix-env is done on running default.nix.

OK, thanks for the clarification. In theory, do you foresee any problem in modifying your action so that we do not have to provide a nix file, then letting the user do everything they want and in the end of the user action, caching everything (exactly as cachix does but with a local cache instead)?

@rikhuijzer

Copy link
Copy Markdown

It caches everything which is in the store after nix-env is done on running default.nix.

OK, thanks for the clarification. In theory, do you foresee any problem in modifying your action so that we do not have to provide a nix file, then letting the user do everything they want and in the end of the user action, caching everything (exactly as cachix does but with a local cache instead)?

I think that that will be difficult, because I'm basically wrapping around the procedures occurring in the GitHub Actions step. This is caused by the limited GitHub Actions capabilities at the time that I was writing the package. You're free to open a PR. Basically, the problem was that you can set GitHub to upload the cache at the end of the last step (like the normal GitHub cache Action). However, the Nix store sets all kinds of restrictive permissions on the files causing the caching step to fail. This is why I made the wrapper, so that I can run chmod before uploading it into the cache.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants