build(deps): pin single-kernel lib with PITR RetryError fix via archive URL#1852
Closed
marceloneppel wants to merge 1 commit into
Closed
build(deps): pin single-kernel lib with PITR RetryError fix via archive URL#1852marceloneppel wants to merge 1 commit into
marceloneppel wants to merge 1 commit into
Conversation
…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>
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
The
test_backups_pitr_{aws,gcp}integration tests fail intermittently on16/edge(and on base, so this is a pre-existing flake). Root cause: the single-kernel library'sPatroniManager.get_member_statuscallscluster_status()without a try/except, so when Patroni is unreachable during a PITR restore it raises an uncaughttenacity.RetryError. That crash fires inside the restore action hook (ops re-emits the deferreddatabase-peers-relation-changedwithin it), discarding the stagedrestore-statusresult and exhausting the test's 10x retry loop.The fix lives in the library (
canonical/postgresql-single-kernel-library#179): catch theRetryErrorand return""(the value the method's docstring already promises), mirroring the siblingget_member_ip.Solution
Pin the library to the archive URL of the fix branch (commit
e58024f, theget_member_statusfix cherry-picked onto the16.3.2tag this branch pins) instead of the released16.3.2wheel, so CI runs the PITR integration tests against the fixed library. No charm code changes. Thepyproject.toml/poetry.lockpin should revert to the released version once the library re-releases with the fix.Basing the archive on the
16.3.2tag (not lib16/edgeHEAD) keeps it paired with the wheel version this branch pins, avoiding unrelated unreleased library changes that would breakty checkon this charm code.Checklist