!zghijEASpYQWYFzriI:nixos.org

Hydra

388 Members
109 Servers

Load older messages


SenderMessageTime
7 Jun 2022
@roberthensing:matrix.orgRobert Hensing (roberth) * evaluation hasn't started for 13h; seems like something is wrong https://hydra.nixos.org/jobset/nixos/trunk-combined07:26:28
@roberthensing:matrix.orgRobert Hensing (roberth)I might have caused that with a diverging nested attrset in nixos.tests.allDrivers, I think. I've fixed that problem in master at Jun 6 20:22:26 2022 +020007:30:13
@jackdk:matrix.orgjackdk joined the room.07:54:30
@jackdk:matrix.orgjackdk I was told to re-ask my question here:
Is there any more documentation about how to make Hydra build a Flake, beyond the comment on hydraJobs in https://nixos.wiki/wiki/Flakes ?
07:54:53
@kenran_:matrix.orgkenran_
In reply to @jackdk:matrix.org
I was told to re-ask my question here:
Is there any more documentation about how to make Hydra build a Flake, beyond the comment on hydraJobs in https://nixos.wiki/wiki/Flakes ?
Hum, I'd say this is really all there is to it in a flake.nix. Or do you mean how to set up a flake project in the Hydra UI?
08:02:57
@jackdk:matrix.orgjackdk
In reply to @kenran_:matrix.org
Hum, I'd say this is really all there is to it in a flake.nix. Or do you mean how to set up a flake project in the Hydra UI?

how to set up a flake project in the Hydra UI?
This is the gap in my understanding. I can write flakes and I have set up a declarative jobset by writing a spec.json.

08:04:03
@kenran_:matrix.orgkenran_
In reply to @jackdk:matrix.org

how to set up a flake project in the Hydra UI?
This is the gap in my understanding. I can write flakes and I have set up a declarative jobset by writing a spec.json.

