-
-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
freshBootstrapTools: rename from stdenvBootstrapTools #183072
Conversation
Are you sure that the performance of |
No; in fact, I'm sure its performance is quite awful. I will fix that. |
Alright, 32ca89a351f9d86e525d130dd879b708dc081e40 should get us back to |
I'm afraid that there's no practical point in doing the checks, even if they were for free.
EDIT: ah, maybe this |
Won't ofborg CI also fail loudly for any PR that creates a collision? |
I'm really not surprised that nobody reads it; that's not a job for humans. Hydra used to push notifications to the maintainers of the package from which they were |
Yep, it does:
|
The Hydra notifications didn't work. Let me post a real example:
And no, it was not notifying maintainers. Well the above was extreme case, but normally we have evals after a hundred commit or so, so this approach just can't work with the current popularity of NixPkgs. Note that most of the throw messages in that list are completely legitimate and not errors, so there's even no point in notifying. (marked as broken or otherwise not supported on a given platform) |
TL;DR: someone would have to implement a new notification system that behaves reasonably in current NixPkgs. |
Oh, my bad, (mostly) it really was sent just to Since then I've been watching https://hydra.nixos.org/dashboard/vcunat@gmail.com instead, though it's less comfortable. I'm not sure if there's some better way. |
I've never been maintainer of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good to me. Seems like it doesn't revert the cross-build improvements.
This does not implement the loud warning when name collisions are introduced as was discussed in the previous PR, right?
Is there a way to test whether this fixes Hydra's bootstrap-tools job on a local machine (without Hydra)?
It does implement the loud warning. Actually it is more than a warning: it will Edit: apparently github doesn't provide any way to link to a specific line in an unmerged PR? Anyways search the "files changed" for
I added instructions explaining how to do that in #181157 |
Force-push to 6d025a6 rebases to latest staging and squashes the history to be more readable. The overall diff created by the PR is unchanged. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
@amjoseph-nixpkgs, I'm testing this and unfortunately it turns out this is based on a commit after #185297 and that broke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, unionOfDisjoint
is where the loud warning comes from?
Does this mean it'll give a single warning for the first job in the intersection that Hydra tries to evaluate, or does Hydra not stop anyway?
Yes.
OfBorg will block the merge by failing CI. But yes, if for some reason we stop using OfBorg, the second line of defense is Hydra, which will fail any build in which evaluation touches an attr in the intersection (which is supposed to be empty) of the two attribute sets. I'm investigating your previous comment. |
Commit 5643714 introduced a tiny bug, neglecting to pass the `pkgs` parameter to `release.nix`. This bug went unnoticed because commit e663518 had introduced a much larger bug: an attribute collision resulted in `stdenvBootstrapTools` being shadowed, and therefore never evaluated. As a result, the missing `pkgs` parameter did not lead to an error. This commit passes the missing parameter so that fixing the larger/earlier bug will not cause an eval failure.
`stdenvBootstrapTools` was defined in both `nixpkgs` and `releases` jobsets. This makes hydra view a bit confusing: $ git grep -F 'stdenvBootstrapTools =' | cat pkgs/top-level/all-packages.nix: stdenvBootstrapTools = if stdenv.hostPlatform.isDarwin then pkgs/top-level/release.nix: stdenvBootstrapTools = with lib; The change renames jobset to be distinct. At least it improves grep experience.
…local jobs This change exposes symbol override that accidentally caused job loss on hydra: $ nix repl ./release.nix error: jobs: Unexpected attribute collision between 'jobs' and 'pkgs': stdenvBootstrapTools Added assert makes sure attribute clashes would not be re-introduced.
Okay, rebased onto 2a452a4. Is there some way to rebase a github PR without doing a force-push? Force-pushes are so error-prone. I've started draftifying my PRs before every force-push so I don't accidentally trigger mass notifications... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I've verified that both the Hydra job and the freshBootstrapTools
attribute do what they say on the tin. Looking good!
One question, Hydra will be fine with the separate attributes failing IIUC. It'll just show a bunch of failed jobs, right? But how does OfBorg deal with this. Does it only display the first attribute that fails to evaluate?
I deliberately triggered the OfBorg failure there to make sure it worked and to capture an example of the error output. |
And what if there's multiple colliding attributes. What I'm getting at is that I want to avoid this becoming a tennis match, where you fix a collision, re-run, fix the next collision, etc. It would be great if the failure could list all collisions at once. Can't we merge all the failing attributes into one attrset that has all of them and then throw the full list? |
Please read the discussion earlier in this PR; what you suggest is exactly what the original commit 90ab9cb2ef0fc434817d47fd3725e34951476b38 did. It has overhead and laziness problems, as discussed earlier in this PR. |
This brings two benefits: 1. The complete list of collisions is printed in the whenever any colliding attribute is accessed. 2. The sets are intersected using a C++ primitive, which runs in O(n) time (intersecting pre-sorted lists) with small constants rather than interpreted Nix code. Thanks to @toonn for prompting this improvement.
@toonn, sorry, my comment was not only abrupt but also wrong. I apologize on both counts. There is a way to print all collisions while still being maximally lazy and incurring only constant overhead. And it is, in fact, very slightly more efficient than 99da193 due to the way the Nix interpreter works (the complete set of names in an attrset is evaluated strictly whenever any of them is accessed for the first time). Please see my latest push 037cf2f. The trick is to use Here's an example of what happens if you revert bf4312d and add an attribute named
|
Really cool, I'll rebuild both the Hydra job and the attribute and then cause some collisions and then this is ready to be merged IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, tested and this seems to solve the problem. Let's get Hydra building bootstrap-tools again : )
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Description of changes
This is a handoff of #182058
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes