Tox error occures in master branch because lacking of required properties

Bug #1921996 reported by Hiroo Kitamura
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Critical
Hiroo Kitamura

Bug Description

As of 3/31, when I cloned the master branch of Tacker and executed tox, I got errors in some testcases.

This is a critical issue and all patches can not be merged.

The details of the error are as follows.

```
$ tox -e py38

...snip...

tacker.tests.unit.vnfm.infra_drivers.openstack.test_openstack.TestOpenStack.test_create_tosca_alarm_scale
---------------------------------------------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/tmp/tacker/tacker/vnfm/infra_drivers/openstack/translate_template.py", line 305, in _generate_hot_from_tosca
    heat_template_yaml = translator.translate()
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/tosca_translator.py", line 57, in translate
    self._translate_to_hot_yaml()
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/tosca_translator.py", line 45, in _translate_to_hot_yaml
    self.node_translator.translate()
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/translate_node_templates.py", line 178, in translate
    return self._translate_nodetemplates()
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/translate_node_templates.py", line 377, in _translate_nodetemplates
    self._recursive_handle_properties(resource)
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/translate_node_templates.py", line 197, in _recursive_handle_properties
    resource.handle_properties(self.hot_resources)
      File "/tmp/tacker/.tox/py38/lib/python3.8/site-packages/translator/hot/tosca/tosca_policies_scaling.py", line 77, in handle_properties
    if resource.name in temp.get("targets"):
    TypeError: argument of type 'NoneType' is not iterable

...snip...

======
Totals
======
Ran: 1787 tests in 527.1841 sec.
 - Passed: 1616
 - Skipped: 166
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 5
Sum of execute time for each test: 526.5277 sec.
```

This is because the version of tosca-parser that reflects the following 'validation for required property of policies' has been released and is now installed when tox is executed.

https://opendev.org/openstack/tosca-parser/commit/00d3a394d5a3bc13ed7d2f1d71affd9ab71e4318

The bug report of tosca-parser is as follows.

https://bugs.launchpad.net/tosca-parser/+bug/1903233

In the unittest of Tacker, the errors occur because there are testcases and yaml that violate 'required property of policies'.

Changed in tacker:
assignee: nobody → Hiroo Kitamura (h-kitamura)
Revision history for this message
Hiroo Kitamura (h-kitamura) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/784000

Changed in tacker:
status: New → In Progress
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Critical
Revision history for this message
Yasufumi Ogawa (yasufum) wrote :
Changed in tacker:
status: In Progress → Fix Committed
Revision history for this message
Yasufumi Ogawa (yasufum) wrote :

stable/wallaby is also fix by this change.
https://review.opendev.org/c/openstack/tacker/+/784443

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 5.0.0.0rc2

This issue was fixed in the openstack/tacker 5.0.0.0rc2 release candidate.

Yasufumi Ogawa (yasufum)
Changed in tacker:
status: Fix Committed → Fix Released
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.

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.