fix: persist iceberg namespace metadata updates#1098
Merged
Conversation
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
2337583 to
111ddd7
Compare
There was a problem hiding this comment.
Pull request overview
Fixes Iceberg namespace creation idempotency by ensuring namespace metadata/properties are persisted/merged on repeated creates, and by returning the stored (merged) metadata back to the client.
Changes:
- Merge
iceberg_namespaces.metadataoncreateNamespaceconflict upsert and return the stored row. - Return persisted namespace metadata in
TenantAwareRestCatalog.createNamespaceresponses. - Add an integration test covering metadata merge behavior when creating an existing namespace.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/test/iceberg.test.ts | Adds a test validating metadata merge + load behavior for existing namespaces (also adjusts imports). |
| src/storage/protocols/iceberg/knex.ts | Updates namespace upsert to merge metadata and return the stored row. |
| src/storage/protocols/iceberg/catalog/tenant-catalog.ts | Returns stored namespace metadata instead of echoing request properties. |
Comments suppressed due to low confidence (1)
src/test/iceberg.test.ts:3
ErrorCodeis imported but never used in this test file. This will fail Biome/TS linting (noUnusedImports); removeErrorCodefrom the import or add an assertion that actually uses it.
import assert from 'node:assert'
import { PutObjectCommand, S3Client } from '@aws-sdk/client-s3'
import { isS3Error } from '@internal/errors'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 25672873628Coverage increased (+0.04%) to 74.296%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
fenos
approved these changes
May 11, 2026
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.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
Iceberg create namespace behaves partially idempotent but ignores metadata.
What is the new behavior?
Merge metadata correctly and return stored metadata back to the client.