rules_nixpkgs icon indicating copy to clipboard operation
rules_nixpkgs copied to clipboard

nix remote jobs are not working correctly on CI

Open avdv opened this issue 1 year ago • 0 comments

Describe the bug

I noticed that the nix remote CI jobs (withNixRemote = true) actually don't run remotely since the NIX_REMOTE_ENABLED variable which is checked here: https://github.com/tweag/rules_nixpkgs/blob/c1afab1763a238bad08a76bb91a12eb9ac2acecc/.github/workflows/workflow.yaml#L60-L63 is actually set to matrix.withNixRemote && matrix.os == 'ubuntu-latest' verbatim, so the condition is never true.

After fixing that problem (see https://github.com/tweag/rules_nixpkgs/commit/5046b7dca09b73824a7bd1fb4f850c1b6f11e9e9), the jobs fail with:

       Return code: 1
      Error output: 
        > warning: unknown setting 'always-allow-substitutes'
        > ssh: connect to host localhost port 2222: Connection refused
        > error: failed to start SSH connection to 'nix-server'

See https://github.com/tweag/rules_nixpkgs/actions/runs/9875397903/job/27271997561

To Reproduce

Expected behavior CI jobs should be able to use the nix server that is started inside a Docker container.

Environment

  • OS name + version: ubuntu-latest
  • Version of the code:

Additional context I am going to disable the jobs for now. @z8v could you have a look to see what's going on?

avdv avatar Jul 11 '24 06:07 avdv