-
Notifications
You must be signed in to change notification settings - Fork 4k
Make sure Management UI JavaScript files are forced to reload after an upgrade #12683
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
Conversation
|
Sweet! It kind of sucks that we still do not have the new alpha builds infra for PRs but as soon as we sanity check it and merge, we will have a complete set of packages to try. |
a006cc7 to
d46e832
Compare
michaelklishin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a widely used approach and given our "minimalistic" (read: simplistic) UI code, this seems like the best approach.
Works as expected, including the full reload when the API reports a different version.
|
Not sure why Selenium suites begin to flake again but given the scope of the change, I assume that if some of them pass, then all of them should and these are, indeed, flakes. |
To avoid using a chached version from an older RabbitMQ version.
1. If the Management UI lost connection and established it again, there's a good chance it's now connected to a diffrent RabbitMQ node, potentially running a different version. 2. If the overview endpoints returns a different version, fully reload the page. This only works on the home page, but that's better than nothing
Users often report JavaScript or page display errors after an upgrade (blank page, only header and footer, etc). This change adds a query parameter for JS/CSS files, so that they change from version to version and therefore are the browser should not use the outdated cache entries.
12d8f7c to
91a680e
Compare
|
The OAuth2 issue looks legitimate - seems to be a race condition based on whether |
18c684c to
e0f3f76
Compare
|
Closing in favour of #12749 |
What
Users should no longer run into issues with the Management UI when upgrading RabbitMQ. There are numerous reports
of JavaScript errors, blank pages, or just header+footer pages (without the main content).
How?
index.htmlrefers to all our JS and CSS files with query stringv=$VERSIONand therefore the URL changes from version to versionmanagement_versionreturned by the/api/overviewendpoint and compares it with its own version (defined in index.html). If there's a difference - a full page reload is performed (this is clearly an upgrade)Breaking change: we no longer support MSIE 8 :) (
evil.csswas a piece of history: https://github.com/rabbitmq/rabbitmq-server/commits/v4.0.x/deps/rabbitmq_management/priv/www/css/evil.css)