fix(migrations): preserve percent-encoded database URLs#2733
fix(migrations): preserve percent-encoded database URLs#2733Jordan-Jarvis wants to merge 3 commits into
Conversation
|
Thanks @Jordan-Jarvis — nice catch, and the diagnosis is right: percent-encoded credentials hit One thing to fix before this can merge: all three changed files ( That will red the lint job in CI. Easiest fix is to run the repo hook, which auto-adds them: (or |
|
Fixed the requested trailing-newline lint failures and merged current upstream Validation on the updated head:
|
|
@benfrank241 the requested trailing-newline fix is on the current head, focused tests and the repository lint hook are green, and the PR remains clean/mergeable. Since your review found the implementation correct with that one issue resolved, could you merge it when available? |
Summary
%only at Alembic'sConfig.set_main_optionboundaryget_main_optionFixes #2730.
Why
Alembic stores programmatic options through
ConfigParser, where%is interpolation syntax. Valid SQLAlchemy/libpq URLs containing percent-encoded credentials can otherwise fail before a database connection is attempted.This does not rewrite or normalize the database URL. Doubling
%is the required ConfigParser representation; reading the option returns the original single-percent value.Validation
mainbase.