Closed aciceri closed 1 year ago
I believe this comes from github:input-output-hk/empty-flake
(which gets called many times) not having a flake.lock.
I've just tried but it doesn't work.
I've added a lockfile to empty-flake
(here if someone wants to try it) adding an input, running nix flake lock
and then deleting the input (running nix flake lock
without inputs doesn't create any lockfile). Then I've done this change to my flake
cardano-node.inputs.cardano-node-workbench.membench.url = "<emptyFlakeWithLockfile>";
but I got this error:
error: cannot find flake 'flake:cardano-node-workbench' in the flake registries
… while updating the flake input 'cardano-node-recent/cardano-node-workbench'
… while updating the flake input 'cardano-node-recent'
… while updating the lock file of flake '<myFlake>'
So I've chose to fork cardano-node
itself replacing empty-flake
occurrences with my new empty flake with lockfile but I'm getting the same evaluation error by Hydra as before.
Just to make sure I understood you correctly you've replaced all the occurences of empty-flake
in the cardano-node
flake, are you sure you've covered all transitive dependencies? And the error is the previous one?
I think someone responsible for this flake should join the discussion and hopefully explain why this empty-flake
is needed in the first place....
BTW: This error is triggered in hercules-CI
too so it's not just hydra
related. Seems like GHA has impurities
Just to make sure I understood you correctly you've replaced all the occurences of empty-flake in the cardano-node flake, are you sure you've covered all transitive dependencies? And the error is the previous one?
I've not been able to cover all the transitive dependencies directly overriding inputs in the flake.nix
since checking the flake.lock
file I could see many empty-flake
with input-output-hs
as owner
.
By the way I was getting same error.
So, now I've directly edited the lockfile replacing every occurrences there with my empty-flake
which has a lockfile. Now nix
CLI doesn't work anymore (it stucks indefinitely) and Hydra gives the same error as before.
I've also noticed that if I try to delete cardano-node
lockfile and make nix
(now I'm using my system version i.e. 2.11.0
) recreate it stucks again (not sure, I stop getting any output for minutes, but I can see that CPU is working).
BTW: This error is triggered in hercules-CI too so it's not just hydra related. Seems like GHA has impurities
Maybe GHA impurities are due to --no-update-lock-file
here?
I think someone responsible for this flake should join the discussion and hopefully explain why this empty-flake is needed in the first place....
Not sure who to ping, maybe @jbgi since he has created empty-flake
?
Doing this seems to work:
empty-flake.url = "github:input-output-hk/empty-flake?rev=2040a05b67bf9a669ce17eca56beb14b4206a99a";
cardano-node-workbench = {
url = "github:input-output-hk/cardano-node/ed9932c52aaa535b71f72a5b4cc0cecb3344a5a3";
inputs.membench.follows = "empty-flake";
};
cardano-node = {
url = "github:input-output-hk/cardano-node?ref=1.35.3";
inputs.cardano-node-workbench.follows = "cardano-node-workbench";
inputs.node-measured.follows = "cardano-node-workbench";
};
I think this hack is what your looking for, but I thought this was fixed in 1.35.3 tag.
@disassembler I added that line and referred to cardano-node
with tag 1.35.3-configs
.
This is the error I get when executing nix flake lock --update-input cardano-node
:
warning: Git tree '/home/marijan/workspace/ardana/cardano-app-template' is dirty
warning: input 'cardano-node' has an override for a non-existent input 'membench'
warning: input 'cardano-node/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-measured'
warning: input 'cardano-node/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-process'
warning: input 'cardano-node/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-snapshot'
warning: input 'cardano-node/cardano-node-workbench/membench' has an override for a non-existent input 'nixpkgs'
warning: input 'cardano-node/node-measured/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-measured'
warning: input 'cardano-node/node-measured/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-process'
warning: input 'cardano-node/node-measured/cardano-node-workbench/membench' has an override for a non-existent input 'cardano-node-snapshot'
warning: input 'cardano-node/node-measured/cardano-node-workbench/membench' has an override for a non-existent input 'nixpkgs'
@disassembler same issue for release 1.35.4
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
I confirm that this is still a problem and I add that I also get this error using Hercules CI.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
Still a problem
❯ nix shell nixpkgs#hydra-unstable --command hydra-eval-jobs --flake github:input-output-hk/cardano-node/0c5d82b08160077cc415dcd2897bab2a62ccb5ee
warning: `--gc-roots-dir' not specified
error: cannot update flake input 'cardano-node-workbench/membench' in pure mode
error: worker error: error: cannot update flake input 'cardano-node-workbench/membench' in pure mode
Internal/External External
Area Nix
Summary Hydra gives out this evaluation error when trying to evaluate a flake containing
cardano-node
as input.It looks like it tries to lock some inputs (but they should be all specified in the lockfile) but fails it Hydra works in pure mode.
Maybe this is due to its weird "recursive" inputs which also causes this warning using Nix from CLI:
Or maybe this is an error in Nix (or Hydra?) itself that can't manage
follows
as it should.Steps to reproduce Create a flake with
cardano-node
as input and add it to Hydra.Expected behavior It just works.
System info (please complete the following information):
cardano-node/a0b000380a32155feb62d3bfd73513243c98a4f6
)Additional context In case this was a bug in Hydra or Nix I think that IOG is using some workaround to make their stuff build on Hydra (or maybe IOG doesn't use Hydra? TBH I've no idea), maybe someone could share it here? I tried adding several
following
to my inputs to be sure that they are locked but I had no luck.