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

retry cache install #17

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from
Open

retry cache install #17

wants to merge 3 commits into from

Conversation

CohenCyril
Copy link
Member

No description provided.

@rikhuijzer
Copy link

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

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
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
Copy link

rikhuijzer commented Mar 11, 2021

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
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
Copy link
Member Author

CohenCyril commented Mar 11, 2021

@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
Copy link

rikhuijzer commented Mar 11, 2021 via email

@CohenCyril
Copy link
Member Author

CohenCyril commented Mar 11, 2021

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

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 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.

2 participants