← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1517839] Re: Make CONF.set_override with parameter enforce_type=True by default

 

Reviewed:  https://review.openstack.org/300251
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=3ed5948b1c20a000e82bea4cd2af7f4dce039ba9
Submitter: Jenkins
Branch:    master

commit 3ed5948b1c20a000e82bea4cd2af7f4dce039ba9
Author: Angus Salkeld <asalkeld@xxxxxxxxxxxx>
Date:   Mon Apr 11 10:52:22 2016 +1000

    Set enforce_type=True on config overrides in tests
    
    This makes sure that type checking is done by oslo.config
    on the test override values.
    
    Change-Id: Ia8c1cb55fe98e9d06b9b9ff13e5c2d25aa67bff3
    Closes-bug: #1517839


** Changed in: heat
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1517839

Title:
  Make CONF.set_override with parameter enforce_type=True by default

Status in Cinder:
  In Progress
Status in cloudkitty:
  Fix Released
Status in Designate:
  Fix Released
Status in heat:
  Fix Released
Status in OpenStack Identity (keystone):
  Fix Released
Status in Manila:
  Triaged
Status in Murano:
  Fix Released
Status in neutron:
  Won't Fix
Status in oslo.config:
  New
Status in oslo.messaging:
  Fix Released
Status in Rally:
  Fix Released
Status in watcher:
  Fix Released

Bug description:
  1. Problems :
     oslo_config provides method CONF.set_override[1] , developers usually use it to change config option's value in tests. That's convenient .
     By default  parameter enforce_type=False,  it doesn't check any type or value of override. If set enforce_type=True , will check parameter
     override's type and value.  In production code(running time code),  oslo_config  always checks  config option's value.
     In short, we test and run code in different ways. so there's  gap:  config option with wrong type or invalid value can pass tests when
     parameter enforce_type = False in consuming projects.  that means some invalid or wrong tests are in our code base.
     There is nova POC result when I enable "enforce_type=true" [2],  and I must fix them in [3]

     [1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L2173
     [2] http://logs.openstack.org/16/242416/1/check/gate-nova-python27/97b5eff/testr_results.html.gz
     [3]  https://review.openstack.org/#/c/242416/  https://review.openstack.org/#/c/242717/  https://review.openstack.org/#/c/243061/

  2. Proposal 
     1) Make  method CONF.set_override with  enforce_type=True  in consuming projects. and  fix violations when  enforce_type=True in each project.

    2) Make  method CONF.set_override with  enforce_type=True by default
  in oslo_config

     Hope some one from consuming projects can help make
  enforce_type=True in consuming projects and fix violations,

     You can find more details and comments  in
  https://etherpad.openstack.org/p/enforce_type_true_by_default

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1517839/+subscriptions