NixOS / ofborg

@ofborg tooling automation https://monitoring.ofborg.org/dashboard/db/ofborg

Home Page:https://ofborg.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide a command to build packages changed or added in a PR (not transitive)

worldofpeace opened this issue · comments

Typing out ofborg build $giant_list_of_attributes is tiresome.
I've made on ad-hoc script to do this (mostly for python packages where you have to test with many interpreters) but having a command for this in ofborg would be nice?

So basically, triggering this command would build all the attributes that are added in the PR.
And I'd also like it to build all attributes where their expression is changed, so I can just do this quickly for update PRs etc. And don't have to spend any time correctly typing out correct attribute names for the build command.

how about something like @grahamcofborg allbuilds that would build all the rebuilds?

Something like this, but mostly I want to test just the packages added in a PR or changed.
So it's different from building transitive dependencies, which could be useful also.

@FRidh Updated the issue to be something like that.

I'd like a subcommand to build.

Maybe:

@ofborg build all

Can you give some examples of PRs where this is would be useful? Also, can you provide your script?

Ofborg already builds all attributes it can identify are changed directly by a given PR, any derivations not built automatically are because it is tricky to identify them as "impacted by this PR". The next step of "all minus non-transitive" is difficult.

Can you give some examples of PRs where this is would be useful?
Ofborg already builds all attributes it can identify are changed directly by a given PR, any derivations not built automatically are because it is tricky to identify them as "impacted by this PR".

I believe it's automatic if someone has ofborg access. So I end up having to go through the PR, and read each file that got touched and what attribute it maps to, or if the PR added a lot of packages I parse each commit and submit build commands. For python package PRs there's multiple interpreters so I still have to build them each manually. So think, adds 3 packages times every interpreter 😦
If ofborg already can figure what to build automatically if someone has privileges, perhaps this command can just map to what that does.

Sometimes this is too tiresome and I have to use nix-review. Which isn't exactly what I want because I don't want reverse-dependencies lots of the times.

Here's an example where this wouldn't be useful NixOS/nixpkgs#75729.
That PR should be qa on each attr that uses makeDesktopItem. Not build all directly.

This would be useful in any package update PR, package additions PR. I don't have to figure out what to build manually.

Here's a direct example where I'd want to use this right now NixOS/nixpkgs#75620.
This PR just adds attributes, it's a waste of time figure out each if we already know.

Every PR is now built automatically on x86_64-linux and aarch64-linux :). It looks like #75620 didn't build anything because none of the commits match the contributing guidelines around the packagename: message format, which is a key part of ofborg detecting what packages were changed.

If ofborg built automatically on darwin as well, would that satisfy this ticket?

I wonder also what about making a label that says "commits on this PR don't follow the policy" -- though this could easily be too heavily handed.