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

New forum URLs, drop broken modules, delete OAuth #503

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

HebaruSan
Copy link
Contributor

Problems

On 2023-12-07, Rip Van SpaceDock awoke to discover the world changed around him. Formerly working and supported Python modules no longer loaded:

  • Flask-Markdown threw an exception at loading because flask no longer exports Markup
  • flask.json no longer exports JSONEncoder
  • flask_oauthlib.client had a similar problem that I didn't capture, and all of the OAuth stuff wasn't being used anyway.

This was hacked around by live-editing lib/python3.10/site-packages/flaskext/markdown.py in production 🤮.
From the description, it sounds likely that this broke some part of the site that we don't know about yet.

Motivation

The KSP forum's user profile link format changed (/index.php? was dropped), so recently posted URLs aren't rendered as name-and-link as they are supposed to be.

Changes

  • Now the Dockerfile builds for Python 3.10 instead of 3.8, because this is what's current in Ubuntu LTS
  • Now we make our own markdown filter from the standard module instead of using Flask-Markdown. As a bonus, the underlying converter is now shared with common.render_markdown (which previously didn't support emojis), so the format will now be reliably consistent.
  • Now all the unused OAuth stuff is deleted
  • Now we use json.JSONEncoder instead of flask.json.JSONEncoder
  • The docker compose file is updated to no longer mount /dev/log because this is OS-specific and was breaking on Windows
  • The forum profile parser is updated to support the new format in addition to the old

I'll probably just merge this to keep things moving along...

@HebaruSan HebaruSan added Type: Improvement Area: Backend Related to the Python code that runs inside gunicorn Priority: Blocking Status: Ready Scope: Medium Moderately complex changes requiring non-trivial time and effort to develop and review labels Dec 8, 2023
@HebaruSan HebaruSan requested a review from V1TA5 December 8, 2023 18:40
@HebaruSan HebaruSan force-pushed the fix/update-deps branch 2 times, most recently from cb974e8 to 4ee50df Compare December 8, 2023 19:04
@HebaruSan HebaruSan merged commit 161a74e into KSP-SpaceDock:alpha Dec 8, 2023
2 checks passed
@HebaruSan HebaruSan deleted the fix/update-deps branch December 8, 2023 19:09
@HebaruSan HebaruSan mentioned this pull request Dec 8, 2023
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 Priority: Blocking Scope: Medium Moderately complex changes requiring non-trivial time and effort to develop and review Status: Ready Type: Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant