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

Avoid broken macaroonbakery release #630

Merged
merged 6 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.8]

steps:
- uses: actions/checkout@v1
Expand All @@ -34,27 +34,22 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
juju_channel:
- latest/stable
- 2.9/stable
- 2.8/stable
bundle:
- first
- second
- third
exclude:
# disable 'first' and 'second' bundles for juju 2.8 since 'magpie'
# is not a promulgated charm in the charmstore, only on charmhub
# which 2.8 can't talk to.
- juju_channel: 2.8/stable
bundle: first
- juju_channel: 2.8/stable
bundle: second
env:
TEST_ZAZA_BUG_LP1987332: "on" # http://pad.lv/1987332
needs: build
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
set -euxo pipefail
Expand All @@ -67,6 +62,8 @@ jobs:
sudo chmod 666 /var/snap/lxd/common/lxd/unix.socket
# until Juju provides stable IPv6-support we unfortunately need this
lxc network set lxdbr0 ipv6.address none
sudo iptables -F FORWARD
sudo iptables -P FORWARD ACCEPT
# pull images
lxc image copy --alias juju/bionic/amd64 --copy-aliases ubuntu-daily:bionic local:
lxc image copy --alias juju/focal/amd64 --copy-aliases ubuntu-daily:focal local:
Expand Down
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
pyparsing<3.0.0 # pin for aodhclient which is held for py35
aiounittest
async_generator
juju<3.0
juju<2.9.45.0; python_version < '3.8'
juju<3.0; python_version >= '3.8'
kubernetes<18.0.0; python_version < '3.6' # pined, as juju uses kubernetes
juju_wait
PyYAML>=3.0
Expand Down Expand Up @@ -41,3 +42,6 @@ python-libmaas
# Documentation requirements
sphinx
sphinxcontrib-asyncio
# https://github.com/go-macaroon-bakery/py-macaroon-bakery/issues/94
macaroonbakery!=1.3.3
openstacksdk<=1.5.0; # Pin to a lower version of openstacksdk due to introduced libraries
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
'PyYAML',
'tenacity',
'python-libmaas',

# https://github.com/go-macaroon-bakery/py-macaroon-bakery/issues/94
'macaroonbakery != 1.3.3',
]

tests_require = [
Expand Down
10 changes: 6 additions & 4 deletions unit_tests/test_zaza_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ def test_block_until_auto_reconnect_model_disconnected_sync(self):
# model.disconnect and model.connect should've each have been called
# twice, once for run_in_model, and once each for the disconnection.
self.Model_mock.disconnect.assert_has_calls([mock.call(), mock.call()])
self.Model_mock.connect_model.has_calls([mock.call('modelname'),
mock.call('modelname')])
self.Model_mock.connect_model.assert_has_calls(
[mock.call('modelname'), mock.call('testmodel')]
)

def test_block_until_auto_reconnect_model_disconnected_async(self):
self._mocks_for_block_until_auto_reconnect_model(
Expand All @@ -450,8 +451,9 @@ async def _async_true():
# model.disconnect and model.connect should've each have been called
# twice, once for run_in_model, and once each for the disconnection.
self.Model_mock.disconnect.assert_has_calls([mock.call(), mock.call()])
self.Model_mock.connect_model.has_calls([mock.call('modelname'),
mock.call('modelname')])
self.Model_mock.connect_model.assert_has_calls(
[mock.call('modelname'), mock.call('testmodel')]
)

def test_block_until_auto_reconnect_model_blocks_till_true(self):
self._mocks_for_block_until_auto_reconnect_model(True, True)
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/utilities/test_zaza_utilities_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_series_upgrade(self):
_unit, _machine_num, origin=_origin,
to_series=_to_series, from_series=_from_series,
workaround_script=_workaround_script, files=_files)
self.block_until_all_units_idle.called_with()
self.block_until_all_units_idle.assert_called_with()
self.prepare_series_upgrade.assert_called_once_with(
_machine_num, to_series=_to_series)
self.wrap_do_release_upgrade.assert_called_once_with(
Expand Down
Loading