Tox error occures in master branch because lacking of required properties

Bug #1918360 reported by Hiroo Kitamura
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Heat Translator
Fix Released
Undecided
Hiroo Kitamura

Bug Description

As of 3/10, when I cloned the master branch of Heat-translator 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...
FAIL: translator.tests.test_tosca_hot_translation.ToscaHotTranslationTest.test_hot_translate_nfv_scaling_with_params
tags: worker-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/heat-translator/translator/tests/test_tosca_hot_translation.py", line 606, in test_hot_translate_nfv_scaling_with_params
    self._test_successful_translation(tosca_file, hot_files, params)
  File "/tmp/heat-translator/translator/tests/test_tosca_hot_translation.py", line 34, in _test_successful_translation
    diff = TranslationUtils.compare_tosca_translation_with_hot(tosca_file,
  File "/tmp/heat-translator/translator/common/utils.py", line 244, in compare_tosca_translation_with_hot
    tosca = ToscaTemplate(tosca_tpl, params, a_file)
  File "/tmp/heat-translator/.tox/py38/lib/python3.8/site-packages/toscaparser/tosca_template.py", line 115, in __init__
    self.verify_template()
  File "/tmp/heat-translator/.tox/py38/lib/python3.8/site-packages/toscaparser/tosca_template.py", line 303, in verify_template
    raise ValidationError(
toscaparser.common.exception.ValidationError:
The input "/tmp/heat-translator/translator/tests/data/nfv/test_tosca_nfv_autoscaling_with_params.yaml" failed validation with the following error(s):

        MissingRequiredFieldError: "properties" of template "SP" is missing required field "['targets']".
...snip...
```

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 Heat-translator, the errors occur because there are testcases and yaml that violate 'required property of policies'.

Changed in heat-translator:
assignee: nobody → Hiroo Kitamura (h-kitamura)
summary: - Tox error occures in master branch
+ Tox error occures in master branch because lacking of required
+ properties
Revision history for this message
Hiroo Kitamura (h-kitamura) wrote :
Changed in heat-translator:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat-translator 2.3.0

This issue was fixed in the openstack/heat-translator 2.3.0 release.

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

This issue was fixed in the openstack/heat-translator 2.4.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.