Multiple 'atom_name' given to _cached_get

Bug #1496608 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
taskflow
Fix Released
High
Joshua Harlow

Bug Description

Seems like the formatter has a case where a duplicate argument name will be provided:

2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier Traceback (most recent call last):
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/types/notifier.py", line 210, in notify
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier listener(event_type, details.copy())
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/types/notifier.py", line 90, in __call__
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier self._callback(event_type, *self._args, **kwargs)
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/listeners/logging.py", line 152, in _task_receiver
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier result, _make_matcher(task_name))
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/formatters.py", line 156, in format
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier starting_prefix=" "))
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/types/tree.py", line 327, in pformat
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier buff.write(stringify_node(node))
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier File "/opt/stack/new/taskflow/taskflow/formatters.py", line 93, in _format_node
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier optional_args=atom.optional)
2015-09-16 19:04:46.672 9698 ERROR taskflow.types.notifier TypeError: _cached_get() got multiple values for keyword argument 'atom_name'

We should fix this:

http://logs.openstack.org/14/209214/10/check/gate-tempest-dsvm-neutron-src-taskflow/809ff7f/logs/screen-c-api.txt.gz?level=WARNING#_2015-09-16_19_04_46_672

Joshua Harlow (harlowja)
Changed in taskflow:
importance: Undecided → High
assignee: nobody → Joshua Harlow (harlowja)
Changed in taskflow:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to taskflow (master)

Reviewed: https://review.openstack.org/224335
Committed: https://git.openstack.org/cgit/openstack/taskflow/commit/?id=f8624a136b77c68dbf3e75406f2903586cf0762b
Submitter: Jenkins
Branch: master

commit f8624a136b77c68dbf3e75406f2903586cf0762b
Author: Joshua Harlow <email address hidden>
Date: Wed Sep 16 15:22:25 2015 -0700

    Fix '_cache_get' multiple keyword argument name overlap

    The argument 'atom_name' is also used by the fetch function
    so when it is provided a conflict occurs and this ends badly.

    To avoid this capture the needed variables used for fetching
    a cached value into a functools.partial object and use that instead
    of passing further arguments.

    Closes-Bug: #1496608

    Change-Id: Ic012f7687037bf876d041c4bc62b3f6606a8a845

Changed in taskflow:
status: In Progress → Fix Committed
Changed in taskflow:
milestone: none → 1.22.0
status: Fix Committed → Fix Released
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.