Repository navigation
feat(charm): consume the single-kernel library for the remaining VM modules - #2033
Draft
marceloneppel wants to merge 14 commits into
Draft
marceloneppel wants to merge 14 commits into
marceloneppel wants to merge 14 commits into
Conversation
marceloneppel
force-pushed
the
migration-vm-consume
branch
7 times, most recently
from
October 12, 2026 16:01
25f8f45 to
78d5fa1
Compare
Drop the raft-observer/cluster/rotate-logs modules and their templates; construct TLSTransfer from the lib; import charm_tracing_config from the lib; drop the charm-level config plumbing in favor of CharmState.config.
…yaml The union resolution left a second default/description block under plugin_orafce_enable (the pg-cron block whose header the merge lost); upstream 16/edge dropped plugin_pg_cron_enable entirely, so the stub is removed rather than re-headed. charmcraft pack fails on the duplicate 'default' key.
The lib resolves its callback by name (getattr(charm, callback.__name__)), so a bound method on the events handler raised AttributeError on every restart flow.
marceloneppel
force-pushed
the
migration-vm-consume
branch
2 times, most recently
from
October 13, 2026 16:46
8900477 to
e02ed4d
Compare
# Conflicts: # src/charm.py # tests/unit/test_charm.py # tests/unit/test_tls.py
marceloneppel
force-pushed
the
migration-vm-consume
branch
from
October 13, 2026 16:47
e02ed4d to
b4c1487
Compare
marceloneppel
force-pushed
the
migration-vm-consume
branch
from
October 13, 2026 23:46
bde98af to
fa62425
Compare
The thin charm dropped trunk's first-platform-import try/except; wrong-arch deploys died at import time with an error unit instead of the blocked warning charm (test_wrong_arch).
marceloneppel
force-pushed
the
migration-vm-consume
branch
from
October 14, 2026 00:01
fa62425 to
723f665
Compare
Ports the test_refresh_to_local_charm rewrite from #2036: wait for the "Refresh incompatible" block (unreleased PR builds always block), force the refresh with a 30-minute budget, and gate the final active+idle wait on the statuses' since timestamps so the pre-refresh state cannot pass vacuously.
This branch has not been deployed
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 still owns ~2,700 lines of logic the library now owns (lifecycle flows, membership, config, TLS seams, charm class). Final state: no logic charm-side.
Solution
src/charm.pyrewritten to the thin end-state: a class extending the libPostgreSQLVMCharm, the COS requirer construction (grafana-agent, rolling-ops, tracing — the charm libs stay charm-side), the dash-fallbackconfigoverride, andops.main.Deleted (now lib-owned):
src/{cluster,cluster_topology_observer,rotate_logs}.py,scripts/{__init__,cluster_topology_observer,raft_observer,rotate_logs}.py, andtemplates/raft-observer.{service,timer}.j2.src/constants.pystays: three integration suites import its RAFT/Patroni path literals and one of them has no lib-literal equivalent.Pin bump:
postgresql-charms-single-kernel-> themigration-integrationarchive SHA (f776686250a0dad5c17a9e415c36294fe65274db, 16.3.17); poetry lock regenerated with poetry 2.5.1, diff confined to the lib package block + content-hash.actions.yaml: adds thestatus-detailaction the lib StatusHandler observes (was only on the lib's test-charm metadata).Unit tests: migrated suites deleted (
test_cluster,test_cluster_topology_observer,test_rotate_logs);test_charm.pytrimmed to the still-charm-side surface (config fallback), retargeted to the lib seams (render_file/is_patroni_runningno-op guards); a lib-sidetest_charm.pytest-charm actions file added.Deletion bulk disclosure: ~5,900 gross deleted lines (the plan's ~1,900 estimate was low — the union base already carried the [DPE-7882] Reinstate logical replication on the single-kernel library #1941/test(logical-replication): cover the basic, re-relation and guard scenarios #1978 test additions); net ≈ −5,750.
The frozen PRs' changes ride in via the base branch (
vm-migration-base).Post-audit pass:
TLSTransferwired (the VM charm constructs it charm-side and injects it), the lib tracing helper consumed (the module-level URL-basedcharm_tracingshim dropped), the transitional config plumbing dropped (CharmState.configimplements the identical dash-fallback), and the retainedtest_charm.pyconfig test retargeted tostate.config.Pin updated to the post-audit
migration-integration(f776686250a0dad5c17a9e415c36294fe65274db): the lib slice tips gained the disclosed VM-flow fixes.Checklist