-
Notifications
You must be signed in to change notification settings - Fork 24
fix(lifecycle): Next-2.0.1 hotfix release #58
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
648fab1
fix(db): remove server_default on TEXT column for MySQL compat
NickCharlie 4eadf98
fix(db): enable auto-migration and skip TEXT DEFAULT on MySQL
NickCharlie cacd700
fix(db): move lazy imports to module level in all facades
NickCharlie 988626e
fix(lifecycle): add timeouts to all shutdown steps to prevent hang
NickCharlie 692fc5a
fix(lifecycle): cancel untracked background tasks on shutdown
NickCharlie 9556fab
fix(db): set persona_content default to empty string for MySQL
NickCharlie 6715feb
chore(release): bump version to Next-2.0.1 and update changelog
NickCharlie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
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.
suggestion (bug_risk): Type comparison for TEXT/BLOB defaults may miss dialect-specific variants, causing unexpected defaults to be emitted.
is_text_typedepends oncol_type.upper()matching one of a few exact strings. Dialects/configs may produce variants likeTINYTEXT,LONGBLOB, orTEXT CHARACTER SET utf8mb4, which would bypass this check and allow invalid defaults again. To harden this, consider prefix/suffix checks (e.g.startswith("TEXT")/endswith("BLOB")) or, preferably, use SQLAlchemy’s type classes instead of string comparisons.Suggested implementation:
To follow best practices and avoid importing inside the function/method body, you should:
from sqlalchemy import Text, LargeBinaryandfrom sqlalchemy.dialects.mysql import JSON as MySQLJSONimports to the top ofcore/database/engine.py, alongside the other imports.is_text_blob_or_json_type = isinstance(...)check.If
core/database/engine.pyis intended to be dialect-agnostic and used with non-MySQL engines, you may additionally want to guard this logic with a dialect check (e.g. only apply theis_text_blob_or_json_typerestriction whenself.engine.dialect.name == "mysql"or"mariadb").