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
add check command for upgrade diffs #1101
add check command for upgrade diffs #1101
Conversation
OK two things needed:
|
Hey @zzzeek,
If I understand correctly, it was to mirror the django makemigrations --check behavior. |
I think "revision --check" makes no sense for us as it means "revision" is not going to ever generate a revision, "check" is better. @CaselIT opinions? |
I do prefer check since using |
Sounds good, I'll give it a shot. |
@zzzeek @CaselIT - I updated this PR to be a distinct check command. In addition to the tests written here, I can confirm that a variant of this code has successfully been running in my company Replica's code base for the past month, and that when I plugged in this check command, the test caught the non-empty revision ops. |
Hello everyone, I am also waiting for this to be merged to use this feature, any idea when it could be? |
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.
OK, this is sqla-tester setting up my work on behalf of zzzeek to try to get revision 090b594 of this pull request into gerrit so we can run tests and reviews and stuff
New Gerrit review created for change 090b594: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 |
we have very little time right now to work on alembic and this PR was forgotten. will see if I can keep an eye on it in the coming weeks and maybe get it merged |
the test seems to not be passing. |
Hey @zzzeek - thanks for running the tests. I put in fixes for the test_help_text and pep8 failures. However, I don't know what to do with the openstack_gerrit errors. Let me know if you think it's unrelated or if there's particular action I should take with them. |
These failures are most likely unrelated |
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.
OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision fbe8f10 of this pull request into gerrit so we can run tests and reviews and stuff
Patchset fbe8f10 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 |
yes dont worry about the openstack stuff, those tests frquently stop working due to downstream changes and i usualyl dont have time to keep fixing them |
mike bayer (zzzeek) wrote: looks like you're down to pep8 stuff. install pre-commit https://pre-commit.com/ in the repo and that will run the code formatters. View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 |
@zzzeek Thanks for the pointers. I ran |
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.
Hi, this is sqla-tester and I see you've pinged me for review. However, user nxlouie is not authorized to initiate CI jobs. Please wait for a project member to do this!
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.
OK, this is sqla-tester setting up my work on behalf of CaselIT to try to get revision 807ed54 of this pull request into gerrit so we can run tests and reviews and stuff
Patchset 807ed54 added to existing Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 |
mike bayer (zzzeek) wrote: @CaselIT can you give this a final review? i made some changes in this patchset. will call this 1.9.0 View this in Gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 |
I've made a series of final changes that are visible only on the gerrit at https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 . feel free to review! |
Awesome, The documentation looks good from my end! |
Gerrit review https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/4295 has been merged. Congratulations! :) |
Thanks a lot for the quick work :) |
Fixes #724
Description
check
command. If the revision command with autogenerate has pending upgrade operations to run, then raise an error. Otherwise, continue.Testing
Wrote Tests:
tox tests/test_command.py::CheckTest::test_check_no_changes
tox tests/test_command.py::CheckTest::test_check_changes_detected
I also tested this function in my company Replica's code base:
Have a nice day!