recent nix: cannot unmarshal object into Go value of type []*nix2.nixPathInfo #1

Open
opened 2024-02-10 11:13:22 +00:00 by kiara · 1 comment

hi there,
this driver currently invokes nix path-info.
on recent nix versions such as 2.18.1, such invocations have appeared to fail for me, yielding an error:

rpc error: code = Unknown desc = Couldn't determine flake requisites: json: cannot unmarshal object into Go value of type []*nix2.nixPathInfo

i hadn't managed to get old versions of nix to build, but for what it's worth, i had a similar issue pop up using the similar driver nomad-driver-nix.

hi there, this driver currently [invokes `nix path-info`](https://git.deuxfleurs.fr/Deuxfleurs/nomad-driver-nix2/src/branch/main/nix2/nix.go#L122-L140). on recent nix versions such as 2.18.1, such invocations have appeared to fail for me, yielding an error: > rpc error: code = Unknown desc = Couldn't determine flake requisites: json: cannot unmarshal object into Go value of type []*nix2.nixPathInfo i hadn't managed to get old versions of nix to build, but for what it's worth, i had a similar issue pop up using the similar driver [`nomad-driver-nix`](https://github.com/input-output-hk/nomad-driver-nix/).
Owner

This software is not really maintained anymore, we are still using it on a testing cluster but I think we will go back to Docker at some point. I personnally do not have time to dig into this at the moment, but if you'd like to do so, you should try checking if the nix path-info command wrote anything to stderr, because I can't see a difference in the --json output of nix 2.18 and nix 2.10. Maybe it's the invocation arguments on the command line for nix path-info that are not working anymore, I know there was a change recently where nix path-info xxx.drv stopped meaning the same thing and you now have to write nix path-info xxx.drv^* instead. This could be it in this case I guess. Hopefully you can debug this and make it work again, good luck!

This software is not really maintained anymore, we are still using it on a testing cluster but I think we will go back to Docker at some point. I personnally do not have time to dig into this at the moment, but if you'd like to do so, you should try checking if the nix path-info command wrote anything to stderr, because I can't see a difference in the --json output of nix 2.18 and nix 2.10. Maybe it's the invocation arguments on the command line for nix path-info that are not working anymore, I know there was a change recently where `nix path-info xxx.drv` stopped meaning the same thing and you now have to write `nix path-info xxx.drv^*` instead. This could be it in this case I guess. Hopefully you can debug this and make it work again, good luck!
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/nomad-driver-nix2#1
No description provided.