Skip to content

fix(catalog): reject trailing junk in metadata filenames - #1718

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/catalog-metadata-filename-anchor
Open

fix(catalog): reject trailing junk in metadata filenames#1718
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:fix/catalog-metadata-filename-anchor

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Anchor the modern table metadata filename regex at the end.
  • Make ParseMetadataVersion ignore trailing suffixes and trailing path separators.

Why

The old regex matched valid prefixes. A path ending in .metadata.json.tmp could be mistaken for a metadata file when choosing the next version.

The follow-up in #1719 rejects invalid current locations before staging and keeps legacy vN names working.

Tests

  • go test ./catalog/internal -count=1
  • go test ./... -count=1

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.

1 participant