Skip to content

build(deps): pin single-kernel lib with PITR RetryError fix via archive URL#1852

Closed
marceloneppel wants to merge 1 commit into
16/edgefrom
fix/pitr-retryerror-16edge
Closed

build(deps): pin single-kernel lib with PITR RetryError fix via archive URL#1852
marceloneppel wants to merge 1 commit into
16/edgefrom
fix/pitr-retryerror-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: 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

Pin the library to the archive URL of the fix branch (commit e58024f, the get_member_status fix cherry-picked onto the 16.3.2 tag this branch pins) instead of the released 16.3.2 wheel, so CI runs the PITR integration tests against the fixed library. No charm code changes. The pyproject.toml/poetry.lock pin should revert to the released version once the library re-releases with the fix.

Basing the archive on the 16.3.2 tag (not lib 16/edge HEAD) keeps it paired with the wheel version this branch pins, avoiding unrelated unreleased library changes that would break ty check on this charm code.

Checklist

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

…ve URL

Pin the single-kernel library to the archive URL of a 16.3.2-based
branch carrying only the get_member_status RetryError fix
(canonical/postgresql-single-kernel-library#179, commit e58024f),
instead of the released 16.3.2 wheel, so the PITR integration tests
stop crashing.

Without the fix, get_member_status lets the RetryError cluster_status()
raises when Patroni is unreachable propagate uncaught into
_was_restore_successful during a PITR restore (Patroni is intentionally
stopped), crashing the restore action hook and exhausting the test's
10x retry loop in test_backups_pitr_{aws,gcp}. Basing the archive on
the 16.3.2 tag (not lib 16/edge HEAD) keeps it paired with the wheel
version this branch pins, avoiding unrelated unreleased library
changes (#177/#178) that would break ty check on this charm code.

This pin should revert to the released version once the library fix
ships in a new release.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel added the bug Something isn't working as expected label Jul 13, 2026
@github-actions github-actions Bot added the Libraries: Out of sync The charm libs used are out-of-sync label Jul 13, 2026
@marceloneppel marceloneppel deleted the fix/pitr-retryerror-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