Skip to content

Issue249#250

Open
bnlawrence wants to merge 3 commits into
mainfrom
issue249
Open

Issue249#250
bnlawrence wants to merge 3 commits into
mainfrom
issue249

Conversation

@bnlawrence

@bnlawrence bnlawrence commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request addresses #249 - which arises from the fact that by default fsspec does not raise errors but simply return them as error instances for the caller to deal with. pyfive could try and do something sensible with fsspec related errors, but a minimal solution for now is simply pass them up the stack.

Closes #249

Before you get started

Checklist

  • This pull request has a descriptive title and labels
  • This pull request has a minimal description (most was discussed in the issue, but a two-liner description is still desirable)
  • Unit tests have been added (if codecov test fails)
  • Any changed dependencies have been added or removed correctly (if need be)
  • If you are working on the documentation, please ensure the current build passes
  • All tests pass

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #249 by ensuring that fsspec cat_ranges failures don’t get propagated downstream as “buffer” objects (e.g., timeout exception instances), and are instead raised immediately so callers see the real I/O error.

Changes:

  • Added a ChunkRead._cat_ranges_raise() helper to call fs.cat_ranges(..., on_error="raise") when supported, and to raise any exception objects returned in the buffers list.
  • Routed both bulk chunk reads (_read_bulk_fsspec) and b-tree node fetches (_make_btree_fetch_fn) through the new helper.
  • Updated/added unit tests to assert on_error="raise" is passed and that returned exception instances are raised.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pyfive/h5d.py Introduces a shared cat_ranges wrapper that forces fsspec errors to raise, and uses it in both bulk chunk reads and b-tree parallel fetches.
tests/test_btree_parallel.py Extends dummy fsspec FS and adds tests verifying on_error="raise" usage and that returned exceptions are raised.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyfive/h5d.py Outdated
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.18%. Comparing base (0a77174) to head (aa184c0).

Files with missing lines Patch % Lines
pyfive/h5d.py 66.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   78.48%   78.18%   -0.30%     
==========================================
  Files          15       15              
  Lines        3416     3429      +13     
  Branches      546      549       +3     
==========================================
  Hits         2681     2681              
- Misses        593      604      +11     
- Partials      142      144       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Chunk_buffer handling on timeouts

2 participants