diff --git a/.gitreview b/.gitreview index 49a7070..ea959f2 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,5 @@ host=review.opendev.org port=29418 project=openstack/charm-pacemaker-remote.git + +defaultbranch=stable/21.10 diff --git a/pip.sh b/pip.sh new file mode 100755 index 0000000..9a7e6b0 --- /dev/null +++ b/pip.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of tox.ini for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools +# +# setuptools 58.0 dropped the support for use_2to3=true which is needed to +# install blessings (an indirect dependency of charm-tools). +# +# More details on the beahvior of tox and virtualenv creation can be found at +# https://github.com/tox-dev/tox/issues/448 +# +# This script is wrapper to force the use of the pinned versions early in the +# process when the virtualenv was created and upgraded before installing the +# depedencies declared in the target. +pip install 'pip<20.3' 'setuptools<50.0.0' +pip "$@" diff --git a/src/build.lock b/src/build.lock new file mode 100644 index 0000000..2a35404 --- /dev/null +++ b/src/build.lock @@ -0,0 +1,130 @@ +{ + "locks": [ + { + "type": "layer", + "item": "layer:options", + "url": "https://github.com/juju-solutions/layer-options.git", + "vcs": null, + "branch": "refs/heads/master", + "commit": "fcdcea4e5de3e1556c24e6704607862d0ba00a56" + }, + { + "type": "layer", + "item": "layer:basic", + "url": "https://github.com/juju-solutions/layer-basic.git", + "vcs": null, + "branch": "refs/heads/master", + "commit": "a3ff62c32c993d80417f6e093e3ef95e42f62083" + }, + { + "type": "layer", + "item": "pacemaker-remote", + "url": null, + "vcs": null, + "branch": "refs/heads/21.10-updates\nrefs/heads/master", + "commit": "refs/heads/21.10-updates\nrefs/heads/master" + }, + { + "type": "layer", + "item": "interface:pacemaker-remote", + "url": "https://github.com/openstack/charm-interface-pacemaker-remote.git", + "vcs": null, + "branch": "refs/heads/master", + "commit": "87dc3baa2145286ac5372a01bf9e260f257d3673" + }, + { + "type": "python_module", + "package": "Jinja2", + "vcs": null, + "version": "2.10.1" + }, + { + "type": "python_module", + "package": "setuptools", + "vcs": null, + "version": "41.6.0" + }, + { + "type": "python_module", + "package": "pip", + "vcs": null, + "version": "18.1" + }, + { + "type": "python_module", + "package": "pbr", + "vcs": null, + "version": "5.6.0" + }, + { + "type": "python_module", + "package": "PyYAML", + "vcs": null, + "version": "5.2" + }, + { + "type": "python_module", + "package": "setuptools_scm", + "vcs": null, + "version": "1.17.0" + }, + { + "type": "python_module", + "package": "MarkupSafe", + "vcs": null, + "version": "1.1.1" + }, + { + "type": "python_module", + "package": "Tempita", + "vcs": null, + "version": "0.4" + }, + { + "type": "python_module", + "package": "charms.openstack", + "url": "git+https://github.com/openstack/charms.openstack.git", + "branch": "refs/heads/stable/21.10", + "version": "10627ee5f991c268f174d6d100e218a0e1867af1", + "vcs": "git" + }, + { + "type": "python_module", + "package": "charms.reactive", + "vcs": null, + "version": "1.4.1" + }, + { + "type": "python_module", + "package": "six", + "vcs": null, + "version": "1.16.0" + }, + { + "type": "python_module", + "package": "charmhelpers", + "url": "git+https://github.com/juju/charm-helpers.git", + "branch": "refs/heads/stable/21.10", + "version": "26efcd0da51d580f68ead2ca13c38f58766f8a14", + "vcs": "git" + }, + { + "type": "python_module", + "package": "netaddr", + "vcs": null, + "version": "0.7.19" + }, + { + "type": "python_module", + "package": "wheel", + "vcs": null, + "version": "0.33.6" + }, + { + "type": "python_module", + "package": "pyaml", + "vcs": null, + "version": "21.10.1" + } + ] +} \ No newline at end of file diff --git a/src/test-requirements.txt b/src/test-requirements.txt index e771023..bd0c1a8 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -5,5 +5,5 @@ # # Functional Test Requirements (let Zaza's dependencies solve all dependencies here!) -git+https://github.com/openstack-charmers/zaza.git#egg=zaza -git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack +git+https://github.com/openstack-charmers/zaza.git@stable/21.10#egg=zaza +git+https://github.com/openstack-charmers/zaza-openstack-tests.git@stable/21.10#egg=zaza.openstack diff --git a/src/tests/bundles/bionic-basic.yaml b/src/tests/bundles/bionic-basic.yaml index 6239ef9..8a69a4d 100644 --- a/src/tests/bundles/bionic-basic.yaml +++ b/src/tests/bundles/bionic-basic.yaml @@ -11,10 +11,11 @@ applications: charm: cs:bionic/ubuntu num_units: 3 hacluster: - charm: cs:~openstack-charmers-next/hacluster + charm: cs:~openstack-charmers/hacluster options: corosync_transport: unicast cluster_count: 3 + channel: candidate compute: charm: cs:bionic/ubuntu num_units: 1 diff --git a/src/tests/bundles/focal-basic.yaml b/src/tests/bundles/focal-basic.yaml index 1c9fbd3..3f59af7 100644 --- a/src/tests/bundles/focal-basic.yaml +++ b/src/tests/bundles/focal-basic.yaml @@ -7,10 +7,11 @@ applications: num_units: 3 hacluster: - charm: cs:~openstack-charmers-next/hacluster + charm: cs:~openstack-charmers/hacluster options: corosync_transport: unicast cluster_count: 3 + channel: candidate compute: charm: cs:focal/ubuntu diff --git a/src/tests/bundles/groovy-basic.yaml b/src/tests/bundles/groovy-basic.yaml index 2dd056e..1c837f1 100644 --- a/src/tests/bundles/groovy-basic.yaml +++ b/src/tests/bundles/groovy-basic.yaml @@ -7,10 +7,11 @@ applications: num_units: 3 hacluster: - charm: cs:~openstack-charmers-next/hacluster + charm: cs:~openstack-charmers/hacluster options: corosync_transport: unicast cluster_count: 3 + channel: candidate compute: charm: cs:groovy/ubuntu diff --git a/src/tests/bundles/hirsute-basic.yaml b/src/tests/bundles/hirsute-basic.yaml index abaa5f8..2543f92 100644 --- a/src/tests/bundles/hirsute-basic.yaml +++ b/src/tests/bundles/hirsute-basic.yaml @@ -7,10 +7,11 @@ applications: num_units: 3 hacluster: - charm: cs:~openstack-charmers-next/hacluster + charm: cs:~openstack-charmers/hacluster options: corosync_transport: unicast cluster_count: 3 + channel: candidate compute: charm: cs:ubuntu diff --git a/src/tox.ini b/src/tox.ini index e763047..b40d295 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -22,12 +22,12 @@ skip_missing_interpreters = False requires = pip < 20.3 virtualenv < 20.0 # NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci -minversion = 3.2.0 +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 -whitelist_externals = juju +allowlist_externals = juju passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 1026b85..f7c2efa 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -1,4 +1,4 @@ -git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack +git+https://github.com/openstack/charms.openstack.git@stable/21.10#egg=charms.openstack -git+https://github.com/juju/charm-helpers.git#egg=charmhelpers +git+https://github.com/juju/charm-helpers.git@stable/21.10#egg=charmhelpers diff --git a/test-requirements.txt b/test-requirements.txt index af069e1..4afbb28 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,7 @@ # choices of *requirements.txt files for OpenStack Charms: # https://github.com/openstack-charmers/release-tools # +cffi==1.14.6; python_version < '3.6' # cffi 1.15.0 drops support for py35. setuptools<50.0.0 # https://github.com/pypa/setuptools/commit/04e3df22df840c6bb244e9b27bc56750c44b7c85 stestr>=2.2.0 @@ -33,7 +34,7 @@ mock>=1.2; python_version >= '3.6' nose>=1.3.7 coverage>=3.6 -git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack +git+https://github.com/openstack/charms.openstack.git@stable/21.10#egg=charms.openstack # # Revisit for removal / mock improvement: # diff --git a/tox.ini b/tox.ini index 5c81801..22159df 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,21 @@ envlist = pep8,py3 sitepackages = False # NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False +# NOTES: +# * We avoid the new dependency resolver by pinning pip < 20.3, see +# https://github.com/pypa/pip/issues/9187 +# * Pinning dependencies requires tox >= 3.2.0, see +# https://tox.readthedocs.io/en/latest/config.html#conf-requires +# * It is also necessary to pin virtualenv as a newer virtualenv would still +# lead to fetching the latest pip in the func* tox targets, see +# https://stackoverflow.com/a/38133283 +requires = + pip < 20.3 + virtualenv < 20.0 + setuptools<50.0.0 + +# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci +minversion = 3.18.0 [testenv] setenv = VIRTUAL_ENV={envdir} @@ -21,7 +36,7 @@ setenv = VIRTUAL_ENV={envdir} JUJU_REPOSITORY={toxinidir}/build passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY install_command = - pip install {opts} {packages} + {toxinidir}/pip.sh install {opts} {packages} deps = -r{toxinidir}/requirements.txt