Skip to content

feat(charms): wire the async replication subsystem into the charm composition root (5/8) - #281

Draft
marceloneppel wants to merge 1 commit into
async-replication-4-events-flowsfrom
async-replication-5-wiring
Draft

feat(charms): wire the async replication subsystem into the charm composition root (5/8)#281
marceloneppel wants to merge 1 commit into
async-replication-4-events-flowsfrom
async-replication-5-wiring

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

Connects the ported subsystem to the composition root, mirroring how the LDAP and database modules are wired.

Solution

  • AbstractPostgreSQLCharm constructs K8sManager (K8s substrate only, lazy import so the VM import graph never pulls lightkube), AsyncReplicationManager and PostgreSQLAsyncReplication; the k8s_manager construction moves out of PostgreSQLK8sCharm.
  • New charm bridges: set_app_status(status) (the production charms keep their refresh-priority/can_set_app_status gates behind it) and set_primary_status_message() (the VM _set_primary_status_message / K8s _set_active_status equivalents); minimal implementations in the library's VM/K8s charms plus K8s-only fix_leader_annotation/create_pgdata stubs.
  • events/postgresql.py guards the pre-existing charm.k8s_manager.update_pebble_layers() call against the now-Optional manager.

@marceloneppel
marceloneppel force-pushed the async-replication-4-events-flows branch from 1dffc73 to d1b2d71 Compare September 4, 2026 23:07
@marceloneppel
marceloneppel force-pushed the async-replication-5-wiring branch from 2e72d8d to 7cec1a1 Compare September 4, 2026 23:07
@marceloneppel
marceloneppel force-pushed the async-replication-4-events-flows branch from d1b2d71 to 7511e75 Compare September 4, 2026 23:22
@marceloneppel
marceloneppel force-pushed the async-replication-5-wiring branch from 7cec1a1 to fcb3a46 Compare September 4, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant