Refactor file range processing and update logging in mrd#790
Merged
ankitaluthra1 merged 13 commits intofsspec:mainfrom Mar 26, 2026
Merged
Refactor file range processing and update logging in mrd#790ankitaluthra1 merged 13 commits intofsspec:mainfrom
ankitaluthra1 merged 13 commits intofsspec:mainfrom
Conversation
…ign with standard Python slicing behavior
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…split for better readability
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Collaborator
|
/gcbrun |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #790 +/- ##
==========================================
+ Coverage 75.84% 76.30% +0.46%
==========================================
Files 14 14
Lines 2645 2663 +18
==========================================
+ Hits 2006 2032 +26
+ Misses 639 631 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ankitaluthra1
approved these changes
Mar 26, 2026
…ment to indicate internal usage
Collaborator
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key changes:
_cat_filemethod now explicitly returns empty bytes whenstart >= end >= 0to prevent invalid HTTP range requests.startandendparameters in_cat_fileand_process_limits_to_offset_and_lengthhas been refined to correctly handle0values and negative indices.start > end) are now gracefully handled by returning an empty range instead of raisingValueErrorin_process_limits_to_offset_and_length.startoffsets are clamped to0if they would result in an offset before the beginning of the file in_process_limits_to_offset_and_length.download_rangesfunction ingcsfs/zb_hns_utils.py.MRD_MAX_RANGES(1000)._mergemethod has been added toextended_gcsfs.pywhich explicitly raises aNotImplementedErrorif an attempt is made to merge objects in a Zonal Bucket, as server-side compose is not supported for them. For standard buckets, it delegates to the parent class's_mergeimplementation._fetch_range_split,_cat_file, and_get_filenow include the relevant file path for better debugging._process_limits_to_offset_and_lengthhave been updated to reflect the new behavior, and new tests for_mergeanddownload_rangeshave been added.