Skip to content

fix: match earthdata endpoints the way icechunk matches prefixes - #157

Closed
maxrjones wants to merge 4 commits into
mainfrom
fix/earthdata-prefix-slash-matching
Closed

maxrjones wants to merge 4 commits into
mainfrom
fix/earthdata-prefix-slash-matching

Conversation

@maxrjones

Copy link
Copy Markdown
Member

This PR isolates a small fix from #151 that makes sure the earthdata endpoints contain a trailing slash, so that Icechunk can properly match the prefix.

icechunk normalizes container prefixes and credential keys by appending
a missing trailing slash (append-only: a doubled slash is preserved and
simply never matches). parse_chunk_access stored entries verbatim and
earthdata_endpoints compared them to declared container prefixes with
exact string equality, so a config entry differing from the declared
container only by a trailing slash would have its credential applied by
icechunk for virtual reads while endpoint priming silently skipped it
(or, conversely, primed an endpoint for a credential icechunk would
never apply).

Normalize entry keys at parse time exactly like icechunk's add_trailing
and normalize declared prefixes the same way before the membership
test, so priming reproduces icechunk's matching byte for byte.

Extracted from #151 (commits b4ce0c0 and 2328f14): this fixes EDL
behavior already on main and is independent of the where= feature.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@maxrjones
maxrjones marked this pull request as ready for review September 17, 2026 20:04
@github-actions github-actions Bot added the fix label Sep 17, 2026

@chuckwondo chuckwondo 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.

Only some "nits", so nothing blocking, but please take a bit more time to review and adjust agent-generated comments for better clarity.

Comment thread src/titiler/multidim/chunk_access.py Outdated
Comment thread src/titiler/multidim/chunk_access.py Outdated
Comment on lines +263 to +266
# icechunk appends a missing trailing slash to container prefixes and
# credential keys (append-only — a doubled slash is preserved and
# simply never matches); entries were normalized the same way at parse
# time, so a plain membership test reproduces icechunk's matching

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.

Be mindful of agent tendency for sometimes less than crystal clear wording, along with overuse of en- and em-dashes and semicolons.

Comment thread tests/test_chunk_access.py Outdated

@hrodmn hrodmn 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, although having path parsing/sanitizing logic so deep in the application code feels less than ideal. I'm not familiar with how the new EDL + Icechunk system works so maybe there's not way around it.

Co-authored-by: Chuck Daniels <cjdaniels4@gmail.com>
@maxrjones

Copy link
Copy Markdown
Member Author

thanks for your critical feedback @chuckwondo. I'll be more careful in the future

@maxrjones

maxrjones commented Sep 30, 2026 •

Copy link
Copy Markdown
Member Author

@chuckwondo @hrodmn, sorry for the churn but after further consideration I think #163 is a better approach for this problem. Please let me know if you agree or disagree.

@maxrjones

Copy link
Copy Markdown
Member Author

superseded by #163

@maxrjones maxrjones closed this Sep 30, 2026
@maxrjones
maxrjones deleted the fix/earthdata-prefix-slash-matching branch October 1, 2026 15:07
@maxrjones maxrjones self-assigned this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants