Skip to content

Retry transient I/O errors (e.g. NoHttpResponseException) talking to OpenSearch - #146

Open
jordanpadams wants to merge 2 commits into
mainfrom
bugfix/144-retry-transient-io-errors
Open

Retry transient I/O errors (e.g. NoHttpResponseException) talking to OpenSearch#146
jordanpadams wants to merge 2 commits into
mainfrom
bugfix/144-retry-transient-io-errors

Conversation

@jordanpadams

Copy link
Copy Markdown
Member

🗒️ Summary

Fixes a Harvest error reported in #144 where transient network-level I/O failures (e.g. NoHttpResponseException) were not being retried, causing Harvest to log an "Unexpected error (should not have made it here)" and abort the batch.

RestClientWrapper.Retryable.retry() already handled OpenSearchException responses with status 403 (re-auth) and 429 (throttling), but had no handling for transport-level IOExceptions. This adds an IOException catch clause that rebuilds the client connection and retries with a capped backoff (up to 30s), bounded by the existing retry_limit of 75 attempts.

Ported from NASA-PDS/registry-common#306. Note: this repo is a hard fork/merge of registry-common, harvest, and registry-manager — upstream fixes must be manually ported here (documented in CLAUDE.md).

🤖 AI Assistance Disclosure

  • AI used for moderate content generation (AI generated some code or logic, but the developer authored or heavily revised the majority)

Estimated % of code influenced by AI: 80%

⚙️ Test Data and/or Report

No dedicated unit tests exist for RestClientWrapper's retry logic (it requires a live/mocked OpenSearch transport); the change mirrors the existing 403/429 retry pattern in the same class. Manual verification will come from re-running the reporter's Harvest manifest against sbnumd-registry once released.

♻️ Related Issues

Fixes #144

🤓 Reviewer Checklist

Reviewers: Please verify the following before approving this pull request.

Documentation and PR Content

  • Documentation: README, Wiki, or inline documentation (Sphinx, Javadoc, Docstrings) have been updated to reflect these changes.
  • Issue Traceability: The PR is linked to a valid GitHub Issue
  • PR Title: The PR title is "user-friendly" clearly identifying what is being fixed or the new feature being added, that if you saw it in the Release Notes for a tool, you would be able to get the gist of what was done.

Security & Quality

  • SonarCloud: Confirmed no new High or Critical security findings.
  • Secrets Detection: Verified that the Secrets Detection scan passed and no sensitive information (keys, tokens, PII) is exposed.
  • Code Quality: Code follows organization style guidelines and best practices for the specific language (e.g., PEP 8, Google Java Style).

Testing & Validation

  • Test Accuracy: Verified that test data is accurate, representative of real-world PDS4 scenarios, and sufficient for the logic being tested.
  • Coverage: Automated tests cover new logic and edge cases.
  • Local Verification: (If applicable) Successfully built and ran the changes in a local or staging environment.

Maintenance

  • Backward Compatibility: Confirmed that these changes do not break existing downstream dependencies or API contracts (or that breaking changes are clearly documented).

🤖 Generated with Claude Code

…OpenSearch

Adds an IOException catch clause to RestClientWrapper.Retryable.retry() that
rebuilds the client connection and retries with a capped backoff, bounded by
the existing retry_limit (75 attempts). Mirrors the behavior already in place
for the 403/429 cases. Ported from NASA-PDS/registry-common#306.

Also updates CLAUDE.md to document that this repo is a hard fork/merge of
registry-common, harvest, and registry-manager — upstream fixes must be
manually ported here.

Fixes #144

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jordanpadams
jordanpadams requested a review from a team as a code owner August 21, 2026 18:48
@jordanpadams jordanpadams added the bug Something isn't working label Aug 21, 2026
@jordanpadams jordanpadams self-assigned this Aug 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected error (should not have made it here) while getting index sbnumd-registry

1 participant