Skip to content

fix: persist iceberg namespace metadata updates#1098

Merged
ferhatelmas merged 1 commit into
masterfrom
ferhat/iceberg-namespace-metadata
May 11, 2026
Merged

fix: persist iceberg namespace metadata updates#1098
ferhatelmas merged 1 commit into
masterfrom
ferhat/iceberg-namespace-metadata

Conversation

@ferhatelmas
Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings May 11, 2026 13:21
@ferhatelmas ferhatelmas requested a review from a team as a code owner May 11, 2026 13:21
Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas ferhatelmas force-pushed the ferhat/iceberg-namespace-metadata branch from 2337583 to 111ddd7 Compare May 11, 2026 13:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.metadata on createNamespace conflict upsert and return the stored row.
  • Return persisted namespace metadata in TenantAwareRestCatalog.createNamespace responses.
  • 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

  • ErrorCode is imported but never used in this test file. This will fail Biome/TS linting (noUnusedImports); remove ErrorCode from 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.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25672873628

Coverage increased (+0.04%) to 74.296%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: 2 of 2 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10284
Covered Lines: 8047
Line Coverage: 78.25%
Relevant Branches: 5943
Covered Branches: 4009
Branch Coverage: 67.46%
Branches in Coverage %: Yes
Coverage Strength: 411.07 hits per line

💛 - Coveralls

@ferhatelmas ferhatelmas merged commit 00f2b53 into master May 11, 2026
18 checks passed
@ferhatelmas ferhatelmas deleted the ferhat/iceberg-namespace-metadata branch May 11, 2026 14:58
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.

4 participants