[openstack-dev] [neutron][db] reviewers: please mind the branch a script belongs to

Ihar Hrachyshka ihrachys at redhat.com
Tue Sep 1 09:14:03 UTC 2015


Hi reviewers,

several days ago, a semantically expand-only migration script was merged into contract branch [1]. This is not a disaster, though it would be a tiny one if a contract-only migration script would be merged into expand branch.

Please make sure you know the new migration strategy described in [2].

Previously, we introduced a check that validates that we don’t mix down_revision heads, linking e.g. expand script to contract revision, or vice versa [3]. Apparently, it’s not enough.

Ann is looking into introducing another check for semantical correctness of scripts. I don’t believe it may work for all complex cases we may need to solve manually, but at least it should be able to catch add_* operations in contract scripts, or drop_* operations in expand branch. Since there may be exceptions to general automation, we may also need a mechanism to disable such a sanity check for specific scripts.

So all in all, I kindly ask everyone to become aware of how we now manage migration scripts, and what it implies in how we should review code (f.e. looking at paths as well as the code of alembic scripts). That is especially important before the test that Ann is looking to implement is not merged.

[1]: https://bugs.launchpad.net/neutron/+bug/1490767
[2]: http://docs.openstack.org/developer/neutron/devref/alembic_migrations.html
[3]: https://review.openstack.org/#/c/206746/

Thanks
Ihar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150901/70b8f025/attachment.pgp>


More information about the OpenStack-dev mailing list