feat(config): complete update_config with API apply, restart engine, and bridges (4/6)#180
Draft
marceloneppel wants to merge 1 commit into
Draft
Conversation
marceloneppel
changed the base branch from
tls-4-tests
to
skl-01-update-config-3-template
July 11, 2026 01:42
marceloneppel
force-pushed
the
skl-01-update-config-3-template
branch
from
July 11, 2026 16:12
cba92af to
fdf2a44
Compare
marceloneppel
force-pushed
the
feature/migrate-update-config
branch
from
July 11, 2026 16:12
08f5993 to
40752dd
Compare
marceloneppel
force-pushed
the
skl-01-update-config-3-template
branch
from
July 20, 2026 13:22
fdf2a44 to
ef76d9a
Compare
marceloneppel
force-pushed
the
feature/migrate-update-config
branch
from
July 20, 2026 13:22
40752dd to
912b1a4
Compare
2 tasks
marceloneppel
force-pushed
the
skl-01-update-config-3-template
branch
from
July 20, 2026 19:04
ef76d9a to
d994db8
Compare
marceloneppel
force-pushed
the
feature/migrate-update-config
branch
2 times, most recently
from
July 20, 2026 20:25
9efcc0a to
e80e84f
Compare
…and bridges The library now owns the full config-update flow (steps 3-10) instead of the charm. update_config renders, applies Patroni-controlled parameters via the API, runs the TLS/pending-restart decision engine, honors the VM snap gate, and persists the config/user hashes -- all in the lib. The substrate-tangled pieces of the restart trigger, endpoint refresh, and monitoring/LDAP service restarts ride charm-side through three injected bridge callables (request_restart, refresh_endpoints, restart_services) until their own migration phases, so the two HIGH-risk substrate diffs in the restart trigger (VM pops postgresql_restarted; K8s updates the metrics scrape job) stay out of the library. is_tls_enabled and generate_config_hash internalize; user_hash stays injected. The config hash is byte-compatible with the charm's, so charm adoption does not force a spurious restart. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
skl-01-update-config-3-template
branch
from
July 21, 2026 17:46
d994db8 to
f5d55f2
Compare
marceloneppel
force-pushed
the
feature/migrate-update-config
branch
from
July 21, 2026 17:46
e80e84f to
113b21b
Compare
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 capstone of the migration: the
update_configorchestration itself — apply the Patroni REST API config patch, decide reload-vs-restart, and persist the config hash — plus the charm-owned bridges it calls back into.Solution
managers/config.py:update_configorchestration wiringapply_api_config,handle_restart_need,is_tls_enabled,is_restart_pending,generate_config_hash, and config-hash persistence.request_restart,refresh_endpoints,restart_services), matching the TLS migration's collaborator-injection pattern; declared@abstractmethodon the abstract charm and stubbed per substrate.apply_api_configdirectly.Final (code-only) PR in the update_config stack; the
ConfigManagerconstructor grows to seven args, so the minimal fixture update to keep the suite green rides here, and the new unit tests land in the stack's test PR (#188). Charm adoption — deleting the charm-side copies, catchingDeployedWithoutTrustError, wiring the bridges — follows in per-charm PRs once the lib is released.Checklist