-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Unusable display of alembic_check
output
#1597
Comments
I am onboard with replacing the use of repr(), which dumps out a lot of extranous detail, with something that is beautified and succinct to read. Where it goes into duplicating what is it your goal to cut and paste working code from the output? I'd rather add features to |
as far as |
Well, we're using I'll start making a small PR to make the AutogenerateDiffDetected contain contextual info, and we can discuss and iterate over it if you'd like |
that's what |
…rappers may make other formatting of the diff fixes: sqlalchemy#1597
I totally understand your position, and I've submitted the minimal change for me to do whatever I feel will be useful with it without alembic having to make plenty of assumptions. Having the context would help me compute clues about the situation ("you would generate a drop table, but I could find a table definition matching here, maybe a missing import"), but here I just get a repr that can gives me nothing workable |
…rappers may make other formatting of the diff fixes: sqlalchemy#1597
…rappers may make other formatting of the diff ### Description As discussed in #1597, AutogenerateDiffsDetected should hold contextual information so that command can be wrapped for another format (CI, pre-commit hook...) ### Checklist <!-- go over following points. check them with an `x` if they do apply, (they turn into clickable checkboxes once the PR is submitted, so no need to do everything at once) --> This pull request is: - [ ] A documentation / typographical error fix - Good to go, no issue or tests are needed - [x] A short code fix - please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. one line code fixes without tests will not be accepted. - [ ] A new feature implementation - please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look. - Please include: `Fixes: #<issue number>` in the commit message - please include tests. **Have a nice day!** Closes: #1598 Pull-request: #1598 Pull-request-sha: 7799320 Change-Id: Id08bc52a0586063f177736a36a61f96232459f1c
fixed in 3d33cfa |
Describe the use case
We're using
alembic check
in our CI to decorate pull requests with potentially missing DB changes.The output of
alembic check
is added as a comment in the pull request, but it's hardly readable.Example Use
What could be output instead, which would summarize it better:
or even
Additional context
Note that in above expectations I'd be delighted that we can have the
if_exists
option which is currently added by my rewriter.What I can propose as solutions:
as_sql
oras_ops
tocheck
command, so that we can specify output formatsAutogenerateDiffsDetected
so that I may make a wrapper above the command and catch it to make the display that suits me best. passing diffs/migration_script would be sufficient to change renderingHave a nice day!
The text was updated successfully, but these errors were encountered: