introduce global anomalies, build queue length, + manual via CLI#3274
introduce global anomalies, build queue length, + manual via CLI#3274syphar wants to merge 8 commits into
Conversation
|
I think you're trying to fix two different problems here:
The first one needs to be there as long as the issue(s) are there. The second one being a notice, it should be discard-able by the user and attract attention a lot more. So your PR fits well for 1., but doesn't for 2. imo. 2. should most likely be a static element floating over the content. What do you think? |
|
I admit I didn't think much further than just making the old feature not hardcoded, so we can start showing something somewhere. I don't think I can build either of the other approaches in the next week, but hopefully some time after that, depending on many other factors. |
Right now I don't have an opinion on that (too tired / sick), how does crates.io do it? Generally what you propose feels like it makes sense. |
|
general thought: with my dayjob problems right now, I don't think I can spend time on any of the proposed other things in the next week or two (except when I'm lucky, not sure). so I'm asking myself if we should use this first to make people aware of the new default-target change first? |
|
I can take over this PR and implement the missing parts if you want? |
thanks for the offer! My hunch is that you're right generally, but I want to think it through first when I'm a little better. |
|
( will set the compiled-in warning in a separate PR for the current change only) |
|
Sounds good to me. :) |
This comment has been minimized.
This comment has been minimized.
e2b4f07 to
0bc9736
Compare
|
@GuillaumeGomez I had another idea about multiple alerts, the separate page looked so empty with the information that was there.. It would collapse (so no dropdown) when there is only one alert. Also now there is an example how the webserver now collects metrics from the builder-lib. ( not sure if I was too much into it and overengineered 😅 ) |
|
Well, I was kinda hoping to provide more information for each anomaly on the page. 😆 Like since how long it's happening, what's the impact to users, etc. |
This comment has been minimized.
This comment has been minimized.
Want to add a commit how you would imagine it? |
|
I can try. :) |
This comment has been minimized.
This comment has been minimized.
|
I just rebased to fix the conflicts, will leave it alone now @GuillaumeGomez |
|
valid points, good idea, we can do that. I assume that we merge the the abnormality only has the explanation & start-time on top? |
|
|
|
will finish up this PR and ping you for the final review. |
This comment has been minimized.
This comment has been minimized.
I think I would want alerts ( and anomalies) always visible, and not behind a click. I'll (try to) update this PR, so the anomalies are loaded in a separate small partial, and then injected into the topbar, similar to how we load the version-list in the main dropdown. |
|
this change might also make this PR much less complex, since I don't have to inject the anomalies into all pages any more |
Hmmmmm. The whole caching thing is really getting in the way here. ^^' |
perhaps. But like this, with just some well designed pages, we can have super fast server-side generated pages :) |
23bb168 to
a99154e
Compare
| {# The global alert, if there is one #} | ||
| {% include "header/global_alert.html" -%} | ||
| {# The current abnormalities, if there are any #} | ||
| <div id="abnormalities" tabindex="-1" data-url="/-/partial/abnormalities/"></div> |
There was a problem hiding this comment.
this is how I would imagine this,
not knowing what the best way is to have this placeholder here.
There was a problem hiding this comment.
Just put a <a href="/-status">status</a> and that's the element where we'll add the
| } | ||
| }); | ||
|
|
||
| (async function loadAbnormalities() { |
There was a problem hiding this comment.
this is just AI generated code, to show you what I meant with the partial.
I assume we should do it differently? not sure what's the best way.
There was a problem hiding this comment.
I would always link to the docs.rs status page and only query a /-/is_there_anomalies/ URL on docs.rs and add a
There was a problem hiding this comment.
I updated the partial to show less.
( I still don't know if that JS is ok or not, i would need help for that :) )
There was a problem hiding this comment.
I still don't understand what you're trying to do here. It seems like you're loading a whole HTML file and not just add a
|
@GuillaumeGomez I updated the implementation to what I think we should do. The template & JS change just as a proof of concept, need your help to finish this up. I assume the alerts could also use a similar concept? |
|
Not sure to agree with your approach. Why do you want them to be available in the topbar directly? It's one click in any case, whether we list abnormalities in the topbar or if we have a link to the docs.rs status page. I can add a JS part to add a |
I just realized this is waiting for my answer 😅 I think I want something in the topbar that shows that something is wrong. This is still the html partial, just returning the icon I presume. |
|
Also: no more global alert/message? |
What do you think? |


( updated description).
introduce "abnormality" to warn users about currently active issues.
Sources are (first version):
This is not for notifications, but only this kind of system status information. The topbar icon is a partial that is cached in the CDN. Notifications / alerts will be cached in the same way (partial + cdn) but shown via popup & discardable.
We cache the value for 10 minutes, so we won't have too many added database queries.
Topbar partial:

We also have the added detail status page with more explanation.
the queue warning is additionally shown on the queue page

The audit error is fixed in #3295