Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This essentially brings the possibility of the cool Debian graphs (reproducibility over time) and categorized stats (
rebuilderd_stats.py) natively into rebuilderd for all distros.2 new REST endpoints
A new rebuilderd-stats.conf file
Since each distro can have it's own specific error categorizations, I've split the backends per distro and you can specify different categories for each. There is also one
.allbackend which applies to all distros.The categorization logic is essentially "stolen" directly from
rebuilderd_stats.pyas well as initial categorizations for Debian, thus the direct attribution there.I've also done some quick analysis of my Arch rebuilder logs and added some categories but there are probably much more. The hope is that rebuilders could contribute these as they encounter them on their instances. I also have some categories from my FreeBSD work but that'd come a bit later.
A new systemd timer
Added a sample timer that triggers stats snapshot once a day via rebuildctl (similar to how -sync is done). Maybe a sccheduler inside daemon code could be done but I think this is good enough.
Simple contrib with html/js sample graphs
This was mostly added just so I could quickly verify the viability of the GET API and it's a nice direct visual representation of the feature but ultimately I can remove this from the PR. CORS was also added just so I could test on localhost, can also be removed, but doesn't hurt to have it (actually, it should probably be expanded in the future with full config options).
For my Debian/sid/amd64 it looks something like this with 3 snapshots:

State of the code
I'd say "it seems to be working" but not sure yet on correctness, since I am still not completely familiar with the db model I need to do a few more passes, especially for
daemon/src/api/v1/stats.rs. The rest should be mostly fine though.