Skip to content

Retry Foldseek search fetches through a reset connection - #91

Closed
adititm wants to merge 1 commit into
fix/uniprot-connection-reset-retryfrom
fix/foldseek-search-retry
Closed

Retry Foldseek search fetches through a reset connection#91
adititm wants to merge 1 commit into
fix/uniprot-connection-reset-retryfrom
fix/foldseek-search-retry

Conversation

@adititm

@adititm adititm commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Same latent bug as Retry UniProt fetches through a reset connection #84: foldseek-search and foldseek-multimer-search each reuse one session across a submit POST, several poll_until_complete GETs, and a post-poll result-archive GET against search.foldseek.com — the same reuse pattern that let a pooled-connection reset go unretried in uniprot-fetch.
  • foldseek-multimer-search imports _submit from foldseek_search.py rather than defining its own, so fixing it there covers both tools; multimer's own result-archive GET needed its own separate fix.
  • poll_until_complete's internal GETs already retry ConnectionError/Timeout against a wall-clock deadline and are unaffected.

Depends on #84 (fix/uniprot-connection-reset-retry) for the request_with_retry helper — this PR is based on that branch and should be reviewed/merged after it (or rebased onto main once #84 lands).

Test plan

  • pytest tests/structure_alignment_tests/test_foldseek_search.py tests/structure_alignment_tests/test_foldseek_multimer_search.py -q -m "not integration" — 15 passed, 2 skipped (unrelated slow tests), including a new regression test on the shared _submit (covers both tools) reproducing the reused-connection failure directly.
  • Same suites --integration (live search.foldseek.com remote submit-and-poll, including a real multimer search finding PDL1 complex neighbors) — 19 passed, 0 failed, 2 skipped.
  • ruff check / ruff format --check clean.
  • mypy — no new errors.
  • Docstring style checker (test_docstring_style.py) — clean.

Opened as a draft for review before merging.

foldseek-search and foldseek-multimer-search each reuse one session across a
submit POST, several poll_until_complete GETs, and a post-poll result-archive
GET against search.foldseek.com -- the same reuse pattern that let a pooled
connection reset go unretried in uniprot-fetch: urllib3's adapter-level Retry
doesn't cover a ConnectionResetError raised while sending on a connection the
server already closed, which surfaces as requests.exceptions.ConnectionError
above the adapter rather than through it.

foldseek-multimer-search imports _submit from foldseek_search.py rather than
defining its own, so fixing it there covers both tools; multimer's own
result-archive GET needed its own fix. poll_until_complete's internal GETs
already retry ConnectionError/Timeout against a wall-clock deadline and are
unaffected.

Depends on the request_with_retry helper added in the uniprot-fetch fix
(fix/uniprot-connection-reset-retry) -- this branch is based on it.
@adititm

adititm commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #93, which combines this and the other sibling fixes into one PR.

@adititm adititm closed this Aug 21, 2026
@adititm
adititm deleted the fix/foldseek-search-retry branch August 21, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant