<div dir="ltr">Ihar, we all adults here, but this does not save us from making silly mistakes sometimes :(<br>I think that if we can protect from possible mistakes - lets do this, as messing up with size of fields is a common issue.</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 17, 2016 at 2:16 PM Ihar Hrachyshka <<a href="mailto:ihrachys@redhat.com">ihrachys@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Henry Gessau <<a href="mailto:HenryG@gessau.net" class="gmail_msg" target="_blank">HenryG@gessau.net</a>> wrote:<br class="gmail_msg">
<br class="gmail_msg">
> Anna Taraday <<a href="mailto:akamyshnikova@mirantis.com" class="gmail_msg" target="_blank">akamyshnikova@mirantis.com</a>> wrote:<br class="gmail_msg">
>> Henry, thanks for taking care of this!<br class="gmail_msg">
>><br class="gmail_msg">
>> In my opinion, it is just safe to use raw values in migration, because<br class="gmail_msg">
>> migration is a strict point in time.<br class="gmail_msg">
>><br class="gmail_msg">
>> I remember how many patches I send in havana in Neutron for fixing<br class="gmail_msg">
>> synchronization issues. Usage constants everywhere can be good in this<br class="gmail_msg">
>> case,<br class="gmail_msg">
>> but ModelMigrationSyc did such check of this for us already.<br class="gmail_msg">
>><br class="gmail_msg">
>> If we want to have constants everywhere, we should guarantee that they are<br class="gmail_msg">
>> unchanged - have test in neutron-lib which verifies their values.<br class="gmail_msg">
><br class="gmail_msg">
> Yes, we could have some tests, although a patch changing a constant would<br class="gmail_msg">
> probably also have a change to the test. :) We might need to also have a<br class="gmail_msg">
> prominent "Warning! Do not change this test!" comment for each test.<br class="gmail_msg">
<br class="gmail_msg">
I actually think (or hope) everyone is adult here, and will be able to<br class="gmail_msg">
block a patch changing a constant, even if there is no unit test written,<br class="gmail_msg">
especially if we put such a warning in a comment above the constants we<br class="gmail_msg">
know are especially unsafe to touch.<br class="gmail_msg">
<br class="gmail_msg">
But if we are still think that it’s better safe than sorry, we could have<br class="gmail_msg">
some tests to make that even more explicit. It just seems like a waste of<br class="gmail_msg">
cpu cycles when any careful reviewer can spot such an issue.<br class="gmail_msg">
<br class="gmail_msg">
Anyhow, whatever works for the goal, that I think is: making constants safe<br class="gmail_msg">
to use in all relevant contexts, including alembic.<br class="gmail_msg">
<br class="gmail_msg">
Ihar<br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Regards,<br>Ann Taraday</div></div>