Skip to content

Save the h2oai test data as the bytes the server sent - #806

Merged
evertlammerts merged 1 commit into
duckdb:mainfrom
ewoerd:fix-h2oai-download-check
Dec 1, 2026
Merged

evertlammerts merged 1 commit into
duckdb:mainfrom
ewoerd:fix-h2oai-download-check

Conversation

@evertlammerts

Copy link
Copy Markdown
Member

The download fixture of tests/slow/test_h2oai_arrow.py can save a body that is not the file, and ten tests then fail in setup. Seven CI jobs did so on 2026-12-01, always on J1_1e7_1e1_0_0.csv.gz:

OSError: zlib inflate failed: incorrect header check

The fixture writes r.iter_content(), which decodes a Content-Encoding. A response that carries Content-Encoding: gzip over the stored gzip file is therefore saved as its CSV text under the .gz name. A local server reproduces the error that way. Whether a runner received such a header is not known, since the download never failed outside CI.

  • The body is now saved undecoded, byte for byte.
  • A body that is not gzip is fetched again, three attempts in all.
  • What arrived (status, size, first bytes, headers) is printed each time, and is in the error when the attempts run out.

TestDownload serves these cases from a local server; the gzip file under Content-Encoding: gzip fails with the old read. The file is the same on v2.0-cyanoptera, so this needs the label backport-v2.0.

@evertlammerts
evertlammerts merged commit 201a9ee into duckdb:main Dec 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant