Warning for redundant policy rules

Bug #1921981 reported by Yasufumi Ogawa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Low
Yasufumi Ogawa

Bug Description

There are so many uninterested warning messages in test logs. It's not a critical issue, but increases the size of files and makes us annoying while analyzing logs.

"Policy Rules ['context_is_admin', 'default'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also."

Here is an example of a result of unit test.
------------------------------------------
...
cover start: run-test
cover run-test: commands[0] | stestr run
setting PATH=/home/zuul/src/opendev.org/openstack/tacker/.tox/cover/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
[3918] /home/zuul/src/opendev.org/openstack/tacker$ /home/zuul/src/opendev.org/openstack/tacker/.tox/cover/bin/stestr run
Policy Rules ['context_is_admin', 'default'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
Policy Rules ['context_is_admin', 'default'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
Policy Rules ['context_is_admin', 'default'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
{5} tacker.tests.unit.api.test_api_common.PaginationEmulatedHelperTestcase.test_get_links [0.262856s] ... ok
Policy Rules ['context_is_admin', 'default'] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.
Extension path '' doesn't exist!
...
------------------------------------------

Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Low
assignee: nobody → Yasufumi Ogawa (yasufum)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 6.0.0.0rc1

This issue was fixed in the openstack/tacker 6.0.0.0rc1 release candidate.

Changed in tacker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/830146
Committed: https://opendev.org/openstack/tacker/commit/75778a2d98e1440f56f2378798062133f57b5568
Submitter: "Zuul (22348)"
Branch: master

commit 75778a2d98e1440f56f2378798062133f57b5568
Author: Hiromu Asahina <email address hidden>
Date: Mon Feb 21 11:03:33 2022 +0000

    Suppress Warnings for SQL Alchemy

    The ``cache_ok`` attribute for SQL Alchemy TypeDecorator will emit a
    warning when its value is set to the default value ``None``. When this
    value is set to True, SQL Alchemy will cache SQL query and reuse it
    later when the same query is called again, and vice versa.

    This patch simply sets ``cache_ok`` to TypeDecorator classes according
    to whether it can be used as a cache key or not [1].

    [1] https://docs.sqlalchemy.org/en/14/core/type_api.html#sqlalchemy.types.ExternalType.cache_ok

    Closes-Bug: #1921981
    Change-Id: I503c93d6e8869b30c49909c95fb2669862d28a3f

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

This issue was fixed in the openstack/tacker 7.0.0.0rc1 release candidate.

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.