Skip to content
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

Build a lot more stuff #30

Open
2 of 8 tasks
grahamc opened this issue Dec 25, 2017 · 19 comments
Open
2 of 8 tasks

Build a lot more stuff #30

grahamc opened this issue Dec 25, 2017 · 19 comments

Comments

@grahamc
Copy link
Member

grahamc commented Dec 25, 2017

We've got a good bit of build capacity and it goes largely unused:

builds

Worse, x86_64-linux has effectively unbounded capacity due to a generous spot instance backing. Darwin is the least strong, and aarch64-linux is in the middle.

For these reasons, I'd like to build way more PRs and use this capacity to make merging PRs easier and safe.

Phase One: Simple Expansion

  • Setup sandboxing properly on all the macs
  • Backport the sandboxing code from master to 17.09
  • Expand caller access to everyone with merge writes on nixos/nixpkgs

Phase Two: Easier Build Selection

  • Implement build "sampling" where ofborg automatically selects a handful of attrs to build based on what has changed in the PR.
  • Implement test sampling where ofborg does the same thing, but selects a handful of changed tests.

Phase Three: Limited Automatic Building

  • Sucker Convince someone to buy me / provide me with a bunch of macs to enroll for capacity
  • Automatically sample PRs from anyone trusted to call ofborg

Phase Four: Automatic Building

  • Automatically sample all PRs
@zimbatm
Copy link
Member

zimbatm commented Dec 25, 2017

I asked @macstadium if they could provide some build capacity, no answer so far

@7c6f434c
Copy link
Member

So, how many macOS builders there are now? Maybe (temporarily) allow to separately ask borg to build just i686-linux and x86_64-linux, to emphasize abundance of build capacity on this platform?

@grahamc
Copy link
Member Author

grahamc commented Jan 27, 2018

Right now we have three mac builders. I think that is a good idea, @7c6f434c, and solves the issue around darwin not having adequate sandboxing for this use case. I am planning on the following:

Users bucketed by the following:

  • trusted: explicitly trusted by the ofborg configuration
  • known: has merge rights to nixpkgs
  • unknown: everyone else
  1. if you are a trusted user, the build/test job is sent to all architectures.
  2. if you are a known user, the build/test job is only sent to architectures which has adequate sandboxing (aarch64-linux, x86_64-linux).
  3. if you are unknown, the command is ignored (as it is now)

With the addition of this change, all known members will be allowed to trigger the eval command.

@7c6f434c
Copy link
Member

Erm. Doesn't i686-linux have adequate sandboxing? Aren't all its builders actually x86_64-linux?

Also, given the capacity skew, I think a trusted user might still want to opt out from sending to darwin?

@grahamc
Copy link
Member Author

grahamc commented Jan 27, 2018

Let's wait and see if we actually have capacity issues on mac before scaling it back for trusted users. Ofborg doesn't run anything on i686.

@LnL7
Copy link
Member

LnL7 commented Jan 27, 2018

I agree, we can monitor the queue and revisit if necessary. At the moment we actually have the same number of builders for every platform.

@7c6f434c
Copy link
Member

7c6f434c commented Jan 27, 2018 via email

@grahamc
Copy link
Member Author

grahamc commented Feb 1, 2018

A simplified way to sample PRs. During the evaluation step:

  • parse commit messages for the subject package (ie: "postfix: foo bar baz" -> postfix)
  • if the package is a buildable attribute according to the evaluation, schedule a build job for it

If the user is trusted, send it to all platforms. If the user is known, send it to just platforms with good sandboxing. If the user is unknown, don't schedule any jobs.

This comes with the benefit of encouraging precisely following of the commit format. For example, knowing your package will auto-build may be the difference between:

grv: init at 0.1.0

and:

gitAndTools.grv: init at 0.1.0

@andir
Copy link
Member

andir commented Feb 1, 2018

You might not always want to build it or at least have a blacklist? I think building chromium would waste a lot of cpu cycles with probably low benefit?

@7c6f434c
Copy link
Member

7c6f434c commented Feb 1, 2018 via email

@7c6f434c
Copy link
Member

7c6f434c commented Feb 1, 2018 via email

@7c6f434c
Copy link
Member

By the way, judging from the acoustic evidence, there is significant progress on the original goal of builder utilisation. At least for some combinations of day-of-the-week and hour-of-the-day.

@wmertens
Copy link

How about building all dependencies for a given PR?

@7c6f434c
Copy link
Member

@wmertens I think ofBorg currently doesn't allow to build just Chromium alone (timeout will happen sooner). What you say is way above capacity right now.

@wmertens
Copy link

wmertens commented Mar 23, 2018 via email

@7c6f434c
Copy link
Member

7c6f434c commented Mar 23, 2018 via email

@wmertens
Copy link

wmertens commented Mar 23, 2018 via email

@7c6f434c
Copy link
Member

It might even work per se, but Nixpkgs seems to depend on some Apple frameworks…

Anyway, we don't even have enough capacity for crazy megaprojects on the Linux side.

@7c6f434c
Copy link
Member

I think some checkboxes here are either obsolete or done…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants