-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Cache failed builds #224
Comments
The lix fork creates build steps for every derivation, I saw. I think this might be ok for packages but can get really slow for NixOS configuration where we have to build a lot of small derivations at least it was in hercules-ci. But I might be wrong. |
Oh yeah that is a horrible idea, I was thinkimg about caching the failures of toplevel derivations. |
@Mic92 as far as I can tell, their failed build caching doesn't work across builds, https://git.lix.systems/lix-project/buildbot-nix/src/branch/main/buildbot_nix/__init__.py#L180 I don't see a persistent global failed build cache anywhere, so we cannot pull anything afaict |
If this were the case, any build even remotely dependent on nixpkgs would create thousands of build steps, which would bog down any buildbot instance instantly. Any evaluation done by our buildbot instance also shows this isn't how it works. We've just replaced the part of the scheduler that registers all builds in one go with one that only schedules a build once the builds it depends on succeed. |
I cannot see the website unfortunately. There seems to be an issue with the authentication:
|
@puckipedia I must be missing something, because your code does trigger a scheduler per each derivation, as can be seen in the logs by the flood of |
that's not "every derivation"; otherwise I'd say that this repo's buildbot-nix in fact also builds "every derivation". Compare: I'd say that the qemu dependency itself would fill like twenty pages if every derivation was scheduled independently :) (also, -29 pending builds?) |
And mind you, the "Scheduling" logic there is just replicating what the Buildbot |
Ah okay, I can't please excuse my complete and utter blindness (turns out reading untyoed code is very hard, uhg I hate python with a passion), I got my arrays mixed up :( . Your system does look nice, I do have to admit that. I'll see how much of it will be ergonomic to pull in, since the codebases diverged a fair amount. (I would have written it slightly differently, but I also would have rewritten buildbot in Haskell if I was left to do whatever I want, so may be a good I didn't write it 🤣 might be more readable for literally everyone but me this way) |
That is very reasonable, I'll need to read more, I am slightly struggling to make sense of the code. I'll figure it out tho, thanks fir the help, I appreciate it. |
Closed by #255 |
@puckipedia we were recently converted to async/await syntax and found a potential bug in your original code because of better type checks. On this line: https://git.lix.systems/lix-project/buildbot-nix/src/commit/48828cb33fbd99ae2e442c29a888217cd892b22e/buildbot_nix/__init__.py#L292 See also the async method here: https://git.lix.systems/lix-project/buildbot-nix/src/commit/48828cb33fbd99ae2e442c29a888217cd892b22e/buildbot_nix/__init__.py#L210 |
note that defer and async have slightly different behaviours in this case; from what i can tell, it's safe to not drive the defer and let it execute in the background; that's what is happening here |
Currently if a build fails buildbot-nix will attempt to rebuild it every time it pops up in an evaluation, which is wasteful, unless the failure was temporary. The lix fork of
buildbot-nix
already has this, so we can just pull those changes into upstream (this repository).The text was updated successfully, but these errors were encountered: