hydra icon indicating copy to clipboard operation
hydra copied to clipboard

Git submodules not checked out in flake project, even with '?submodules=1' in flake uri.

Open RichardWarfield opened this issue 1 year ago • 1 comments

Describe the bug In a flake-based project that has a git submodule, the submodule seems not to get checked out, even with '?submodules=1' in the flake URI. The build fails with "No such file or directory" on a file in the submodule.

To Reproduce A reproducing example is proj2 here and has proj1 as a git submodule.

Create a jobset with flake URI of git+ssh://[email protected]/RichardWarfield/proj2?submodules=1

Expected behavior The job checks out the git repo with the required submodule and builds the project successfully

Log

Running phase: unpackPhase
unpacking source archive /nix/store/cadzicaa78vyvbdy1f7r4aqv1h4fiwnf-ijhnhy852xcxdb1qd8166gs4x3l9a4r3-source
source root is ijhnhy852xcxdb1qd8166gs4x3l9a4r3-source
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
cc1: fatal error: ./proj1/src/hello_world.c: No such file or directory
compilation terminated.

Hydra Server:

  • OS and version: [e.g. NixOS 24.05pre576254.ae5c332cbb58]
  • Version of Hydra:
[nix-shell:/etc/nixos]# hydra-server --version
/nix/store/pyh4fx1ak03nl96rawdka35a8y30v3pq-hydra-2023-12-24/bin/.hydra-server-wrapped
(Getopt::Long::GetOptions version 2.54; Perl version 5.38.2)
  • Version of Nix Hydra is built against: 2.19.3
  • Version of the Nix daemon

RichardWarfield avatar Jan 27 '24 10:01 RichardWarfield

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/recommendations-for-a-simple-ci-build-server-setup/39068/1

nixos-discourse avatar Jan 31 '24 05:01 nixos-discourse