Skip to content

fix(storage): refuse iceberg calls storage does not serve - #2142

Open
cmelchior wants to merge 3 commits into
mainfrom
chore/drop-update-namespace-properties
Open

cmelchior wants to merge 3 commits into
mainfrom
chore/drop-update-namespace-properties

Conversation

@cmelchior

@cmelchior cmelchior commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What

  • catalog() now returns a RestCatalog subclass. On it, three methods raise NotImplementedError and send no request:
    • update_namespace_properties
    • rename_table
    • register_table
  • Drops the matching entries from sdk-compliance.yaml: storage.analytics.update_namespace_properties, rename_table and register_table.

Why

supabase/sdk#388 removes these three capabilities from the registry, because the storage service's Iceberg REST catalog has no route for any of them. At storage 17fa0927, each request gets a 404:

  • POST /v1/{prefix}/namespaces/{namespace}/properties
  • POST /v1/{prefix}/tables/rename
  • POST /v1/{prefix}/namespaces/{namespace}/register

Today these calls fail in misleading ways:

  1. Storage's /v1/config advertises no endpoints (tenant-catalog.ts).
  2. pyiceberg therefore falls back to its default endpoint set, which includes all three calls, and sends the request.
  3. Storage answers 404.
  4. pyiceberg turns the 404 into a misleading error:
    • update_namespace_properties raises NoSuchNamespaceError, even though the namespace exists.
    • rename_table raises NoSuchTableError, even though the table exists.

This is a patch fix: none of these calls ever succeeded against Supabase, and only the error they raise changes.

Trade-off

This puts a fact about the service into the client, which Logic belongs in the service argues against. If Storage adds these routes later, released versions keep refusing the calls until users upgrade.

The service-side fix is for Storage's /v1/config to advertise the endpoints it serves. pyiceberg then refuses unsupported calls itself (NotImplementedError: Server does not support endpoint …), for every client. Once that ships, this override can be removed.

Merge order

This PR can merge before supabase/sdk#388. The current workflow pin (capability-matrix/v2.4.0) only reports the missing IDs as not declared, and the release that removes them treats the file as valid. If the weekly compliance sync proposes re-adding the IDs as not_implemented before the pin bump, close that PR.

Testing

  • test_analytics_catalog_refuses_calls_storage_does_not_serve covers all three calls. It checks that each raises NotImplementedError and never calls Session.post. Against the catalog without these overrides, the cases fail.
  • test_analytics.py and test_optional_iceberg.py pass on Python 3.12. storage3 still imports without pyiceberg, because the subclass lives in the private module storage3._iceberg, which catalog() imports lazily.
  • pyrefly, ruff, check_docstrings.py and pydoclint pass.
  • The supabase/sdk Python symbol extractor finds no public symbols added or removed by the subclass.
  • validate-compliance passes against the current pin and against feat(storage)!: remove iceberg capabilities storage does not serve sdk#388.
  • The integration tests need the Supabase CLI stack, so they weren't run locally. CI runs them.

🤖 Generated with Claude Code

…yaml

The storage service's Iceberg REST catalog has no route for updating
namespace properties, so supabase/sdk is removing the capability from
the registry. Dropping the entry here first keeps this file valid against
both the current pin and the release that removes the ID.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated SDK capability records. No changes to product functionality or behavior are included in this release. There are no new features or bug fixes associated with this update, and the experience of using the product remains unchanged. The change affects release metadata only; no additional action is needed to continue using existing capabilities.

The change removes the storage.analytics.update_namespace_properties entry from sdk-compliance.yaml, including its implemented status, RestCatalog note, and no_public_symbols declaration.

Change: Bug fix

Merge Risk: Minimal · up to b9e59

Calls to unsupported analytics catalog operations now fail immediately with a clear NotImplementedError instead of a misleading NoSuchNamespaceError. These calls did not succeed before, so only the error type changes. No merge-blocking risk is evident, though the failing CI check should be confirmed unrelated.

Finishing Touches

Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ff41f71-be76-4662-adcf-c8a7bfd30757
Commits

Reviewing files that changed from the base of the PR and between 697ad28 and b9e59aa.

Files selected for processing: 3

  • sdk-compliance.yaml
  • src/storage/src/storage3/_iceberg.py
  • src/storage/tests/test_analytics.py
Files with no reviewable changes: 1

  • sdk-compliance.yaml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

The storage service's Iceberg REST catalog has no route for updating
namespace properties, and its /v1/config advertises no endpoints. pyiceberg
then assumes its default endpoint set, sends the request, and reports
the 404 as NoSuchNamespaceError for a namespace that exists.

catalog() returns a RestCatalog subclass whose update_namespace_properties
raises NotImplementedError without sending a request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmelchior cmelchior changed the title chore(storage): drop update_namespace_properties from sdk-compliance.yaml fix(storage): refuse unsupported update_namespace_properties Nov 26, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 45783269510

Coverage increased (+0.001%) to 98.526%

Details

  • Coverage increased (+0.001%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 26733
Covered Lines: 26339
Line Coverage: 98.53%
Coverage Strength: 5.05 hits per line

💛 - Coveralls

@cmelchior
cmelchior requested a review from a team November 26, 2026 09:41
The storage service's Iceberg REST catalog has no route for renaming a
table (POST /v1/{prefix}/tables/rename) or registering one
(POST /v1/{prefix}/namespaces/{namespace}/register), so supabase/sdk#388
removes both capabilities from the registry.

pyiceberg would send both requests because Storage's /v1/config advertises
no endpoints, and turn the 404 into a misleading error. The catalog that
catalog() returns now raises NotImplementedError for both without sending
a request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmelchior cmelchior changed the title fix(storage): refuse unsupported update_namespace_properties fix(storage): refuse iceberg calls storage does not serve Nov 26, 2026

This branch has not been deployed

No deployments
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.

2 participants