From 948d84e917f446ed37c276a1a8535556d24ca796 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Wed, 3 Jul 2024 14:53:48 +0300 Subject: [PATCH 1/2] Add jinja2 as a dependency --- poetry.lock | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index fdd11b394b..e7755c8baa 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2343,4 +2343,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "ab522fe757cc1965bdd599713eb04b06b1defc8a62d315e7607f338bd714b56c" +content-hash = "cad223780f0045e4eb74b9cddbf43133e55e639ea869765fe2d5de1d97af29cf" diff --git a/pyproject.toml b/pyproject.toml index e985ebe74e..b712187a9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ cosl = "^0.0.12" pydantic = "^1.10.17" poetry-core = "^1.9.0" pyOpenSSL = "^24.1.0" +jinja2 = "^3.1.4" [tool.poetry.group.charm-libs.dependencies] # data_platform_libs/v0/data_interfaces.py @@ -61,7 +62,6 @@ pytest = "^8.2.2" pytest-asyncio = "*" parameterized = "^0.9.0" jsonschema = "^4.22.0" -jinja2 = "^3.1.4" [tool.poetry.group.integration] optional = true From 35e3e86be0387da76fcc1840a066c5a2d0cfca35 Mon Sep 17 00:00:00 2001 From: Dragomir Penev Date: Thu, 4 Jul 2024 17:45:49 +0300 Subject: [PATCH 2/2] Bump libs --- lib/charms/data_platform_libs/v0/upgrade.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/charms/data_platform_libs/v0/upgrade.py b/lib/charms/data_platform_libs/v0/upgrade.py index 18a58ff09e..4d909d644d 100644 --- a/lib/charms/data_platform_libs/v0/upgrade.py +++ b/lib/charms/data_platform_libs/v0/upgrade.py @@ -285,7 +285,7 @@ def restart(self, event) -> None: # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 17 +LIBPATCH = 18 PYDEPS = ["pydantic>=1.10,<2", "poetry-core"] @@ -921,7 +921,7 @@ def _on_upgrade_charm(self, event: UpgradeCharmEvent) -> None: self.charm.unit.status = WaitingStatus("other units upgrading first...") self.peer_relation.data[self.charm.unit].update({"state": "ready"}) - if self.charm.app.planned_units() == 1: + if len(self.app_units) == 1: # single unit upgrade, emit upgrade_granted event right away getattr(self.on, "upgrade_granted").emit()