Skip to content

Conversation

@bryango
Copy link
Collaborator

@bryango bryango commented Jul 18, 2025

some background

Release tests are special hydra jobs that determine whether channel updates are okay to be released or instead should be blocked. This is nicely described in the wiki page https://wiki.nixos.org/wiki/Channel_branches.

The release tests for all channels are defined here and listed on https://status.nixos.org in the "Hydra job for tests" column, where it also shows the history for each test.

motivations & solutions

The ability to query the status of release tests would be valuable for users if we want to pin our local nixpkgs to a "nice" historical commit. These test jobs are similar to usual package jobs in hydra, so we can simply query their status with hydra-check. In previous versions we can already do this manually with e.g.

$ hydra-check --channel=nixpkgs-unstable --arch="" unstable
Build Status for unstable on jobset nixpkgs/trunk
https://hydra.nixos.org/job/nixpkgs/trunk/unstable
✔              nixpkgs-25.11pre831594.e821e0319348  2025-07-18  https://hydra.nixos.org/build/303140061
⏹ (Cancelled)  nixpkgs-25.11pre831392.77110a5187ce  2025-07-18  https://hydra.nixos.org/build/303123984
...

where we have manually specified the job name "unstable" as the release test for the nixpkgs-unstable channel (and --arch="" since this is a special job in hydra that does not contain the architecture in its name). The job name may be different for each channel and one needs to look it up on https://status.nixos.org before actually querying it. For example, the release test job name for nixos-unstable is called "tested".

This PR adds a new --releases flag which automates the above process. Now we can simply do:

$ hydra-check --releases
info: fetching recent evals on --channel nixpkgs-unstable for --releases

Build Status for unstable on jobset nixpkgs/trunk
https://hydra.nixos.org/job/nixpkgs/trunk/unstable/all
⧖ 1818491  nixpkgs-25.11pre861192.5c9a8279f372  15h ago     ✔ 255997  ✖ 6036   ⧖ 1835  Δ ~      ⏹ 2025-09-14
✔ 1818483  nixpkgs-25.11pre861040.6d7ec06d6868  23h ago     ✔ 257693  ✖ 6144   ⧖ 0     Δ +14    ✔ 2025-09-13
...

which is equivalent to the previous query, combined with information of recent channel evals, basically providing the same information as in https://status.nixos.org.

Along the way, we also improve channel guessing by preferring nixpkgs-XX.XX-darwin on darwin (instead of nixos/release-XX.XX which was the previous default). This is arranged in a separate commit.

Update: this PR has grown too large so I will be cherry-picking parts of it and merge them step by step. These include the quality of life improvements in #84. Expect the number of commits here to decrease after these minor updates are merged into master.

@bryango bryango marked this pull request as draft September 14, 2025 04:25
@bryango bryango changed the title feat(args): query --release-tests for channels (plus minor fixes) feat(args): query --releases for channels (plus minor fixes) Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant