refactor(observers): use the observers module from the single kernel library - #1940
Draft
marceloneppel wants to merge 1 commit into
Draft
refactor(observers): use the observers module from the single kernel library#1940marceloneppel wants to merge 1 commit into
marceloneppel wants to merge 1 commit into
Conversation
This was referenced Sep 4, 2026
Draft
Draft
…library The charm drops its own cluster topology observer module, observer scripts, and raft-observer systemd templates in favour of the library's observer handlers and package-shipped scripts, ported from the VM and K8s implementations (postgresql-single-kernel-library #258-#263). The charm keeps the event wiring and its _on_cluster_topology_change / _on_raft_reconnect / _on_databases_change handlers, and the observer is now constructed with the charm state and the JUJU_EXECUTABLE literal instead of a magic string; the library dependency is pinned to the migration head via its GitHub archive tarball, which pip hash-verifies like any sdist, so charm builds stay reproducible. Draft pin; flips to the released PyPI version before review. The charm-side script tests moved into the library stack (4/6); the handler tests stay and now patch the library state (peer_relation/peer_members_ips) the handler reads instead of the dropped charm properties. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
observers-vm-charm-migration
branch
from
September 4, 2026 21:27
a8d27d0 to
4b775cf
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
Follows the observers module migration into the single kernel library (postgresql-single-kernel-library #258-#263).
Solution
The charm drops its own cluster topology observer module, the
cluster_topology_observer/raft_observerscripts, and the raft-observer systemd templates in favour of the library's substrate observers and package-shipped scripts, ported from the VM and K8s implementations. The charm keeps the event wiring and its_on_cluster_topology_change/_on_raft_reconnect/_on_databases_changehandlers; the observer is now constructed with the charm state and theJUJU_EXECUTABLEliteral instead of a magic string.The library dependency is pinned to the migration head via its GitHub archive tarball (url = ".../archive/.tar.gz"), which pip hash-verifies like any sdist, so charm builds stay reproducible. Draft pin: flips to the released PyPI version before review.
The charm-side script tests moved into the library stack (#261); the handler tests stay and now patch the library state (
peer_relation/peer_members_ips) the handler reads instead of the dropped charm properties.Checklist