refactor: Migrate table column ComponentRow.text from TEXT to MEDIUMTEXT length#300
Draft
yuechao-qin wants to merge 1 commit into
Draft
refactor: Migrate table column ComponentRow.text from TEXT to MEDIUMTEXT length#300yuechao-qin wants to merge 1 commit into
ComponentRow.text from TEXT to MEDIUMTEXT length#300yuechao-qin wants to merge 1 commit into
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| # MySQL MEDIUMTEXT: 2^24 = 16,777,215 bytes | ||
| # With utf8mb4 charset (4 bytes/char worst case): ~4,194,303 characters | ||
| # With ASCII-only content (1 byte/char): ~16,777,215 characters | ||
| _MEDIUMTEXT_LENGTH: Final[int] = 2**24 |
yuechao-qin
force-pushed
the
ycq/refactor-componentrow-text-mediumtext
branch
from
July 18, 2026 19:09
63ff127 to
0bcd0b2
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Migrate
component.textfrom TEXT to MEDIUMTEXTWhat
Widens the
component.textcolumn fromTEXT(64 KB) toMEDIUMTEXT(16 MB) on MySQL. PostgreSQL and SQLite are unaffected (TEXT is already unlimited).Why
Component YAML specs can exceed 64 KB for complex pipelines with many parameters/outputs. The current
TEXTlimit silently truncates on MySQL.How
ComponentRow.textnow usessql.Text(length=2**24)which SQLAlchemy maps toMEDIUMTEXTon MySQLmigrate_component_text_column()indatabase_migrations.py— idempotent, inspects actual column length before deciding to ALTERmigrate_secret_value_column), no-op on subsequent deploysProduction impact
Testing
Files changed
cloud_pipelines_backend/backend_types_sql.py_MEDIUMTEXT_LENGTHconstantcloud_pipelines_backend/component_library_api_server.pycloud_pipelines_backend/database_migrations.pycloud_pipelines_backend/database_ops.pycloud_pipelines_backend/api_router.pytests/test_database_migrations.pyBefore merging
Remove the temporary admin endpoints at the bottom of
api_router.py(marked withDO NOT MERGE INTO master/mainbanner).