Cyclic import issue with use of common_types

Bug #1653780 reported by Manjeet Singh Bhatia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

We have defined some custom types in neutron/object/common_types
to better control and validate the input, but use of common_types in
objects/quota.py will lead to cyclic import like this

neutron.api.v2.base -> neutron.quota -> neutron.db.quota.api -> neutron.objects.quota -> neutron.objects.common_types -> neutron.extensions.dns -> neutron.extensions.l3 -> neutron.api.v2.resource_helper) (cyclic-import)

this is required to break for quota_ovo patch

https://review.openstack.org/#/c/338625/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/416352

Changed in neutron:
assignee: nobody → Manjeet Singh Bhatia (manjeet-s-bhatia)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-lib (master)

Reviewed: https://review.openstack.org/416364
Committed: https://git.openstack.org/cgit/openstack/neutron-lib/commit/?id=73adf55f35211737b069e24dd42c97c7c2e46ac8
Submitter: Jenkins
Branch: master

commit 73adf55f35211737b069e24dd42c97c7c2e46ac8
Author: Manjeet Singh Bhatia <email address hidden>
Date: Tue Jan 3 22:23:25 2017 +0000

    Add FQDN_FIELD_SIZE constant

    FQDN_MAX_LEN has been defined at multiple locations
    in neutron tree, I encountered a situation where use
    of this constant from neutron/extensions/dns.py ended
    up in cyclic import. The better solution would be to
    have it in neutron lib and use it everywhere.

    Related-Bug: #1653780

    Change-Id: Ifd13f6d85bd7c7f5f803eaa8aac0e16c0f0edff7

Changed in neutron:
assignee: Manjeet Singh Bhatia (manjeet-s-bhatia) → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/416352
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7d99bf0c8d575729eb5fe6ef1325a53eee23ed10
Submitter: Jenkins
Branch: master

commit 7d99bf0c8d575729eb5fe6ef1325a53eee23ed10
Author: Manjeet Singh Bhatia <email address hidden>
Date: Tue Jan 3 21:14:50 2017 +0000

    Break circular import with use of common_types

    Using UUIDFIelds from common types in objects/quota.py in [1],
    ended up in circular imports. This patch will fix it.

    [1]. https://review.openstack.org/#/c/338625/
    Change-Id: I67580a875d2a8c8a791b9e246c1247349c4771df
    Closes-Bug: #1653780

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.0.0b3

This issue was fixed in the openstack/neutron 10.0.0.0b3 development milestone.

tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.