-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Ξ² β ππ β’ #356
Merged
Merged
Ξ² β ππ β’ #356
Conversation
This file contains 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
Profile forum URLs as links
Mod stats chart fixes
Open mod tabs from URL
Exclude pending authors from API
Minor UI tweaks
* We also register an error handler for `HTTPException` now. This one is invoked whenever we do something like `abort(403)`. The other one is invoked when there is a real exception raised. It does not rollback the database like the one for real exceptions, and it does not log to syslog. It has a separate template with new image. * We register all those error handlers all the time, independent of `app.debug`. `app.debug` now only influences whether we show the 500 error template to the user, or launche the flask debugger. Whether we send an email only depends on whether the needed keys are set in the config, so it can be tested in dev envs too. * Status code is now smaller than the message in the error templates. * If a request accepts JSON and not HTML (or `*/*`), we return a JSONified exception, independent of request route (and exception type). For this to work, we send an explicit `Accept: application/json` header in XHR requests. * Swap out 401s with 403s in many places.
Rework error handling
Several CKAN integration fixes
This reduces the size of all HTML pages by around 33KB. Which is aound 1/3 to 2/3 of their size. Being in its own static file, this will be offloaded by the webserver, and the reverse proxy and clients will be able to cache it. This should reduce load on Flask/gunicorn by quite a lot.
Filter junk out of admin pages and make site 10x faster
Cache results of common database queries
Better messaging for descriptionless modpacks
β¦ries Revert caching of database queries
prepare.sh now saves the package versions at the state of deployment of a new commit to alpha/beta/production into a .frozen-requirements.txt file. As long as the HEAD commit doesn't change, every restart will install the exact same package versions, to prevent silent, unwanted, breaking upgrades to some degree. Also pin Flask to <2 and Jinja2 <3 until we tested it. Prevent SqlAlchemy from upgrading to 2.0 when it is released, since we use several deprecated functions that will be removed. Remove some older pins that got added as a result of upstream bugs that should be resolved now. Change Werkzeug profiler import from `werkzeug.contrib.profiler` to `werkzeug.middleware.profiler`, it has been moved in 1.0.
Improve mod box appearance
Freeze dependencies on version they have at deployment
Ξ± β Ξ² βΌ
HebaruSan
added
Type: Bug
Type: Improvement
Area: Backend
Related to the Python code that runs inside gunicorn
Priority: High
Type: Feature
Status: Ready
Area: Frontend
Related to HTML, JS, CSS, or other browser things
labels
May 22, 2021
DasSkelett
approved these changes
May 31, 2021
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.
Let's go! Really looking forward to some of these changes.
Merged
Merged
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Backend
Related to the Python code that runs inside gunicorn
Area: Frontend
Related to HTML, JS, CSS, or other browser things
Priority: High
Status: Ready
Type: Bug
Type: Feature
Type: Improvement
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.
Merge beta to master (alchemical symbol for gold, factory). Successor to: #301 #324
Includes: #340 #355
No particular hurry this time, but there's a lot here that will be very nice to have (speed-ups, profiling, CKAN integration fixes, better mod thumbnails).
User features:
Admin features:
Bug fixes:
I'm hoping we can do a production upgrade soon so #337 and the performance improvements can go live.
Upgrade considerations
Before upgrading:
config.ini
, setrequests-per-profile
to control how often we profile a request. I do not know the correct value for this because I do not know how much traffic the production server experiences. 1000, maybe?config.ini
, setprofile-dir
to the path where profiling runs should be saved, for example on alpha and beta we are using/storage/sd-alpha/__profiling
and/storage/sd-beta/__profiling
/kerbal-space-program/browse/top
for monitoring and performance comparison every 3 minutes.