[DPE-10735] feat(config): add peer-state config/user hash + tls unit accessors (1/6)#181
Merged
Merged
Conversation
marceloneppel
force-pushed
the
skl-01-update-config-1-peer-accessors
branch
from
July 20, 2026 13:22
22d4f17 to
10eea18
Compare
2 tasks
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
force-pushed
the
skl-01-update-config-1-peer-accessors
branch
from
July 20, 2026 19:04
10eea18 to
ee47a46
Compare
marceloneppel
marked this pull request as ready for review
July 21, 2026 12:26
marceloneppel
requested review from
carlcsaposs-canonical,
dragomirp,
juju-charm-bot and
taurus-forever
and removed request for
a team
July 21, 2026 12:26
carlcsaposs-canonical
approved these changes
Jul 21, 2026
dragomirp
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
The
update_configmigration 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_enabledpattern:PostgreSQLPeer.config_hash/user_hash(str | None) andPostgreSQLApplication.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