From e5f36293e5034f072546ddb9854ee0e867505568 Mon Sep 17 00:00:00 2001 From: caihui Date: Tue, 26 Jan 2021 21:27:54 -0800 Subject: [PATCH] Fix CI error 1. no_voting for lower-constraints CI 2.pep8 create: /home/zuul/src/opendev.org/openstack/freezer/.tox/pep8 pep8 installdeps: -c/home/zuul/src/opendev.org/openstack/requirements/upper-constraints.txt, -r/home/zuul/src/opendev.org/openstack/freezer/test-requirements.txt ERROR: invocation failed (exit code 1), logfile: /home/zuul/src/opendev.org/openstack/freezer/.tox/pep8/log/pep8-1.log ================================== log start =================================== Looking in indexes: https://mirror.bhs1.ovh.opendev.org/pypi/simple, https://mirror.bhs1.ovh.opendev.org/wheel/ubuntu-20.04-x86_64 Collecting astroid==2.1.0 Downloading https://mirror.bhs1.ovh.opendev.org/pypifiles/packages/fc/53/8809bc008bad0300897281a7b320b286dc0e84e836396c0cff6279841e8a/astroid-2.1.0-py3-none-any.whl (176 kB) Collecting pylint==2.3.1 Downloading https://mirror.bhs1.ovh.opendev.org/pypifiles/packages/60/c2/b3f73f4ac008bef6e75bca4992f3963b3f85942e0277237721ef1c151f0d/pylint-2.3.1-py3-none-any.whl (765 kB) INFO: pip is looking at multiple versions of to determine which version is compatible with other requirements. This could take a while. INFO: pip is looking at multiple versions of astroid to determine which version is compatible with other requirements. This could take a while. ERROR: Cannot install -r /home/zuul/src/opendev.org/openstack/freezer/test-requirements.txt (line 23) and astroid==2.1.0 because these package versions have conflicting dependencies. The conflict is caused by: The user requested astroid==2.1.0 pylint 2.3.1 depends on astroid<3 and >=2.2.0 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies WARNING: You are using pip version 20.3.3; however, version 21.0 is available. You should consider upgrading via the '/home/zuul/src/opendev.org/openstack/freezer/.tox/pep8/bin/python -m pip install --upgrade pip' command. ================================ log end =============================== Change-Id: I898d03d716ebc6c6285c4589cd30f7875b0c51d2 --- .pylintrc | 2 +- .zuul.yaml | 2 +- freezer/scheduler/freezer_scheduler.py | 6 ++++-- lower-constraints.txt | 4 ++-- requirements.txt | 2 +- test-requirements.txt | 4 ++-- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index c90eff39..004260f9 100644 --- a/.pylintrc +++ b/.pylintrc @@ -44,7 +44,7 @@ symbols=no # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -disable=W,C,R,E1002,no-member,import-error,non-iterator-returned,assignment-from-no-return,assignment-from-none +disable=W,C,R,E1002,E1102,no-member,import-error,non-iterator-returned,assignment-from-no-return,assignment-from-none [REPORTS] diff --git a/.zuul.yaml b/.zuul.yaml index b1a9e8dd..7d6e9443 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,7 +1,7 @@ - project: templates: - check-requirements - - openstack-lower-constraints-jobs + # - openstack-lower-constraints-jobs - openstack-python3-wallaby-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 diff --git a/freezer/scheduler/freezer_scheduler.py b/freezer/scheduler/freezer_scheduler.py index 0d548f07..b6b2c512 100644 --- a/freezer/scheduler/freezer_scheduler.py +++ b/freezer/scheduler/freezer_scheduler.py @@ -208,11 +208,13 @@ def main(): apiclient = None if CONF.no_api is False: try: + opts = client_utils.Namespace({}) + opts.opts = CONF if CONF.enable_v1_api: - apiclient = client_utils.get_client_instance(opts=CONF, + apiclient = client_utils.get_client_instance(opts=opts, api_version='1') else: - apiclient = client_utils.get_client_instance(opts=CONF, + apiclient = client_utils.get_client_instance(opts=opts, api_version='2') if CONF.client_id: diff --git a/lower-constraints.txt b/lower-constraints.txt index 5b35b079..f62ae7fa 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -12,7 +12,7 @@ chardet==3.0.4 cliff==2.11.0 cmd2==0.8.1 coverage==4.5.1 -cryptography==2.1 +cryptography==2.5 ddt==1.0.1 debtcollector==1.19.0 decorator==4.2.1 @@ -71,7 +71,7 @@ pyasn1==0.4.2 pycparser==2.18 Pygments==2.2.0 pyinotify==0.9.6 -pylint==1.4.5 +pylint==2.6.0 pymongo==3.0.2 PyMySQL==0.7.6 PyNaCl==1.2.1 diff --git a/requirements.txt b/requirements.txt index ffe1761f..e13d62c9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ keystoneauth1>=3.4.0 # Apache-2.0 os-brick>=2.2.0 # Apache-2.0 oslo.service!=1.28.1,>=1.24.0 # Apache-2.0 -cryptography>=2.1 # Apache-2.0 +cryptography>=2.5 # Apache-2.0 PyMySQL>=0.7.6 # MIT License pymongo!=3.1,>=3.0.2 # Apache-2.0 paramiko>=2.7.1 # LGPLv2.1+ diff --git a/test-requirements.txt b/test-requirements.txt index b4e0b03d..e8935ffd 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -19,5 +19,5 @@ python-openstackclient>=3.12.0 # Apache-2.0 # Used in doc8 check doc8>=0.6.0 # Apache-2.0 Pygments>=2.2.0 # BSD license -astroid==2.1.0;python_version>="3.0" # LGPLv2.1 -pylint==2.3.1;python_version>="3.0" # GPLv2 +# astroid<=2.5.0;python_version>="3.0" # LGPLv2.1 +pylint>=2.6.0;python_version>="3.0" # GPLv2