Skip to content

Commit

Permalink
Pin tox to < 4.0.0
Browse files Browse the repository at this point in the history
Tox 4.0.0 was recently released and it has several breaking changes.
We pin to < 4.0.0 here. We are planning to move forward only on the
master charm branches.

Tox is also pinned to < 4.0.0 for stable branches in upstream
openstack-zuul-jobs as well as in zosci-config. However, the
requires= section in the charm's tox.ini file ends up installing
tox>4, wiping out the zuul-pinned tox<4 that was already installed
installed. This patch fixes that.

Related-Bug: #2002788
Change-Id: Ib3af2849d6d9ee660f1bb641eb16ff3f1c384a61
func-test-pr: openstack-charmers/zaza-openstack-tests#1019
  • Loading branch information
Corey Bryant authored and lmlg committed Mar 9, 2023
1 parent ea8147a commit f4797ce
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 40 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# requirements
git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
git+https://github.com/canonical/operator.git#egg=ops
ops<=1.6.0
git+https://github.com/juju/charm-helpers.git@stable/yoga#egg=charmhelpers
git+https://opendev.org/openstack/charm-ops-interface-ceph-client#egg=interface_ceph_client
git+https://opendev.org/openstack/charm-ops-openstack#egg=ops_openstack
git+https://opendev.org/openstack/charm-ops-interface-tls-certificates#egg=interface_tls_certificates
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is managed centrally. If you find the need to modify this as a
# one-off, please don't. Intead, consult #openstack-charms and ask about
# requirements management in charms via bot-control. Thank you.
charm-tools>=2.4.4
charm-tools==2.8.4
coverage>=3.6
mock>=1.2
flake8>=2.2.4,<=2.4.1
Expand Down
18 changes: 8 additions & 10 deletions tests/bundles/focal-ec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ machines:
'15':
applications:
ubuntu:
charm: cs:ubuntu
charm: ch:ubuntu
num_units: 3
to:
- '7'
Expand All @@ -36,11 +36,9 @@ applications:
pool-type: erasure-coded
ec-profile-k: 4
ec-profile-m: 2
# Use proposed until fix for #1883112 is backported
source: distro-proposed
to:
- '0'
- '1'
- '6'
- '7'
ceph-osd:
charm: ch:ceph-osd
num_units: 6
Expand All @@ -55,7 +53,7 @@ applications:
- '11'
- '12'
- '13'
channel: latest/edge
channel: quincy/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
Expand All @@ -65,24 +63,24 @@ applications:
- '3'
- '4'
- '5'
channel: latest/edge
channel: quincy/edge
vault:
num_units: 1
charm: ch:vault
to:
- '6'
channel: latest/edge
channel: 1.7/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '8'
- '9'
- '10'
channel: latest/edge
channel: 8.0/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
channel: 8.0/edge
relations:
- - 'ceph-mon:client'
- 'ceph-iscsi:ceph-client'
Expand Down
18 changes: 8 additions & 10 deletions tests/bundles/focal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ machines:
'17':
applications:
ubuntu:
charm: cs:ubuntu
charm: ch:ubuntu
num_units: 3
to:
- '7'
Expand All @@ -35,11 +35,9 @@ applications:
num_units: 4
options:
gateway-metadata-pool: iscsi-foo-metadata
# Use proposed until fix for #1883112 is backported
source: distro-proposed
to:
- '0'
- '1'
- '6'
- '7'
- '16'
- '17'
ceph-osd:
Expand All @@ -56,7 +54,7 @@ applications:
- '11'
- '12'
- '13'
channel: latest/edge
channel: quincy/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
Expand All @@ -66,24 +64,24 @@ applications:
- '3'
- '4'
- '5'
channel: latest/edge
channel: quincy/edge
vault:
num_units: 1
charm: ch:vault
to:
- '6'
channel: latest/edge
channel: 1.7/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '8'
- '9'
- '10'
channel: latest/edge
channel: 8.0/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
channel: 8.0/edge
relations:
- - 'ceph-mon:client'
- 'ceph-iscsi:ceph-client'
Expand Down
16 changes: 8 additions & 8 deletions tests/bundles/jammy-ec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ machines:
'15':
applications:
ubuntu:
charm: cs:ubuntu
charm: ch:ubuntu
num_units: 3
to:
- '7'
Expand All @@ -37,8 +37,8 @@ applications:
ec-profile-k: 4
ec-profile-m: 2
to:
- '0'
- '1'
- '6'
- '7'
ceph-osd:
charm: ch:ceph-osd
num_units: 6
Expand All @@ -53,7 +53,7 @@ applications:
- '11'
- '12'
- '13'
channel: latest/edge
channel: quincy/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
Expand All @@ -63,24 +63,24 @@ applications:
- '3'
- '4'
- '5'
channel: latest/edge
channel: quincy/edge
vault:
num_units: 1
charm: ch:vault
to:
- '6'
channel: latest/edge
channel: 1.7/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '8'
- '9'
- '10'
channel: latest/edge
channel: 8.0/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
channel: 8.0/edge
relations:
- - 'ceph-mon:client'
- 'ceph-iscsi:ceph-client'
Expand Down
14 changes: 7 additions & 7 deletions tests/bundles/jammy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ applications:
options:
gateway-metadata-pool: iscsi-foo-metadata
to:
- '0'
- '1'
- '6'
- '7'
- '16'
- '17'
ceph-osd:
Expand All @@ -54,7 +54,7 @@ applications:
- '11'
- '12'
- '13'
channel: latest/edge
channel: quincy/edge
ceph-mon:
charm: ch:ceph-mon
num_units: 3
Expand All @@ -64,24 +64,24 @@ applications:
- '3'
- '4'
- '5'
channel: latest/edge
channel: quincy/edge
vault:
num_units: 1
charm: ch:vault
to:
- '6'
channel: latest/edge
channel: 1.7/edge
mysql-innodb-cluster:
charm: ch:mysql-innodb-cluster
num_units: 3
to:
- '8'
- '9'
- '10'
channel: latest/edge
channel: 8.0/edge
vault-mysql-router:
charm: ch:mysql-router
channel: latest/edge
channel: 8.0/edge
relations:
- - 'ceph-mon:client'
- 'ceph-iscsi:ceph-client'
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ skip_missing_interpreters = False
requires = pip < 20.3
virtualenv < 20.0
setuptools < 50.0.0
tox < 4.0.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.2.0

Expand Down
5 changes: 3 additions & 2 deletions unit_tests/test_ceph_iscsi_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def network_get(self, endpoint_name, relation_id=None):
return network_data

self.harness._backend = _TestingOPSModelBackend(
self.harness._unit_name, self.harness._meta)
self.harness._unit_name, self.harness._meta,
{'options': {'gateway-metadata-pool': {'type': 'string'}}})
self.harness._model = model.Model(
self.harness._meta,
self.harness._backend)
Expand Down Expand Up @@ -398,7 +399,7 @@ def test_on_pools_available(self):
rel_id,
'ceph-iscsi',
{'admin_password': 'existing password',
'gateway_ready': False})
'gateway_ready': 'False'})
self.harness.begin()
self.harness.charm.ceph_client._stored.pools_available = True
with patch.object(Path, 'mkdir') as mock_mkdir:
Expand Down

0 comments on commit f4797ce

Please sign in to comment.