Deprecation warning messages are emitted continuously due to warning.simplefilter 'Always' option

Bug #1844462 reported by Tushar Patil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
Undecided
Asmita Singh

Bug Description

Warning filter was enabled while fixing LP bug [1] and later when deprecation unused exceptions were removed, warning filter wasn't removed due to which when glance_store is used by other projects, it emits DeprecationWarning messages continuously even though it's expected that DeprecationWarning should be logged only once. I think this is happening because of the order of initialization of warning filter in glance_store in other projects (namely tacker).

I think warning filter should be removed from exceptions module [2] if not needed.

[1] : https://bugs.launchpad.net/glance-store/+bug/1516020
[2] : https://github.com/openstack/glance_store/blob/master/glance_store/exceptions.py#L23

Revision history for this message
Tushar Patil (tpatil) wrote :

The deprecated unused exceptions were removed in patch https://review.opendev.org/#/c/352563.

Changed in glance-store:
assignee: nobody → Asmita Singh (asmita2018)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance_store (master)

Fix proposed to branch: master
Review: https://review.opendev.org/683034

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

Reviewed: https://review.opendev.org/683034
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=59f55c69074b9fcbbefbf060212968b42f8fa2fe
Submitter: Zuul
Branch: master

commit 59f55c69074b9fcbbefbf060212968b42f8fa2fe
Author: asmita singh <email address hidden>
Date: Wed Sep 18 10:17:09 2019 +0000

    Remove warning filter

    Warning filter was enabled while fixing Launchpad bug #1516020 and later
    when deprecation unused exceptions were removed, warning filter wasn't
    removed due to which when glance_store is used by other projects, it
    emits DeprecationWarning messages continuously.

    This patch removes the unwanted warning filter.

    Change-Id: Ibf227d509e567ccbcf77676277300511de2ad14d
    Closes-Bug: #1844462

Changed in glance-store:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance_store (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/684946

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (stable/train)

Reviewed: https://review.opendev.org/684946
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=1af75f5a5d37ccb98dadeb0533ea655d7751cb31
Submitter: Zuul
Branch: stable/train

commit 1af75f5a5d37ccb98dadeb0533ea655d7751cb31
Author: asmita singh <email address hidden>
Date: Wed Sep 18 10:17:09 2019 +0000

    Remove warning filter

    Warning filter was enabled while fixing Launchpad bug #1516020 and later
    when deprecation unused exceptions were removed, warning filter wasn't
    removed due to which when glance_store is used by other projects, it
    emits DeprecationWarning messages continuously.

    This patch removes the unwanted warning filter.

    Change-Id: Ibf227d509e567ccbcf77676277300511de2ad14d
    Closes-Bug: #1844462
    (cherry picked from commit 59f55c69074b9fcbbefbf060212968b42f8fa2fe)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance_store 1.0.1

This issue was fixed in the openstack/glance_store 1.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance_store 1.1.0

This issue was fixed in the openstack/glance_store 1.1.0 release.

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.