Ah, I think I did this by trial and error, too. I don't have a spec.json, and I don't think it's needed. Let me see if I can retrace my steps:
08:05:43
@kenran_:matrix.orgkenran_
  • Create the project (give it a name and that's enough imho)
  • Actions -> Create Jobset -> enter a flake URI, like github:my/project. In my case (private GitLab instance) it's something like git+ssh://git@gitlab.foo.de/group/projectname?ref=main. Set some of the other preferences as you like.
    jackdk is yours a private project too?
  • If your Hydra has access to the repo then everything should be working soon thereafter, nothing more needed.
08:09:45
@kenran_:matrix.orgkenran_ *
  • Create the project (give it a name and that's enough imho)
  • Actions -> Create Jobset -> enter a flake URI, like github:my/project. In my case (private GitLab instance) it's something like git+ssh://git@gitlab.foo.de/group/projectname?ref=main. Set some of the other preferences as you like.
    jackdk is yours a private (not publically accessible) project too?
  • If your Hydra has access to the repo then everything should be working soon thereafter, nothing more needed.
08:10:20
@jackdk:matrix.orgjackdkI'm thinking about how to do CI for my private/public projects because I feel a bit rude rebuilding the universe on various CI services, but I haven't actually got anything serious running.08:10:52
@kenran_:matrix.orgkenran_(Mind you I'm also a first-time Hydra user, so there might be gaps in my understanding, but so far everything is working in my end.)08:10:58
@jackdk:matrix.orgjackdk But because the flake completely specifies its inputs, ISTM that you don't need the separate spec.json to declare which inputs you want in NIX_PATH or whatever 08:11:53
@kenran_:matrix.orgkenran_ If you have private repos, then the hydra user on your server needs access via SSH. I've just added a special GitLab user and SSH key pair on the server in /var/lib/hydra (I think that was the path). 08:12:35
@kenran_:matrix.orgkenran_
In reply to @jackdk:matrix.org
But because the flake completely specifies its inputs, ISTM that you don't need the separate spec.json to declare which inputs you want in NIX_PATH or whatever
Yeah, that sounds about right. I've never used spec.json; feels like hydraJobs make that obsolete for flake projects.
08:13:16
@jackdk:matrix.orgjackdk Yeah it looks like spec.json does everything flakes do, but worse. Consider https://github.com/qfpl/reflex-workshop/blob/master/spec.json : it says "go evaluate release.nix from input reflex-workshop, setting <nixpkgs> and <reflex-workshop> in NIX_PATH. The attrset that the evaluation returns defines the jobs to actually run. 08:16:50
@kenran_:matrix.orgkenran_Ah yes. Just use the flake output type and enjoy :)08:17:27
@kenran_:matrix.orgkenran_

Sadly the NixOS tests I've written fail in my Hydra instance and I don't know why. I'll wait and see if anyone answers in the NixOS channel first, then re-post here in full detail. In essence all my tests use a postgresql service which after some time leads to

machine # [  336.433468] postgresql-pre-start[896]: Success. You can now start the database server using:
machine # [  336.452698] postgresql-pre-start[896]:     /nix/store/6cn4h4icjjvg9yqx8iy55hvmqbq0jj2j-postgresql-10.21/bin/pg_ctl -D /var/lib/postgresql/10.0 -l logfile start
machine # [  337.181043] systemd[1]: postgresql.service: Failed with result 'timeout'.
08:19:20
@kenran_:matrix.orgkenran_Locally they're running just fine, so I'm at a loss. It's a flake project with everything pinned down and supposedly reproducible.08:19:46
@roberthensing:matrix.orgRobert Hensing (roberth)
In reply to @roberthensing:matrix.org
evaluation hasn't started for 13h; seems like something is wrong https://hydra.nixos.org/jobset/nixos/trunk-combined
it came through ✅
13:49:28
8 Jun 2022
@tim:stratum0.orgdadada (they/them) changed their display name from dadada / Tim (they/er) to dadada.19:22:46
9 Jun 2022
@v0id:nltrix.net@v0id:nltrix.net left the room.23:04:16
10 Jun 2022
@kenran_:matrix.orgkenran_ I'm trying to create a minimal example for my Hydra/PostgreSQL problem mentioned above now, mainly just using a postgresql_10 service and waiting for the unit to come up. This is what usually seems to fail on my Hydra, but not locally. 10:31:10
@kenran_:matrix.orgkenran_Hum, of course the minimal example works as expected. The only thing I can even think of is the pin.10:58:25
@kenran_:matrix.orgkenran_ But then it stresses me out that the same nix build runs fine locally. 10:58:45
@kenran_:matrix.orgkenran_

If anyone has any ideas as to what could lead to a NixOS test running locally but not on a Hydra instance (the last thing that comes to my mind would be performance differences), I'd be really happy. I'll put my example on github next week, hopefully a smarter person than me can see what's going on then. The gist of it is that I'm starting the postgres service, wait for it to be up, then change the user password. This works fine.

But then doing anything after, like machine.succeed("PGPASSWORD=foobar psql -d my_db -U postgres -c 'select * from information_schemas.tables' -o blub"), I get log output that doesn't even mention the "waiting" anymore and postgres just seems to fail:

machine # [  315.423797] postgresql-pre-start[902]: WARNING: enabling "trust" authentication for local connections
machine # [  315.428066] postgresql-pre-start[902]: You can change this by editing pg_hba.conf or using the option -A, or
machine # [  315.433320] postgresql-pre-start[902]: --auth-local and --auth-host, the next time you run initdb.
machine # [  315.443602] postgresql-pre-start[902]: Success. You can now start the database server using:
machine # [  315.455771] postgresql-pre-start[902]:     /nix/store/6cn4h4icjjvg9yqx8iy55hvmqbq0jj2j-postgresql-10.21/bin/pg_ctl -D /var/lib/postgresql/10.0 -l logfile start
machine # [  315.910651] systemd[1]: postgresql.service: Failed with result 'timeout'.
machine # [  315.931785] systemd[1]: Failed to start PostgreSQL Server.
machine # [  315.949857] systemd[1]: postgresql.service: Consumed 52.412s CPU time, read 0B from disk, written 49.6M to disk, no IP traffic.
machine # [  315.996944] systemd[1]: Reached target Multi-User System.
machine # [  316.027544] systemd[1]: Startup finished in 1min 18.771s (kernel) + 3min 57.251s (userspace) = 5min 16.022s.
cleanup
kill machine (pid 8)
machine # qemu-kvm: terminating on signal 15 from pid 6 (/nix/store/vzqny68wq33dcg4hkdala51n5vqhpnwc-python3-3.9.12/bin/python3.9)
(finished: cleanup, in 0.06 seconds)
Traceback (most recent call last):
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/bin/.nixos-test-driver-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/__init__.py", line 114, in main
    driver.run_tests()
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/driver.py", line 146, in run_tests
    self.test_script()
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/driver.py", line 142, in test_script
    exec(self.tests, symbols, None)
  File "<string>", line 1, in <module>
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/machine.py", line 459, in wait_for_unit
    retry(check_active)
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/machine.py", line 126, in retry
    if fn(False):
  File "/nix/store/hxkw9fj8l3ipraz0q8gkfalv35a6vh4v-nixos-test-driver-1.1/lib/python3.9/site-packages/test_driver/machine.py", line 439, in check_active
    raise Exception('unit "{}" reached state "{}"'.format(unit, state))
Exception: unit "postgresql" reached state "failed"
kill vlan (pid 7)
14:17:48
@kenran_:matrix.orgkenran_This works just fine locally though, and I'm at a loss.14:18:01
@kenran_:matrix.orgkenran_ * This same test works just fine locally though, and I'm at a loss.14:19:27
@jmgilman:matrix.orgJoshua Gilman joined the room.19:21:26
11 Jun 2022
@lewo:matrix.orglewo kenran_: is KVM enabled on your Hydra instance? 06:10:33
@janne.hess:helsinki-systems.dedas_jdoes anyone here know what the altnr of a jobsetevalinput is?19:51:00

Show newer messages


Back to Room ListRoom Version: 6