Skip to content

[DPE-10203] refactor(async-replication): use the async replication module from the single kernel library - #1944

Draft
marceloneppel wants to merge 1 commit into
16/edgefrom
dpe-10203-migrate-async-replication-vm
Draft

[DPE-10203] refactor(async-replication): use the async replication module from the single kernel library#1944
marceloneppel wants to merge 1 commit into
16/edgefrom
dpe-10203-migrate-async-replication-vm

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Sep 4, 2026

Copy link
Copy Markdown
Member

Issue

Adopts the async-replication module from the single kernel library, following its migration series (postgresql-single-kernel-library #277#284, ported from the VM and K8s charm modules). The library stack head pinned here (aa9d9ad29874841c4ce0ce1ec2c97bb5afcf1805) includes the DPE-10203 dead-datacenter recovery changes from #1913.

Solution

  • Drops src/relations/async_replication.py in favour of the library's PostgreSQLAsyncReplication events handler and AsyncReplicationManager, constructed by the charm as composition root with the watcher relation injected (watcher=self.watcher_offer) — the handler calls back through the update_config/set_unit_status/set_app_status/set_primary_status_message bridges, so the refresh-priority status gate stays charm-owned.
  • Applies the [DPE-10203] fix(async-replication): recover async replication after a dead datacenter #1913 charm-side changes: the _planned_units goal-state fallback (used by _set_primary_status_message and the backups pre-checks), clear_stale_promotion() on update-status, and the stale standby_cluster DCS clear in update_config when no async primary endpoint remains.
  • pyproject.toml/poetry.lock pin postgresql-charms-single-kernel to the library stack archive until the series merges and 16.3.13 is released.

Provenance: ported from this module at 03494fb plus #1913 (dpe-10203-async-replication-recovery); unit tests ported to the library handler surface with the #1913 test semantics preserved.

@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Sep 4, 2026
@marceloneppel
marceloneppel force-pushed the dpe-10203-migrate-async-replication-vm branch from 6996063 to cdb5708 Compare September 4, 2026 23:08
…dule from the single kernel library

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel
marceloneppel force-pushed the dpe-10203-migrate-async-replication-vm branch from cdb5708 to 00ce996 Compare September 4, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant