Skip to content

Conversation

wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented Oct 14, 2025

Running eval in the merge queue prevents eval failures after merging multiple PRs with semantic merge conflicts.

It's also the base for allowing more sophisticated checks about rebuild counts in the merge queue later.

When branches are directly pushed to, such as for periodic merges, this will not run Eval immediately. However, the next PR will run it as part of its Eval step and will cache the results. Any further PR will then benefit from the same caching again.

This also avoids running Eval twice when pushing to staging-next or haskell-updates, where a PR is open at the same time. Here, the PR's Eval still runs on the push, of course.


This PR also runs Lix on the target commit and Nix on the merged commit. This does two things for us at once:

  • We test both Lix and Nix.
  • We ensure that both Lix and Nix produce the same output hashes.

If Lix and Nix were to produce different output hashes at some point, this would show up as rebuilds in every PR.


Running this in my fork also shows the first two differences between Lix and Nix:

  • tests.devShellTools.nixos
  • tests.devShellTools.unstructuredDerivationInputEnv

Both of these produce different hashes.

Things done

The Merge Queue part can't be tested in my fork, because regular forks don't support Merge Queues.


Add a 👍 reaction to pull requests you find important.

Running eval in the merge queue prevents eval failures after merging
multiple PRs with semantic merge conflicts.

It's also the base for allowing more sophisticated checks about rebuild
counts in the merge queue later.

When branches are directly pushed to, such as for periodic merges, this
will not run Eval immediately. However, the next PR will run it as part
of its Eval step and will cache the results. Any further PR will then
benefit from the same caching again.

This also avoids running Eval twice when pushing to staging-next or
haskell-updates, where a PR is open at the same time. Here, the PR's
Eval still runs on the push, of course.
This was only separate to work around possible delays from the target
branch's eval workflow. With the switch to the merge queue, this delay
is impossible - the relevant target commit will only appear once Eval
has completed in the merge queue, so Eval will be guaranteed to have
finished.

By running attrpaths and outpaths in the same step, we share ~10 seconds
of eval time, traversing through all of Nixpkgs.
This change runs Lix on the target commit and Nix on the merged commit.
This does two things for us at once:
- We test both Lix and Nix.
- We ensure that both Lix and Nix produce the same output hashes.

If Lix and Nix were to produce different output hashes at some point,
this would show up as rebuilds in every PR.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-25.05 Backport PR automatically labels Oct 14, 2025
@wolfgangwalther
Copy link
Contributor Author

Running this in my fork also shows the first two differences between Lix and Nix:

  • tests.devShellTools.nixos

  • tests.devShellTools.unstructuredDerivationInputEnv

Both of these produce different hashes.

These will be fixed in #451929. Exactly one of these cases that can be caught with this kind of Lix/Nix comparison test - Nixpkgs was using a builtin that was not available in all implementations and thus caused reproducibility issues.

@EarthenGarland
Copy link

Tangent question: as you do uses: actions/checkout@someCommit, can the same be done for runs-on: ubuntu-24.04-arm?
Since the arm runners are 'partners images' as described by github that are based on https://github.com/actions/runner-images/tags

@wolfgangwalther
Copy link
Contributor Author

Tangent question: as you do uses: actions/checkout@someCommit, can the same be done for runs-on: ubuntu-24.04-arm?

I have never seen image / commit references or hashes in runs-on. The docs don't mention it either. runs-on is a label based system, so I don't think what you're asking is possible.

@EarthenGarland
Copy link

Unfortunate if that's the case since the docs don't say about the actions@someCommit either.
I was asking since I saw by looking at tags that the contents of the ubuntu-24.04 changes, which might not be desirable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. backport release-25.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants