diff --git a/lib/charms/postgresql_k8s/v0/postgresql.py b/lib/charms/postgresql_k8s/v0/postgresql.py index ca0826ffa2..e55cf00ff8 100644 --- a/lib/charms/postgresql_k8s/v0/postgresql.py +++ b/lib/charms/postgresql_k8s/v0/postgresql.py @@ -36,7 +36,7 @@ # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 39 +LIBPATCH = 40 INVALID_EXTRA_USER_ROLE_BLOCKING_MESSAGE = "invalid role(s) for extra user roles" diff --git a/src/constants.py b/src/constants.py index 5e256d35e2..6de25f4cd6 100644 --- a/src/constants.py +++ b/src/constants.py @@ -34,7 +34,7 @@ SNAP_PACKAGES = [ ( POSTGRESQL_SNAP_NAME, - {"revision": {"aarch64": "137", "x86_64": "136"}}, + {"revision": {"aarch64": "138", "x86_64": "139"}}, ) ] diff --git a/src/dependency.json b/src/dependency.json index 5a0a238746..cc4e9f524d 100644 --- a/src/dependency.json +++ b/src/dependency.json @@ -9,6 +9,6 @@ "dependencies": {}, "name": "charmed-postgresql", "upgrade_supported": "^16", - "version": "16.4" + "version": "16.6" } } diff --git a/src/upgrade.py b/src/upgrade.py index c14b612548..3f7c183e16 100644 --- a/src/upgrade.py +++ b/src/upgrade.py @@ -115,7 +115,7 @@ def _on_upgrade_charm_check_legacy(self) -> None: "dependencies": {}, "name": "charmed-postgresql", "upgrade_supported": "^16", - "version": "16.4", + "version": "16.6", } self.peer_relation.data[self.charm.app].update({ "dependencies": json.dumps(fixed_dependencies) diff --git a/tests/integration/ha_tests/test_upgrade.py b/tests/integration/ha_tests/test_upgrade.py index ff34eae500..749615825c 100644 --- a/tests/integration/ha_tests/test_upgrade.py +++ b/tests/integration/ha_tests/test_upgrade.py @@ -30,7 +30,6 @@ @pytest.mark.group(1) -@pytest.mark.unstable @pytest.mark.abort_on_fail async def test_deploy_latest(ops_test: OpsTest) -> None: """Simple test to ensure that the PostgreSQL and application charms get deployed.""" @@ -54,7 +53,6 @@ async def test_deploy_latest(ops_test: OpsTest) -> None: @pytest.mark.group(1) -@pytest.mark.unstable @pytest.mark.abort_on_fail async def test_pre_upgrade_check(ops_test: OpsTest) -> None: """Test that the pre-upgrade-check action runs successfully.""" @@ -68,7 +66,6 @@ async def test_pre_upgrade_check(ops_test: OpsTest) -> None: @pytest.mark.group(1) -@pytest.mark.unstable @pytest.mark.abort_on_fail async def test_upgrade_from_edge(ops_test: OpsTest, continuous_writes) -> None: # Start an application that continuously writes data to the database. @@ -119,7 +116,6 @@ async def test_upgrade_from_edge(ops_test: OpsTest, continuous_writes) -> None: @pytest.mark.group(1) -@pytest.mark.unstable @pytest.mark.abort_on_fail async def test_fail_and_rollback(ops_test, continuous_writes) -> None: # Start an application that continuously writes data to the database. diff --git a/tests/unit/test_backups.py b/tests/unit/test_backups.py index 15bd2e8112..4e6153ee8a 100644 --- a/tests/unit/test_backups.py +++ b/tests/unit/test_backups.py @@ -202,7 +202,7 @@ def test_can_use_s3_repository(harness): patch("charm.Patroni.member_started", new_callable=PropertyMock) as _member_started, patch("charm.PostgresqlOperatorCharm.update_config") as _update_config, patch( - "charm.Patroni.get_postgresql_version", return_value="16.4" + "charm.Patroni.get_postgresql_version", return_value="16.6" ) as _get_postgresql_version, patch("charm.PostgresqlOperatorCharm.postgresql") as _postgresql, patch( diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index 2b47be3ca9..d6a158d24e 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -623,7 +623,7 @@ def test_on_start(harness): side_effect=[False, True, True, True, True, True], ) as _is_storage_attached, ): - _get_postgresql_version.return_value = "16.4" + _get_postgresql_version.return_value = "16.6" # Test without storage. harness.charm.on.start.emit() @@ -709,7 +709,7 @@ def test_on_start_replica(harness): return_value=True, ) as _is_storage_attached, ): - _get_postgresql_version.return_value = "16.4" + _get_postgresql_version.return_value = "16.6" # Set the current unit to be a replica (non leader unit). harness.set_leader(False) @@ -768,7 +768,7 @@ def test_on_start_no_patroni_member(harness): bootstrap_cluster = patroni.return_value.bootstrap_cluster bootstrap_cluster.return_value = True - patroni.return_value.get_postgresql_version.return_value = "16.4" + patroni.return_value.get_postgresql_version.return_value = "16.6" harness.set_leader() harness.charm.on.start.emit() diff --git a/tests/unit/test_cluster.py b/tests/unit/test_cluster.py index 55fe81f797..180db17274 100644 --- a/tests/unit/test_cluster.py +++ b/tests/unit/test_cluster.py @@ -165,11 +165,11 @@ def test_get_postgresql_version(peers_ips, patroni): _get_installed_snaps = _snap_client.return_value.get_installed_snaps _get_installed_snaps.return_value = [ {"name": "something"}, - {"name": "charmed-postgresql", "version": "16.4"}, + {"name": "charmed-postgresql", "version": "16.6"}, ] version = patroni.get_postgresql_version() - assert version == "16.4" + assert version == "16.6" _snap_client.assert_called_once_with() _get_installed_snaps.assert_called_once_with() @@ -314,7 +314,7 @@ def test_render_patroni_yml_file(peers_ips, patroni): patch("charm.Patroni.render_file") as _render_file, patch("charm.Patroni._create_directory"), ): - _get_postgresql_version.return_value = "16.4" + _get_postgresql_version.return_value = "16.6" # Define variables to render in the template. member_name = "postgresql-0"