Skip to content

OCPBUGS-90135: retry blob copy on dropped connections#1454

Open
zaneb wants to merge 1 commit into
openshift:mainfrom
zaneb:retry-dropped-connection
Open

OCPBUGS-90135: retry blob copy on dropped connections#1454
zaneb wants to merge 1 commit into
openshift:mainfrom
zaneb:retry-dropped-connection

Conversation

@zaneb

@zaneb zaneb commented Jun 25, 2026

Copy link
Copy Markdown
Member

When downloading blobs from CDN, dropped connections result in io.ErrUnexpectedEOF being propagated up to the retry wrapper. Similarly, CDN connectivity issues can produce TLS alert errors. Neither was classified as retryable, making --retry-times a no-op for these common failure modes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved retry handling for mirror operations so some transient transfer and TLS errors are retried automatically instead of failing immediately.
    • Added support for retrying unexpected end-of-file errors and certain TLS alert failures, helping reduce occasional connection-related disruptions.

When downloading blobs from CDN, dropped connections result in
io.ErrUnexpectedEOF being propagated up to the retry wrapper.
Similarly, CDN connectivity issues can produce TLS alert errors.
Neither was classified as retryable, making --retry-times a no-op
for these common failure modes.

Assisted-by: Claude Code
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jun 25, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@zaneb: This pull request references Jira Issue OCPBUGS-90135, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

When downloading blobs from CDN, dropped connections result in io.ErrUnexpectedEOF being propagated up to the retry wrapper. Similarly, CDN connectivity issues can produce TLS alert errors. Neither was classified as retryable, making --retry-times a no-op for these common failure modes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from adolfo-ab and aguidirh June 25, 2026 09:18
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bdf75a23-7899-4ba7-a964-c841593f0ca7

📥 Commits

Reviewing files that changed from the base of the PR and between 507b46a and 6f83de3.

📒 Files selected for processing (1)
  • internal/pkg/mirror/mirror.go

Walkthrough

Mirror retry handling now treats unexpected EOF and TLS alert errors as retryable, while preserving the existing deadline, cancellation, and fallback retry classification paths.

Changes

Mirror retryability update

Layer / File(s) Summary
Retry classification
internal/pkg/mirror/mirror.go
isErrorRetryable adds io.ErrUnexpectedEOF and tls.AlertError to the retryable cases and keeps the existing deadline, cancellation, and fallback retry checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: making blob copy retry on dropped connections.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR only changes internal/pkg/mirror/mirror.go; no Ginkgo test titles are added or modified, so the naming rule is not implicated.
Test Structure And Quality ✅ Passed No Ginkgo tests were added or modified; the PR only changes internal/pkg/mirror/mirror.go retry logic, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes internal/pkg/mirror/mirror.go; no new Ginkgo e2e tests or MicroShift-sensitive APIs/features were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: PR only changes retry logic in internal/pkg/mirror/mirror.go; no new Ginkgo e2e tests or SNO-sensitive assumptions were added.
Topology-Aware Scheduling Compatibility ✅ Passed Only internal/pkg/mirror/mirror.go changed, and it adds retryable error handling; no manifests/controllers/scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed Changed code only extends retry classification in library code; no main/init/TestMain/suite stdout writes or stdout logging setup appears in the touched file.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The PR only changes internal/pkg/mirror/mirror.go retry logic; no new Ginkgo e2e tests or network/IP assumptions were added.
No-Weak-Crypto ✅ Passed mirror.go only adds retry handling for io.ErrUnexpectedEOF and tls.AlertError; no weak ciphers, custom crypto, or secret comparisons appear in the PR changes.
Container-Privileges ✅ Passed PASS: The PR only changes retry logic in internal/pkg/mirror/mirror.go; no container/K8s manifest or securityContext privilege settings were introduced.
No-Sensitive-Data-In-Logs ✅ Passed The PR only adds retry classification in mirror.go; it introduces no new logging calls or log messages exposing secrets or PII.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zaneb
Once this PR has been reviewed and has the lgtm label, please assign aguidirh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zaneb

zaneb commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

/cc @aguidirh @andfasano @bfournie

@openshift-ci openshift-ci Bot requested review from andfasano and bfournie June 25, 2026 09:35
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

@zaneb: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@bfournie

Copy link
Copy Markdown

/lgtm

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants