<div dir="ltr"><div>Hi all.</div><div><br></div><div>In the last time we got on review several patches, which removes old deprecation properties [1], </div><div>and one mine [2].<br></div><div><br></div><div>The aim is to delete deprecated code and redundant tests. It looks simple, but the main problem, which we met, is backward compatibility.</div><div>F.e. user has created resource (FIP) with old property schema, i.e. using SUBNET_ID instead of SUBNET. On first look nothing bad will not happen, because:</div><div>1. handle_delete use resource_id and any changes in property schema does not affect other actions.</div><div>2. If user want to use old template, he will get adequate error message, that this property is not presented in schema. After that he just should switch to new property and update stack using this new property.</div><div><br></div><div>In the same time we have one big issues for shadow dependencies, which is actual for neutron resources. The simplest approach will not be worked [3], due to old properties was deleted from property_schema.</div><div><br></div><div>Why is it bad ?</div><div>- we will get again all bugs related with such dependencies.</div><div>- how to make sure: </div><div>    - create stack with old property (my template [4])</div><div>    - open horizon, and look on topology</div><div>    - download patch [2] and restart engine</div><div>    - reload horizon page with topology</div><div>    - as result it will be different</div><div> </div><div>I have some ideas about how to solve this, but none of them is not enough good for me:</div><div> - getting such information from self.properties.data is bad, because we will skip all validations mentioned in properties.__getitem__</div><div> - renaming old key in data to new or creating copy with new key is not correct for me, because in this case we actually change properties (resource representation) invisibly from user.</div><div> - as possible we may leave old deprecated property and mark it something like (removed), which will have similar behavior such as for implemented=False. I do not like it, because it means, that we never remove this "support code", because wants to be compatible with old resources. (User may be not very lazy to do simple update or something else ...)</div><div>- last way, which I have not tried yet, is using _stored_properties_data for extraction necessary information.</div><div><br></div><div>So now I have the questions:</div><div>Should we support such case with backward compatibility? <br></div><div>If yes, how will be better to do it for us and user?</div><div>May be we should create some strategy for removing  deprecated properties ?</div><div><br></div><div>[1] <a href="https://review.openstack.org/#/q/status:open+project:openstack/heat+branch:master+topic:rm-depr-props,n,z">https://review.openstack.org/#/q/status:open+project:openstack/heat+branch:master+topic:rm-depr-props,n,z</a><br></div><div>[2]  <a href="https://review.openstack.org/#/c/139990/7">https://review.openstack.org/#/c/139990/7</a> </div><div>[3] <a href="https://review.openstack.org/#/c/139990/7/heat/engine/resources/neutron/floatingip.py">https://review.openstack.org/#/c/139990/7/heat/engine/resources/neutron/floatingip.py</a></div><div>[4] <a href="http://paste.openstack.org/show/154591/">http://paste.openstack.org/show/154591/</a></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Regards,<div>Sergey.</div></div></div></div>
</div>