Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix security issue by upgrading ansible version #598

Merged
merged 4 commits into from
Feb 29, 2020

Conversation

Sispheor
Copy link
Member

No description provided.

@Sispheor Sispheor force-pushed the fix/ansible_version branch 2 times, most recently from ad9f54a to 6867767 Compare February 27, 2020 10:17
@Sispheor
Copy link
Member Author

Sispheor commented Feb 27, 2020

Multiple issue here.
Ansible cannot be installed as a lib. Workaround is to install via pip before installing kalliope.

Flask testing lib: jarus/flask-testing#143
The issue is fixed but not released into pypi.

ImportError: Failed to import test module: Tests
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 462, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/kalliope/kalliope/Tests/__init__.py", line 5, in <module>
    from Tests.test_api.test_main_view import TestMainView
  File "/home/kalliope/kalliope/Tests/test_api/test_main_view.py", line 4, in <module>
    from Tests.test_api.base import RestAPITestBase
  File "/home/kalliope/kalliope/Tests/test_api/base.py", line 4, in <module>
    from flask_testing import LiveServerTestCase
  File "/usr/local/lib/python3.6/dist-packages/Flask_Testing-0.7.1-py3.6.egg/flask_testing/__init__.py", line 13, in <module>
    from .utils import TestCase, LiveServerTestCase
  File "/usr/local/lib/python3.6/dist-packages/Flask_Testing-0.7.1-py3.6.egg/flask_testing/utils.py", line 35, in <module>
    from werkzeug import cached_property
ImportError: cannot import name 'cached_property'

@Sispheor Sispheor force-pushed the fix/ansible_version branch 4 times, most recently from 762f174 to 2d88018 Compare February 27, 2020 13:54
@Sispheor Sispheor force-pushed the fix/ansible_version branch from 2d88018 to 32f1031 Compare February 27, 2020 13:56
@Sispheor
Copy link
Member Author

I forced the Werkzeug version to a previous release.
And the Ansible installation is performed before the kalliope install.

2 similar comments
@Sispheor
Copy link
Member Author

I forced the Werkzeug version to a previous release.
And the Ansible installation is performed before the kalliope install.

@Sispheor
Copy link
Member Author

I forced the Werkzeug version to a previous release.
And the Ansible installation is performed before the kalliope install.

@Sispheor Sispheor force-pushed the fix/ansible_version branch from 461c64d to 64d51c1 Compare February 28, 2020 09:37
def __init__(self, **kwargs):
super(Volume, self).__init__(**kwargs)

self.level = kwargs.get('level', None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Level expects an int and the default value isNone. it can lead to type incompatibility in the next linesm such as self.level - current_level.
Maybe we could replace the default value to 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry i merged before answering. I saw that you approved.
Anyway, the level is tested in the method below. It will fail if it's not an integer. And this parameter is mandatory.

@Sispheor Sispheor merged commit 8a2719a into dev Feb 29, 2020
@Sispheor Sispheor deleted the fix/ansible_version branch February 29, 2020 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants