jetify-com / devbox-install-action

31 stars 15 forks source link

Installation issue when updating devbox.json - cache issue? #11

Closed jimmidyson closed 1 year ago

jimmidyson commented 1 year ago

There seems to be a problem when changing devbox.json between runs. I've hit the following issue multiple times:

Error: error running command in Devbox: Command: /home/runner/.nix-profile/bin/nix print-dev-env /home/runner/work/capi-runtime-extensions/capi-runtime-extensions/.devbox/gen/flake/flake.nix --extra-experimental-features ca-derivations --option experimental-features nix-command flakes --json: exit status 1

Error: There was an internal error. Run with DEVBOX_DEBUG=1 for a detailed error message, and consider reporting it at [https://github.com/jetpack-io/devbox/issues](https://github.com/jetpack-io/devbox/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)

The solution is to delete the cache. I don't quite understand what's happening as the devbox cache key seems to be keyed correctly on the hash of the devbox.lock file. Any ideas how to avoid this?

Workflow file is https://github.com/d2iq-labs/capi-runtime-extensions/actions/runs/5949590827/workflow#L29-L32.

jimmidyson commented 1 year ago

Interestingly i noticed that the cache sizes are different with for the same hash key - wonder if this is the issue somehow?

image

jimmidyson commented 1 year ago

Ah shouldn't the cache be keyed on the devbox.lock file instead of devbox.json file?