Skip to content

feat: add AqoraCatalog for reading data catalogs via Iceberg - #204

Merged
jpopesculian merged 1 commit into
mainfrom
jpop/catalog
Jul 28, 2026
Merged

feat: add AqoraCatalog for reading data catalogs via Iceberg#204
jpopesculian merged 1 commit into
mainfrom
jpop/catalog

Conversation

@jpopesculian

@jpopesculian jpopesculian commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added Apache Iceberg catalog integration for accessing datasets through Aqora.
    • Added support for aqora:// and aqora-iceberg:// filesystem protocols.
    • Enabled authenticated metadata and ranged data access, including redirected object storage downloads.
    • Added optional Iceberg dependencies for projects that need this functionality.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jpopesculian, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 24aa06dd-f6c0-444c-aa9b-7fbdd23f211f

📥 Commits

Reviewing files that changed from the base of the PR and between 417b029 and 545a413.

📒 Files selected for processing (5)
  • .gitignore
  • pyproject.toml
  • python/aqora/fsspec.py
  • python/aqora/iceberg.py
  • python/aqora/iceberg_fs.py
📝 Walkthrough

Walkthrough

Adds an Aqora Iceberg REST catalog, CLI-based token authentication, custom fsspec filesystem routing, signed URL reads, ranged access, metadata discovery, package entry-point registration, and an optional Iceberg dependency set.

Changes

Aqora Iceberg integration

Layer / File(s) Summary
Package and protocol registration
.gitignore, pyproject.toml, python/aqora/fsspec.py
Ignores uv.lock, registers the aqora-iceberg fsspec entry point and Iceberg optional dependencies, and declares the aqora protocol.
Catalog authentication and routing
python/aqora/iceberg.py
Adds catalog URL and <owner>/<slug> parsing, cached CLI token authentication, custom filesystem builders, PyIceberg FileIO wiring, and prefixed REST catalog URL construction.
Signed URL file access
python/aqora/iceberg_fs.py
Adds aqora-iceberg filesystem support for authenticated redirects, presigned object reads, ranged requests, and object size discovery.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PyIceberg
  participant AqoraCatalog
  participant AqoraAuthManager
  participant AqoraIcebergFileSystem
  participant AqoraREST
  participant ObjectStorage
  PyIceberg->>AqoraCatalog: create catalog and request file access
  AqoraCatalog->>AqoraAuthManager: obtain cached Bearer token
  PyIceberg->>AqoraIcebergFileSystem: read Iceberg metadata or data file
  AqoraIcebergFileSystem->>AqoraREST: request signed URL
  AqoraREST-->>AqoraIcebergFileSystem: redirect with signed Location
  AqoraIcebergFileSystem->>ObjectStorage: GET signed URL with optional Range
  ObjectStorage-->>AqoraIcebergFileSystem: bytes and response headers
  AqoraIcebergFileSystem-->>PyIceberg: return file data or metadata
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding AqoraCatalog support for reading Aqora data catalogs via Iceberg.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jpop/catalog

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Around line 37-40: Update the pyiceberg dependency constraint in the iceberg
extras to require version 0.10.0 or newer, ensuring the AUTH_MANAGER usage in
aqora.iceberg is supported; remove the redundant python_version marker if it is
no longer needed.

In `@python/aqora/iceberg_fs.py`:
- Around line 100-121: Update _info so it raises an explicit error when the
ranged response has no usable Content-Range total and no valid Content-Length,
instead of returning size 0. Preserve the existing size parsing and file
metadata for responses that provide either value.
- Around line 61-78: Update the async _resolve_signed_url method to obtain the
Authorization header by offloading self._auth.auth_header() to a worker thread
via the project’s asyncio-compatible thread helper, then use that result in the
request headers. Keep AqoraAuthManager.auth_header synchronous and preserve the
existing redirect and error handling.

In `@python/aqora/iceberg.py`:
- Around line 58-84: Update _fetch_token to catch subprocess.TimeoutExpired from
subprocess.run and convert it into a clear RuntimeError, preserving the existing
exception chaining and consistent handling alongside FileNotFoundError and
CalledProcessError.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bf50c30-8981-454e-a868-243eb6dc3e7f

📥 Commits

Reviewing files that changed from the base of the PR and between 56d052d and 417b029.

📒 Files selected for processing (5)
  • .gitignore
  • pyproject.toml
  • python/aqora/fsspec.py
  • python/aqora/iceberg.py
  • python/aqora/iceberg_fs.py

Comment thread pyproject.toml
Comment thread python/aqora/iceberg_fs.py
Comment thread python/aqora/iceberg_fs.py Outdated
Comment thread python/aqora/iceberg.py
Adds a PyIceberg `RestCatalog` subclass that talks to the platform's
data-catalog REST service at `/data-catalog/v1/{owner}/{slug}`.

- `AqoraCatalog` overrides `url()` to prefix every endpoint, including
  `/config`, because the service is per-catalog rather than per-warehouse.
- `AqoraAuthManager` sources bearer tokens from `aqora auth token`,
  re-invoking the CLI after a TTL to pick up rotated tokens.
- `AqoraIcebergFileSystem` resolves the `aqora-iceberg://` URIs embedded in
  generated Iceberg metadata, following the service's redirect manually so
  the Authorization header is dropped before hitting the presigned S3 URL.

Gated behind a new `iceberg` extra.
@jpopesculian
jpopesculian merged commit 356447b into main Jul 28, 2026
17 checks passed
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