fix(gcs): preserve prefixes when listing with matchGlob - #188
Open
electrum wants to merge 1 commit into
Open
Conversation
|
| Filename | Overview |
|---|---|
| src/main/java/io/floci/gcp/services/gcs/GcsObjectController.java | Moves glob filtering after delimiter roll-up so generated prefixes and retained objects are filtered consistently. |
| src/main/java/io/floci/gcp/services/gcs/GcsObjectGlob.java | Adds fixed-directory-prefix extraction and makes glob compilation use the same backslash escape semantics. |
| src/test/java/io/floci/gcp/services/gcs/GcsListFilterRestIntegrationTest.java | Covers prefix matching, literal directory prefixes, recursive globs, and backslash behavior through the REST API. |
| compatibility-tests/sdk-test-java/src/test/java/io/floci/gcp/test/GcsListFiltersTest.java | Adds SDK-level verification that current-directory glob listings return matching prefixes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Bucket objects] --> B[Apply offsets and fixed listing prefix]
B --> C[Roll up names using delimiter]
C --> D[Retained object items]
C --> E[Generated prefixes]
D --> F[Apply matchGlob]
E --> G[Apply matchGlob]
F --> H[Paginate items]
G --> I[Return matching prefixes]
H --> J[GCS-compatible list response]
I --> J
Reviews (2): Last reviewed commit: "fix(gcs): preserve prefixes when listing..." | Re-trigger Greptile
electrum
force-pushed
the
user/electrum/gcs-list-match-glob-prefixes
branch
from
September 9, 2026 05:06
330f02c to
797994e
Compare
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.
Summary
Preserves matching directory prefixes when
objects.listcombinesdelimiter=/withmatchGlob.Type of change
fix:)feat:)feat!:orfix!:)GCP Compatibility
The behavior was reproduced in real GCS with objects under two prefixes:
Floci previously returned only
{"kind":"storage#objects"}for the same request. Real GCS was also checked for literal directory prefixes:a/*returns direct objects undera/, whilea/**additionally returns matching nested prefixes. Backslash escaping was checked as well:a\b/*matchesab/file.txt, whilea\\b/*matches an object nameda\b/file.txt.Checklist
./mvnw testpasses locally