Henry Gessau <hen...@gessau.net> wrote:
Anna Taraday <akamyshnik...@mirantis.com> wrote:
Henry, thanks for taking care of this!
In my opinion, it is just safe to use raw values in migration, because
migration is a strict point in time.
I remember how many patches I send in havana in Neutron for fixing
synchronization issues. Usage constants everywhere can be good in this
case,
but ModelMigrationSyc did such check of this for us already.
If we want to have constants everywhere, we should guarantee that they are
unchanged - have test in neutron-lib which verifies their values.
Yes, we could have some tests, although a patch changing a constant would
probably also have a change to the test. :) We might need to also have a
prominent "Warning! Do not change this test!" comment for each test.
I actually think (or hope) everyone is adult here, and will be able to
block a patch changing a constant, even if there is no unit test written,
especially if we put such a warning in a comment above the constants we
know are especially unsafe to touch.
But if we are still think that it’s better safe than sorry, we could have
some tests to make that even more explicit. It just seems like a waste of
cpu cycles when any careful reviewer can spot such an issue.
Anyhow, whatever works for the goal, that I think is: making constants safe
to use in all relevant contexts, including alembic.
Ihar
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev