[DPE-11045] refactor(ldap): use the LDAP module from the single kernel library - #1935
Draft
marceloneppel wants to merge 5 commits into
Draft
[DPE-11045] refactor(ldap): use the LDAP module from the single kernel library#1935marceloneppel wants to merge 5 commits into
marceloneppel wants to merge 5 commits into
Conversation
marceloneppel
force-pushed
the
dpe-ldap-vm-charm-migration
branch
from
September 2, 2026 13:19
44cf551 to
6326742
Compare
2 tasks
marceloneppel
force-pushed
the
dpe-ldap-vm-charm-migration
branch
2 times, most recently
from
September 2, 2026 15:26
41ce8b3 to
564b935
Compare
The LDAP relation module now lives in the postgresql-charms-single-kernel library, ported from the identical VM and K8s implementations, so the charm no longer carries its own copy: it consumes the library's LDAP handler and drops the ldap_parameters argument threaded through every update_config call, which the config manager now sources internally. The charm keeps the LDAP-sync snap service lifecycle (_setup_ldap_sync reads the parameters from the library handler) and its charmhub-fetched copy of the glauth_k8s ldap interface library, which the library class imports at runtime. The library is pinned to a commit containing the migrated LDAP module because no release carries it yet; the pin moves to a released version once the library PRs merge. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
dpe-ldap-vm-charm-migration
branch
4 times, most recently
from
September 2, 2026 18:47
afa933e to
b0b6d64
Compare
Picks up the 16.3.8 version bump commit that the release flow needs on merge; the migration content is unchanged (e2d6d06 plus the bump). Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Nothing imports it since the charm consumes the library's LDAP handler; keeping it would leave a dead copy that drifts from the library port. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
After the LDAP module moved into the library, nothing on the charm side imports the charmhub-fetched copy anymore: the library handler consumes its own vendored copy, and charmcraft.yaml never declared the glauth lib. Keeping it would only let the two copies drift apart. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
The re-lock silently downgraded packages relative to 16/edge: the repo's solver policy (min-release-age = 1 day) excludes the releases that recent lock maintenance picked while they are still inside their freshness window. This restores the base lock and changes only the library entry to the pinned commit, so the diff carries no dependency churn. Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
marceloneppel
force-pushed
the
dpe-ldap-vm-charm-migration
branch
from
September 2, 2026 19:32
b0b6d64 to
718ac09
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 LDAP module migration into the single kernel library (postgresql-single-kernel-library #235, #236).
Solution
The charm drops its own LDAP module in favour of the library's substrate-neutral LDAP events handler, ported from the VM and K8s implementations. The charm keeps the substrate-specific LDAP-sync snap service lifecycle (
_setup_ldap_syncreads the auth parameters from the library handler). The library vendors and imports theglauth_k8sldap interface library itself, so the charm no longer carries a copy.ConfigManager.update_configin the library now sources the LDAP parameters from the injected handler, so the charm no longer threadsldap_parameters=self.get_ldap_parameters()through everyupdate_configcall.The library dependency is pinned to the migration head via its GitHub archive tarball (
url = "…/archive/<commit>.tar.gz"), which pip hash-verifies like any sdist, so charm builds resolve it today. Once the library PRs merge, 16.3.8 publishes and the pin moves to the released version.Checklist