Skip to content

patch: consume single-kernel lib 16.3.9 - #1997

Draft
marceloneppel wants to merge 3 commits into
16/edgefrom
pin-lib-80bce27
Draft

marceloneppel wants to merge 3 commits into
16/edgefrom
pin-lib-80bce27

Conversation

@marceloneppel

@marceloneppel marceloneppel commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Issue

The single-kernel library published 16.3.9 (cut from 16/edge head 80bce27e683c262d14bc978838d95a72bc2ba7d2, lib PR canonical/postgresql-single-kernel-library#324) with a breaking CharmState API: s3_requirer: S3Requirer is now a required constructor argument.

Solution

  • Consume postgresql-charms-single-kernel 16.3.9 from PyPI with extras ["postgresql", "vm"]; poetry.lock refreshed, poetry check --lock green.
  • Minimal charm-side adaptation (backups/restore logic stays charm-owned until the backups-adopt-lib migration lands):
    • charm.py constructs one lib-vendored S3Requirer(self, "s3-parameters") and passes it to CharmState.
    • PostgreSQLBackups receives that instance (s3_requirer= kwarg) instead of constructing its own.
    • src/backups.py imports its s3 interface classes from the lib-vendored module; unit-test patch targets for get_s3_connection_info updated to match.

Checklist

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

… URL

Consume the lib from the current 16/edge HEAD (80bce27e683c262d14bc978838d95a72bc2ba7d2, [DPE-11195] feat(backups): pgBackRest service lifecycle and stanza check (8/19)) instead of the released 16.3.8 PyPI pin, to validate whether the latest library state wires up with the charm. The tip carries unreleased CharmState API (required s3_requirer, added in 3/19 #240 and reworked in 4/19 #241), so unit failures on the charm.py callsite are expected until the charm is adapted; draft-only CI probe.
@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Sep 24, 2026
@marceloneppel marceloneppel added the not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes label Sep 24, 2026
Satisfy the single-kernel lib 16/edge tip API: CharmState now requires s3_requirer (added in 3/19 #240, reworked in 4/19 #241). Construct one lib-vendored S3Requirer(self, s3-parameters) and pass it to both CharmState and PostgreSQLBackups, which no longer constructs its own - ops permits only one S3Requirer object per charm (handle key is class name plus relation name, so a second instance raises RuntimeError). Unit test patch targets for get_s3_connection_info follow the lib-vendored module path. Backups/restore logic itself stays charm-owned until the backups-adopt-lib migration lands.
Replaces the temporary SHA archive URL pin with the released 16.3.9 version from PyPI (lib PR #324, publish run https://github.com/canonical/postgresql-single-kernel-library/actions/runs/36034388696). Identical code content to 16/edge head 80bce27e683c262d14bc978838d95a72bc2ba7d2 that was validated by this PR: full unit suite (210 passed), ty check, CI lint/unit/build.
@marceloneppel marceloneppel changed the title build(deps): pin single-kernel lib to current 16/edge tip via archive URL build(deps): consume single-kernel lib 16.3.9 and wire CharmState s3_requirer Sep 24, 2026
@marceloneppel marceloneppel changed the title build(deps): consume single-kernel lib 16.3.9 and wire CharmState s3_requirer patch: consume single-kernel lib 16.3.9 Sep 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Libraries: Out of sync The charm libs used are out-of-sync not bug or enhancement PR is not 'bug' or 'enhancement'. For release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant