Repository navigation
Add detailed availability stats - track # of failed HTTP requests and display % - #6
Open
rosemarie-o wants to merge 4 commits into
Open
rosemarie-o wants to merge 4 commits into
rosemarie-o wants to merge 4 commits into
Conversation
The bot sees the end of a request only: one that worked after two retries looks like one that worked at once. How often requests to a service fail on their way tells how it is doing even while the bot gets through. Add Options.OnTry, called after each try of a request with whether it failed: on a network error, a timeout or a transient status, which are 5xx, 429 and a rate-limited 403. Other statuses, 404 included, are answers to the bot's own mistakes and count as working. Tries ended by the context or by bot protection say nothing about the service and are not reported. Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
The availability page shows when Patchwork was unavailable to the bot, but not how often its requests failed and were retried before one worked, which is how Patchwork felt to use most of the time. Count the tries of the bot's requests to Patchwork, and those that failed, by hour in the availability state, so that the pages get them with the periods. Hours of the days that ended more than a week ago are merged into a count for the UTC day, and counts are kept for 31 days, so the state stays small. This bumps the state schema to 15; the counts are optional, and state saved before loads without them. Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
The share of time a service was available in a window was taken over the whole window, so a bot that started recording a day ago showed a month of availability it never saw. Take it over the part of the window since the bot started recording availability, and show none for a window without any. Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
Next to the time Patchwork was unavailable in each window, show the share of the bot's requests to it that worked, retries included, from the counts by hour and by day that overlap the window. It is rounded down to whole percent, so that it shows 100% only when none failed, and goes from yellow to red the more failed. The title tells how many tries it is out of. Fit the columns of the summary to their contents, with the minutes and the percentages aligned, so that the timeline takes the space left. Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
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 is currently live on https://ci.ovn.org/#availability
Track the number of total and failed HTTP requests so we can display how heavily requests are failing on the static page.
The reason for doing this is that the current availability stats only track a service as down when every single request the bot makes fails, across many retries. This makes it so those statistics are inaccurate to the user experience. Obviously those stats are still useful though, because it shows when the bot was actually able to get through and make any successful request. But it's also nice to display just how badly requests are failing over time. So this PR adds that, but only for Patchwork, because it's the service with the most downtime.
Fixes #5