Skip to content

build(deps): validate single-kernel lib PITR RetryError fix via archive URL#1845

Closed
marceloneppel wants to merge 1 commit into
flip/tls-libfrom
feature/validate-pitr-lib-fix-16edge
Closed

build(deps): validate single-kernel lib PITR RetryError fix via archive URL#1845
marceloneppel wants to merge 1 commit into
flip/tls-libfrom
feature/validate-pitr-lib-fix-16edge

Conversation

@marceloneppel

Copy link
Copy Markdown
Member

Issue

The test_backups_pitr_{aws,gcp} integration tests fail intermittently on 16/edge (and on base, so this is a pre-existing flake). Root cause (validated with 5 independent reviewers + CI log forensics): the single-kernel library's PatroniManager.get_member_status calls cluster_status() without a try/except, so when Patroni is unreachable during a PITR restore it raises an uncaught tenacity.RetryError. That crash fires inside the restore action hook (ops re-emits the deferred database-peers-relation-changed within it), discarding the staged restore-status result and exhausting the test's 10x retry loop.

The fix lives in the library (canonical/postgresql-single-kernel-library#179): catch the RetryError and return "" (the value the method's docstring already promises), mirroring the sibling get_member_ip.

Solution

Temporarily consume the library from the fix branch's archive URL (commit 5851e4e) instead of the released 16.3.2 wheel, so this PR's CI runs the PITR integration tests against the fixed library and validates the fix end-to-end before the library is re-released. No charm code changes. The pyproject.toml/poetry.lock pin should revert to the released version once canonical/postgresql-single-kernel-library#179 ships a new postgresql-charms-single-kernel release.

Checklist

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

@marceloneppel marceloneppel added the bug Something isn't working as expected label Jul 10, 2026
@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Jul 10, 2026
@marceloneppel marceloneppel force-pushed the feature/validate-pitr-lib-fix-16edge branch from 976469d to 7d14943 Compare July 10, 2026 17:07
Stack the PITR RetryError fix validation on top of the TLS migration
branch (flip/tls-lib), pinning the single-kernel library to the archive
URL of the fix branch HEAD (canonical/postgresql-single-kernel-library#179,
commit 47448ae = 16.3.4) instead of the released wheel, so CI validates
the get_member_status fix against the same library line the TLS migration
ships on.

Basing on flip/tls-lib (rather than 16/edge) keeps the charm code
consistent with the library API this commit pins: flip/tls-lib already
adopts the new 4-arg TLSManager and drops the CharmState type: ignore
that the operator-cert/substrate library changes (#177/#178) made
unused. This pin should revert to the released version once the library
fix ships.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel force-pushed the feature/validate-pitr-lib-fix-16edge branch from 7d14943 to 6e048e4 Compare July 11, 2026 17:55
@marceloneppel marceloneppel changed the base branch from 16/edge to flip/tls-lib July 11, 2026 17:55
@marceloneppel marceloneppel deleted the feature/validate-pitr-lib-fix-16edge branch July 13, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected 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