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

api: add preliminary builder statistics #969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

efahl
Copy link
Contributor

@efahl efahl commented Sep 10, 2024

Give clients the ability to check how busy the server is, so they can give diagnostics and/or refuse to queue up a job if there are too many build requests in the queue.

@aparcar , what do you think of this one? I want to be able to check if there are too many jobs already in process and then say "sorry, you'll be waiting three hours for this build, not gonna do it..."

Give clients the ability to check how busy the server is, so they
can give diagnostics and/or refuse to queue up a job if there are
too many build requests in the queue.

Signed-off-by: Eric Fahlgren <[email protected]>
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.69%. Comparing base (5e65dec) to head (22064b9).
Report is 95 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #969      +/-   ##
==========================================
+ Coverage   80.75%   87.69%   +6.93%     
==========================================
  Files          15       14       -1     
  Lines         977     1016      +39     
==========================================
+ Hits          789      891     +102     
+ Misses        188      125      -63     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aparcar
Copy link
Member

aparcar commented Sep 10, 2024

Issue here was Podman to "die" on the server and no longer do anything meaningful, i.e. not starting new containers which actually work on jobs. Normally I've never seen queues longer than 10. This fix (even though best intentions) don't fix the underlying issue...

@efahl
Copy link
Contributor Author

efahl commented Sep 10, 2024

Right, my logic is:

  1. Client (owut, FS) requests queue length before submitting build.
  2. If not 200, then something is wrong and supply some diagnostics: "ASU server down blah blah".
  3. If 200, then
  4. If queue_length < say 10, then just go ahead.
  5. If queue_length too big (it was 104 this morning), then tell user "it will be 3*queue_length minutes before your job starts" and abort submission of job.

My hope is to warn users that something is wrong, so they don't just start posting new issues when it's obvious that there is something going on... It doesn't fix root causes, but it lets users know they shouldn't expect things to be working.

@efahl
Copy link
Contributor Author

efahl commented Sep 10, 2024

Oh, and also would be nice for FS/owut/LuCI to say "The server is currently building N jobs..." Instantaneous status when you want to request a build.

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

Successfully merging this pull request may close these issues.

2 participants