Skip to content

[DPE-10735] feat(config): add peer-state config/user hash + tls unit accessors (1/6)#181

Merged
marceloneppel merged 1 commit into
16/edgefrom
skl-01-update-config-1-peer-accessors
Jul 21, 2026
Merged

[DPE-10735] feat(config): add peer-state config/user hash + tls unit accessors (1/6)#181
marceloneppel merged 1 commit into
16/edgefrom
skl-01-update-config-1-peer-accessors

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Jul 11, 2026

Copy link
Copy Markdown
Member

Issue

The update_config migration needs the config/user hash and the TLS flag to round-trip through the peer databag, as they do in both charms. This first step adds those accessors so later steps in the stack can read and persist them.

Solution

Add plain-databag accessors on the peer-relation state, mirroring the existing ip / is_connectivity_enabled pattern:

  • PostgreSQLPeer.config_hash / user_hash (str | None) and PostgreSQLApplication.user_hash.
  • PostgreSQLPeer.tls (bool) — getter reads "enabled", setter writes "enabled" / "".

First (code-only) PR in the update_config stack. Its unit tests land with the rest in the stack's test PR (#188).

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

Base automatically changed from tls-4-tests to 16/edge July 11, 2026 17:40
@marceloneppel
marceloneppel force-pushed the skl-01-update-config-1-peer-accessors branch from 22d4f17 to 10eea18 Compare July 20, 2026 13:22
@marceloneppel marceloneppel changed the title feat(config): add peer-state config/user hash + tls unit accessors feat(config): add peer-state config/user hash + tls unit accessors (1/5) Jul 20, 2026
@marceloneppel marceloneppel changed the title feat(config): add peer-state config/user hash + tls unit accessors (1/5) feat(config): add peer-state config/user hash + tls unit accessors (1/6) Jul 20, 2026
Scaffolds the config-subsystem port into the library: a later change
persists the applied config/user hashes and the last-rendered TLS flag
to peer relation data so the update_config manager can detect drift
without re-deriving it from live workload state. Add the plain-databag
accessors now so that change only wires them up.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel
marceloneppel force-pushed the skl-01-update-config-1-peer-accessors branch from 10eea18 to ee47a46 Compare July 20, 2026 19:04
@marceloneppel marceloneppel changed the title feat(config): add peer-state config/user hash + tls unit accessors (1/6) [DPE-10735] feat(config): add peer-state config/user hash + tls unit accessors (1/6) Jul 21, 2026
@marceloneppel
marceloneppel marked this pull request as ready for review July 21, 2026 12:26
@marceloneppel
marceloneppel requested a review from a team as a code owner July 21, 2026 12:26
@marceloneppel
marceloneppel requested review from carlcsaposs-canonical, dragomirp, juju-charm-bot and taurus-forever and removed request for a team July 21, 2026 12:26
@marceloneppel
marceloneppel merged commit 0832dd7 into 16/edge Jul 21, 2026
7 of 8 checks passed
@marceloneppel
marceloneppel deleted the skl-01-update-config-1-peer-accessors branch July 21, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants