-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Use GHA eval to assign rebuild labels #359704
Conversation
Btw. Actionlint should help you to find syntax errors:
|
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.
Would be nice to get a comment from GitHub actions on PRs:
These packages will be rebuilt:
- hello
- world
- nixos-install-tools
But I am fine with this being worked on a separate PR if this is a scope creep.
And if that is deemed to be too much clutter in the PR, the same output could also be added to the action log (hidden behind the "details" link). |
01f6553
to
48e9bcb
Compare
It works now! tweag#102 (comment) |
48e9bcb
to
8e333e0
Compare
We have a first lucky customer: #359345 (comment) :D |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Successfully created backport PR for |
This is an idea I had a few days ago: Why don't we just simply make the maintainers the codeowners of their package's by-name directory? That would ping them immediately via nix-owners without even needing to eval. The by-name structure allows for such simplifications. We could realise that via an automated script which, given a package name, ensures that the set of code owners is the set of maintainers of the given package. We should have a CI check to assert that too. For packages not in by-name yet, we could either keep using ofBorg (but disable it for by-name) and/or set code owners manually without CI check (or semi-automatically using meta.location + human check). That would also drastically reduce the load on ofBorg too as it could short-circuit on PRs that only touch by-name. That could perhaps be enough to make ofBorg acceptably fast again. A much simpler alternative to keeping the codeowners/maintainers record in multiple places and keeping them in sync that just came to me would be to have each package declare its maintainers in a separate file that could be interpreted (or eval'd?) independently of the package by nix-owners. We'd then enable/disable ofBorg simply based on whether the package is in by-name and this maintainers declaration file exists. |
I think for now we should also mirror what ofborg does, which turns out to be fairly cheap and easy with all the existing work: tweag@be4026a (this doesn't quite work yet, but that's the gist of it).
Not a fan of duplicating the info in
As hinted at, it turns out that figuring out maintainers for changed attributes is very cheap, it only depends on the eval to finish. I think we can live with the 5 minute delay on that.
I like that idea, I've wanted a package-independent |
What I'm saying is that we don't even need to depend on eval to finish. We can simply look at the files changed and use only that fact to determine who should be pinged; like code-owners. If someone touches the files of a package I maintain, I'd want to be pinged regardless of whether it changes eval anyways. On a second thought though, while it'd be nice, we wouldn't actually need package-eval-independent |
Ohh good point, didn't think of that. And yeah that should just work! :D |
Something else that I'm just realising: This labeling workflow only adds labels right now, it never removes them. So if the number of rebuilds changes, it will be very confusing.. |
Minor problem with this workflow, causing it to fail on some PRs, simple fix though: #360274 |
|
ofborg used to count new packages as rebuilds too: (taken from a run in #356529)
|
Perhaps we can make use of the Nix owners bot. |
I just noticed this difference, too. But I think the new way is actually better - to make a decision whether to go into master or staging new packages shouldn't really count, right? |
It does matter, all packages have to be built. |
#361206 fixes this |
ofborg used to assign "rebuild: 1" labels too, instead of just "1-10". I had a look and it seems somewhat tricky to add onto the existing script. |
It would be just this, right? + elif .value == 1 then
+ "1"
elif .value <= 10 then
- "1-10"
+ "2-10" I don't think we need multiple labels, like ofborg does, in this case. |
Hmm... that would work, yes. It would make it more difficult to filter for "small" PRs though. |
This implements labeling based on the number of changed paths, as follow-up work to #356023.
Ping @Mic92 @Aleksanaa @azuwis @TheGiraffe3 @JohnRTitor @emilazy
Things done
This work is funded by Tweag and Antithesis ✨
Add a 👍 reaction to pull requests you find important.