[DPE-10843] refactor: adopt single-kernel update_config - #1849
Merged
Conversation
Merged
2 tasks
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
July 20, 2026 19:13
2abf30d to
8d2f8c8
Compare
2 tasks
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
3 times, most recently
from
July 23, 2026 18:18
130279e to
71f6116
Compare
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
August 18, 2026 19:39
aece4e4 to
43dac9e
Compare
1 task
Migrate the charm's update_config, resource introspection, and TLS reload onto the single-kernel library, now published as 16.3.5: the charm delegates Patroni config re-render to the lib's ConfigManager, reads available resources through the lib, and observes the lib's tls_files_pushed event for the TLS reload bridge. Drops the charm's now-redundant patroni.yml.j2 template and update_config tests. The pin moves from the pre-merge archive-URL SHA to the published 16.3.5 release (extras: postgresql, vm) -- same lib tree, now sourced from PyPI; the adoption code is unchanged. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
skl-01-adopt-update-config
branch
from
August 18, 2026 21:20
43dac9e to
429abf3
Compare
marceloneppel
marked this pull request as ready for review
August 19, 2026 04:14
marceloneppel
requested review from
carlcsaposs-canonical,
dragomirp,
juju-charm-bot and
taurus-forever
and removed request for
a team
August 19, 2026 04:14
dragomirp
previously approved these changes
Aug 19, 2026
taurus-forever
previously approved these changes
Aug 19, 2026
…e-config Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com> # Conflicts: # poetry.lock
marceloneppel
dismissed stale reviews from taurus-forever and dragomirp
via
August 19, 2026 13:32
8e2b9ec
taurus-forever
approved these changes
Aug 19, 2026
dragomirp
approved these changes
Aug 19, 2026
marceloneppel
added a commit
that referenced
this pull request
Aug 21, 2026
Merge origin/16/edge (28 commits) into the branch: dependency updates, docs removal, and the single-kernel lib 16.3.5 update_config adoption (#1849), which moved the worker-config and _api_update_config logic into the library. That refactor removed the charm-side _api_update_config that carried the DPE-10203 stale-standby fix, so the fix is re-applied at the new seam: update_config now clears the DCS standby_cluster when this cluster is the primary. The dead-DC recovery behavior survives the sync, with the regression test adapted to the new call path. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
added a commit
that referenced
this pull request
Aug 21, 2026
Merge the fixes branch after its sync with 16/edge (single-kernel lib 16.3.5 update_config adoption #1849 among 28 commits), so the stacked PR's diff and CI run against the current base. The charm-side sync moved the DPE-10203 stale-standby fix to the new update_config seam; this merge carries that over. The stacked branch's own planned-units regression tests are kept at the tail of the test file, replacing the worker-config tests the upstream refactor deleted. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
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 VM charm carried its own copy of the
update_configsubsystem (PostgreSQL parameter building →patroni.ymlrender → Patroni REST config patch → reload/restart decision → config-hash persistence), and its TLS reload bridge observedcertificate_availabledirectly. Both now live in thepostgresql-charms-single-kernellibrary; this PR makes the charm consume them.Solution
ConfigManager(constructor-injected withtls_manager,patroni_manager, and the three charm-owned bridgesrequest_restart/refresh_endpoints/restart_services); remove the charm's own copy of the subsystem andtemplates/patroni.yml.j2(the library owns them).tls_files_pushedevent instead of the fourcertificate_available/relation_brokenobservers, and drop the two guards (internal-capresent,client_tls_files_on_disk()) the bridge duplicated — the event fires only after a successful push, so a deferred push no longer triggers a reload against files that were never written.resource_provider, so the parameter sizing inupdate_configreads this unit's cpu/memory throughCharmState.available_resourcesrather than the workload directly. The library relocated that lookup behind a per-substrate provider.16.3.5release, with thepostgresqlandvmextras.Checklist