<div dir="ltr"><div><div><div>As I expect, there are some failures in periodic tasks recently [1] if we set enforce_type with True by default, we'd better fix them before we release oslo.config 4.0. Some guys had been working on this :<br>Nova: <a href="https://review.openstack.org/455534">https://review.openstack.org/455534</a> should fix failures<br></div><div>tempest: <a href="https://review.openstack.org/456445">https://review.openstack.org/456445</a> fixed<br></div><div>Keystone: <a href="https://review.openstack.org/455391">https://review.openstack.org/455391</a> wait for oslo.config 4.0<br></div><div><br></div><div>We still need help from Glance/Ironic/Octavia<br></div>Glance: <a href="https://review.openstack.org/#/c/455522/">https://review.openstack.org/#/c/455522/</a> need review<br></div>Ironic: Need fix failure in <a href="http://logs.openstack.org/periodic/periodic-ironic-py27-with-oslo-master/680abfe/testr_results.html.gz">http://logs.openstack.org/periodic/periodic-ironic-py27-with-oslo-master/680abfe/testr_results.html.gz</a><br>Octavia: Need fix failure in <a href="http://logs.openstack.org/periodic/periodic-octavia-py35-with-oslo-master/80fee03/testr_results.html.gz">http://logs.openstack.org/periodic/periodic-octavia-py35-with-oslo-master/80fee03/testr_results.html.gz</a><br></div><div><div><div><div><br>[1] <a href="http://status.openstack.org/openstack-health/#/?groupKey=build_name&resolutionKey=hour&searchProject=-with-oslo">http://status.openstack.org/openstack-health/#/?groupKey=build_name&resolutionKey=hour&searchProject=-with-oslo</a><br><div class="gmail_extra"><br><div class="gmail_quote">2017-04-04 0:01 GMT+08:00 ChangBo Guo <span dir="ltr"><<a href="mailto:glongwave@gmail.com" target="_blank">glongwave@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi ALL,<br><div><br><span>oslo_config provides method CONF.set_override[1] , developers usually use it to change <span class="gmail-m_-7637432970889093051gmail-il">config</span> option's value in tests. That's convenient .</span><span> By default </span><span>parameter enforce_type=False, it doesn't check any type or value of </span><span><span>override</span>. I</span><span>f set enforce_type=True , will check parameter override's type and
value. In production code(running time code), oslo_config</span><span></span><span> always checks <span class="gmail-m_-7637432970889093051gmail-il">config</span> option's value.</span><span> In short, we test and run code in different ways.</span> so there's gap: <span class="gmail-m_-7637432970889093051gmail-il">config</span> option with wrong type or invalid value can pass tests when<span></span><div><span></span><div><div id="gmail-m_-7637432970889093051gmail-m_8148224464712465731magicdomid6"><span>parameter enforce_type = False in consuming projects. that means some invalid or wrong tests are in our code base. <br><br></span><br>We began to warn user about the change since Sep,
2016 in [2]. This change will
notify consuming project to write correct test cases with config
options. <br></div><div id="gmail-m_-7637432970889093051gmail-m_8148224464712465731magicdomid6">We would make enforce_type = true by default in [3], that may break some projects' tests, that's also raise wrong unit tests. The failure is easy to fix, which<br></div><div id="gmail-m_-7637432970889093051gmail-m_8148224464712465731magicdomid6">is recommended. <br></div></div></div><br><br>[1] <a href="https://github.com/openstack/oslo.config/blob/efb287a94645b15b634e8c344352696ff85c219f/oslo_config/cfg.py#L2613" target="_blank">https://github.com/openstack/<wbr>oslo.config/blob/<wbr>efb287a94645b15b634e8c34435269<wbr>6ff85c219f/oslo_config/cfg.py#<wbr>L2613</a><br>[2] <a href="https://review.openstack.org/#/c/365476/" target="_blank">https://review.openstack.org/#<wbr>/c/365476/</a><br>[3] <a href="https://review.openstack.org/328692" target="_blank">https://review.openstack.org/<wbr>328692</a><span class="gmail-HOEnZb"><font color="#888888"><br clear="all"><div><br>-- <br><div class="gmail-m_-7637432970889093051gmail_signature"><div dir="ltr"><div>ChangBo Guo(gcb)</div></div></div>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>ChangBo Guo(gcb)</div></div></div>
</div></div></div></div></div></div>