Skip to content

Do not pin the status an absent file returns - #1154

Merged
aalhossary merged 1 commit into
biojava:masterfrom
aalhossary:aa/absent-file-status
Sep 14, 2026
Merged

aalhossary merged 1 commit into
biojava:masterfrom
aalhossary:aa/absent-file-status

Conversation

@aalhossary

Copy link
Copy Markdown
Member

files.wwpdb.org now sits behind Amazon S3, which answers a missing key with 403 rather than 404 when the caller cannot list the bucket:

$ curl -sI https://files.wwpdb.org/pub/pdb/data/structures/divided/mmCIF/zz/zzzz.cif.gz
HTTP/1.1 403 Forbidden
Server: AmazonS3

notFoundThrowsAndLeavesNothingBehind asserted 404, so it has failed every nightly since 2 September. Because it is in biojava-core, the other thirteen modules are skipped — including biojava-integrationtest, so the ECOD failure behind it (#1149) is invisible.

Nothing is broken: real files still return 200 with Content-Length, Last-Modified, ETag and Accept-Ranges intact, the same MD5 as before.

The test now asserts the contract rather than the status code — an error status throws, nothing is written, no .size sidecar — and isNotFound() gets its own offline test, since 404/410 versus 403/500 decides whether the download fallback chain continues or aborts.

🤖 Generated with Claude Code

files.wwpdb.org moved behind Amazon S3, which answers a missing key with 403
rather than 404 when the caller cannot list the bucket. The test asserted 404
and has failed the nightly since 2 September, hiding every later module.

It now asserts the contract - an error status throws and nothing is written -
and isNotFound() is pinned separately without a network.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_011NUW9k3A19Ee3MYMU7v7EV

@josemduarte josemduarte left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@aalhossary
aalhossary merged commit 4a5bfc8 into biojava:master Sep 14, 2026
9 of 10 checks passed
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.

2 participants