Skip to content

[DPE-11045] refactor(ldap): use the LDAP module from the single kernel library - #1935

Draft
marceloneppel wants to merge 5 commits into
16/edgefrom
dpe-ldap-vm-charm-migration
Draft

[DPE-11045] refactor(ldap): use the LDAP module from the single kernel library#1935
marceloneppel wants to merge 5 commits into
16/edgefrom
dpe-ldap-vm-charm-migration

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Sep 1, 2026

Copy link
Copy Markdown
Member

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_sync reads the auth parameters from the library handler). The library vendors and imports the glauth_k8s ldap interface library itself, so the charm no longer carries a copy.

ConfigManager.update_config in the library now sources the LDAP parameters from the injected handler, so the charm no longer threads ldap_parameters=self.get_ldap_parameters() through every update_config call.

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

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Sep 1, 2026
@marceloneppel marceloneppel added the enhancement New feature, UI change, or workload upgrade label Sep 2, 2026
@marceloneppel
marceloneppel force-pushed the dpe-ldap-vm-charm-migration branch from 44cf551 to 6326742 Compare September 2, 2026 13:19
@marceloneppel
marceloneppel force-pushed the dpe-ldap-vm-charm-migration branch 2 times, most recently from 41ce8b3 to 564b935 Compare September 2, 2026 15:26
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
marceloneppel force-pushed the dpe-ldap-vm-charm-migration branch 4 times, most recently from afa933e to b0b6d64 Compare September 2, 2026 18:47
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
marceloneppel force-pushed the dpe-ldap-vm-charm-migration branch from b0b6d64 to 718ac09 Compare September 2, 2026 19:32
@marceloneppel marceloneppel changed the title refactor(ldap): use the LDAP module from the single kernel library [DPE-11045] refactor(ldap): use the LDAP module from the single kernel library Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, UI change, or workload upgrade Libraries: Out of sync The charm libs used are out-of-sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant