Skip to content

ci/eval: don't evaluate packages marked as broken#409867

Merged
wolfgangwalther merged 1 commit intoNixOS:masterfrom
wolfgangwalther:ci-no-eval-broken
May 28, 2025
Merged

ci/eval: don't evaluate packages marked as broken#409867
wolfgangwalther merged 1 commit intoNixOS:masterfrom
wolfgangwalther:ci-no-eval-broken

Conversation

@wolfgangwalther
Copy link
Contributor

@wolfgangwalther wolfgangwalther commented May 22, 2025

I took this out of #406825, which we realized needs more work. Still, the change to evaluation of broken packages is good to fix cases like #355847 (comment).

Since the first two commits of that PR kind of belong together for me, I squashed them. I also adjusted the commit message slightly, so that it doesn't refer to the "next commit" anymore, which would be the release-checks. Instead the reasoning is now more along the lines of fixing the above mentioned issue without causing regressions for unfree packages.

Things done

  • Let's look at the eval results / "rebuilds" this produces.
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

We really can't expect packages that are marked as broken to evaluate,
and *especially* not on unsupported platforms.

For context, we were attempting to eval them *past* the broken throw
previously, which caused fun side effects like [0].

When we set `includeBroken = true` before, this also included unfree
packages. Those would now be excluded, which is not what we want. Thus,
we explicitly enable them separately.

Commit by winterqt, message slightly reworded by wolfgangwalther.

[0]:
NixOS#355847 (comment)
@wolfgangwalther wolfgangwalther requested a review from winterqt May 22, 2025 19:41
@github-actions github-actions bot added 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions backport release-25.05 labels May 22, 2025
@github-actions github-actions 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. labels May 22, 2025
@wolfgangwalther
Copy link
Contributor Author

Eval / Summary — Package: added 0, removed 3726, changed 0, Rebuild: linux 0, darwin 0

Did a couple of random checks: Packages marked as "removed" here are indeed broken (on at least on eval system). I cross-checked an unfree package, which did not appear in the "removed" list.

So this seems to do exactly what we want: If somebody marks a broken package as "not broken anymore", then this will appear as an "added" package - and thus cause rebuilds.

@FliegendeWurst
Copy link
Member

We really can't expect packages that are marked as broken to evaluate, and especially not on unsupported platforms.

But isn't that what CI currently checks?

@wolfgangwalther
Copy link
Contributor Author

We really can't expect packages that are marked as broken to evaluate, and especially not on unsupported platforms.

But isn't that what CI currently checks?

I'm not exactly sure what you're asking, but let me expand a bit on the topic:

We have two steps: Collecting attrpaths, and then evaluating those attrpaths.

Previously, before some recent changes, we would collect attrpaths for x86_64-linux only and then run eval on the 4 systems for them. Because packages were marked broken on some systems, but not on others, we had to collect broken packages during the attrpaths collection step - they could evaluate fine on one platform.

Currently, before this PR, we collect attrpaths separately for each system - and then evaluate those for that system. At this stage, we have not adjusted the broken logic, yet - so we are collecting broken packages, but they will 100% fail evaluation during the eval step (which we then happily ignore).

With this new change, broken packages are not even collected in the attrpath step, thus leading to this added/removed logic.

Does this answer it?

@FliegendeWurst
Copy link
Member

Yes, then I think this change makes sense. (I was just wondering if there were some errors we would have caught previously, that could now be introduced.)

@wolfgangwalther
Copy link
Contributor Author

I was just wondering if there were some errors we would have caught previously, that could now be introduced.

Yes, there are some, theoretically: That's when you try to build a broken package with NIXPKGS_ALLOW_BROKEN=1. There could be an eval error for that case, which I think we caught before this PR, but don't do so anymore.

This is a trade-off, and I think doing it the way this PR does it is better: Having an after-eval-broken-eval failure for a package, won't cause trouble with hydra or anything. But skipping rebuilds with nixpkgs-review for packages which have their broken attribute removed is really annoying.

@wolfgangwalther
Copy link
Contributor Author

Hearing no objections, I'd say we'll try it this way. If this turns out to be wrong we can always adjust later.

@wolfgangwalther wolfgangwalther merged commit ea2ba8b into NixOS:master May 28, 2025
21 of 22 checks passed
@wolfgangwalther wolfgangwalther deleted the ci-no-eval-broken branch May 28, 2025 13:36
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented May 28, 2025

Successfully created backport PR for release-25.05:

@github-actions github-actions bot added the 8.has: port to stable This PR already has a backport to the stable release. label May 28, 2025
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 8.has: port to stable This PR already has a backport to the stable release. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants