Repository navigation
fix(pulp): retry transient Pulp API errors - #20
Merged
Merged
Conversation
Tpo76
marked this pull request as ready for review
December 4, 2026 11:51
pkriko
approved these changes
Dec 4, 2026
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.
MON-217872
Transient Pulp API errors (502 at the gateway, upload tasks failed or stuck on a worker) fail deliveries that pass on rerun.
setup-cli: retrypulp status5 times (10/20/40/60 s), each failure logged,::error::only after the last. A bash loop rather thanpulp status --retries: the latter has a fixed delay and does not log the error of each attempt.package-delivery(rpm, deb): when an upload task ends failed/canceled or times out and the sha256 lookup finds nothing, upload the file again (2 extra attempts,resolve_with_reuploadinlib/api.sh). The sha256 lookup curl gets--retry 3 --retry-all-errors.promote-to-stable(deb):--retry-all-errorson the legacy associations lookup.Trade-off: a re-upload after a timed-out task can queue a second task behind the first one (worst case about 3 x 600 s per file, pool of 8); the sha256 lookup still picks the content up when the first task completes.
Seen recently:
pulp status502 (4 runs, incl. one on 2026-12-04), unresolved upload content (3 jobs), associations lookup (1).Tests: new bats cases in
pulp/tests/setup-cli.bats(retry then success, failure after 5 attempts) andpulp/tests/api.bats(re-upload bounded to 2), failing without the change. shellcheck clean.Dev stack validation (centreon-plugins-sudoers, throwaway branch, actions pinned to bf64e83, dev Pulp): https://github.com/centreon/centreon-plugins/actions/runs/47327162083
setup-cliagainst an unreachable server: 5 attempts, a[WARN]with the error for each, waits 10/20/40/60 s, one::error::at the end.ubuntu-unstablerepository not provisioned on the dev stack, fail closed as before (not related to this change).Follow-ups: MON-218303 (
repository show, paginated promote listings, first-pass fetchability checks).