Skip to content

feat: Simplify task interface, re-exports - #1302

Merged
c-thiel merged 17 commits into
mainfrom
ct/re-exports
Aug 25, 2025
Merged

c-thiel merged 17 commits into
mainfrom
ct/re-exports

Conversation

@c-thiel

@c-thiel c-thiel commented Aug 25, 2025 •

Copy link
Copy Markdown
Member

BEGIN_COMMIT_OVERRIDE
feat: Simplify task interface, re-exports

feat: Enable write.metadata.delete-after-commit.enabled by default
feat: Return Error Stacks for non-internal errors
END_COMMIT_OVERRIDE

Summary by CodeRabbit

  • New Features

    • Graceful shutdown via cancellation tokens across server, metrics, task queues, and background services.
    • Extensible background services registration and centralized background-service orchestration.
  • Improvements

    • Clearer error responses with Error IDs, richer details, and adjusted HTTP logging.
    • Jittered exponential backoff for retries to reduce contention.
    • Typed task payloads, cancellable workers, and safer queue lifecycle/management.
    • Metadata file cleanup enabled by default for table commits.
  • Documentation

    • Added user guide documenting metadata cleanup behavior and configuration.

@coderabbitai

coderabbitai Bot commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds cancellation-token–based shutdown and centralized background service orchestration; refactors task queues to typed, cancellable SpecializedTask model; renames TabularDetails.ident → table_id and propagates mapping changes; enhances error models and responses; replaces rand with fastrand; adds jittered exponential backoff; updates docs and tests.

Changes

Cohort / File(s) Summary
Workspace & deps
Cargo.toml, crates/lakekeeper/Cargo.toml, crates/io/Cargo.toml, crates/iceberg-ext/Cargo.toml
Replace rand with workspace fastrand; add fastrand dev-deps; add/remove dev profile entries; make tower optional and include in router feature; add lakekeeper-io dev-dep to iceberg-ext.
Error modeling & responses
crates/iceberg-ext/src/catalog/rest/error.rs, crates/lakekeeper/src/catalog/io.rs
Add Display impls and conversions between ErrorModel and IcebergErrorResponse; add append_detail(s) APIs; expand Axum IntoResponse logic to distinguish server vs client errors and adjust logged/returned stacks; remap IOErrorExt → ErrorModel with explicit context enrichment and bridging conversions; update tests.
IO helpers & trait delegation
crates/io/src/lib.rs
Feature-gate helpers; change context params to impl Into<String>; introduce impl_lakekeeper_storage_for_smart_pointer! macro and use it for Arc<T>/Box<T>, replacing explicit impls.
Server/router/metrics (cancellation)
crates/lakekeeper/src/api/mod.rs, .../api/router.rs, .../metrics.rs, .../serve.rs, .../lib.rs
Propagate tokio_util::sync::CancellationToken across shutdown_signal, router serve, metrics exporter, and top-level serve orchestration; replace legacy shutdown with token.cancelled() futures; move to JoinSet-based background service registration with abort handles; add docs cfg attrs.
Health system & checks
crates/lakekeeper/src/service/health.rs
Replace per-provider spawn with update_health_loop; switch RNG to fastrand for jitter; change spawn API to accept a JoinSet + CancellationToken and return (name, AbortHandle) tuples for centralized management.
Task queue framework & workers
crates/lakekeeper/src/service/task_queue/*.rs, .../tabular_*_queue.rs
Introduce TaskData, SpecializedTask, and static QueueConfig; workers accept CancellationToken; Task.state → Task.data; registry/runner and worker signatures adjusted for token-driven lifecycle; add pick/poll/report APIs and explicit success/failure recording; update many worker flows to payload-driven model.
Endpoint hooks & event publishing
crates/lakekeeper/src/service/endpoint_hooks.rs, .../event_publisher/mod.rs
Replace shared Arc<HashMap<TableIdent,TableId>> with function-based TableIdentToIdFn; update trait signatures and publisher implementations to use mapping function; pre-size vectors for events.
Catalog, commit flow & tabular identity
crates/lakekeeper/src/catalog/tables.rs, .../service/mod.rs, .../implementations/postgres/...
resolve_and_authorize_table_access now returns TabularDetails (field renamed table_id); commit flow split into authz + inner commit with retry, jittered exponential backoff, metadata write-before-DB-commit, and cleanup-on-failure; update call sites to use table_id; change default metadata-delete-after-commit flag to true.
Commit backoff & misc view changes
crates/lakekeeper/src/catalog/views/commit.rs
Replace fixed sleep retries with jittered exponential backoff; improve error formatting.
Postgres tabular & task queue DB mapping
crates/lakekeeper/src/implementations/postgres/tabular/mod.rs, .../task_queues.rs
Improve RowNotFound error wording and ErrorKind; rename Task.state → Task.data and update pick/test logic; adjust Task struct field mapping.
Trait bounds & small API tweaks
crates/lakekeeper/src/service/authz/mod.rs, .../service/secrets.rs, .../service/catalog.rs
Add std::fmt::Debug bounds to Authorizer, SecretStore, Catalog and Catalog::State; remove several default Catalog retry methods; tidy imports.
Background orchestration & serve API
crates/lakekeeper/src/serve.rs
New RegisterBackgroundServiceFn type; ServeConfiguration gains default generic for A; additional_background_services now use registration fns; central JoinSet orchestration with timed graceful shutdown and abort logic.
Tests & test helpers
crates/lakekeeper/src/tests/*, crates/io/tests/*, tests/python/tests/test_spark.py
Tests converted to use fastrand and CancellationToken-aware helpers (spawn_build_in_queues); update task-related tests to TaskData/SpecializedTask APIs; python test toggles write.metadata.delete-after-commit.enabled.
Docs
docs/docs/table-maintenance.md, docs/mkdocs.yml
Add table-maintenance user guide and navigation entry documenting metadata cleanup behavior and new default.
Cosmetic/debug
crates/lakekeeper/src/implementations/kv2.rs, others
Minor debug formatting tweak for SecretsState::Debug (vault_password shows "").

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Operator
  participant Serve as lakekeeper::serve
  participant JoinSet as Background JoinSet
  participant Router as Axum Server
  participant Metrics as Metrics Exporter
  participant Health as Health Loop
  participant Queues as Task Queues

  Operator->>Serve: start()
  Serve->>JoinSet: init + CancellationToken
  Serve->>Router: spawn serve(listener, router, cancellation_token)
  Serve->>Metrics: start exporter(metrics_port, cancellation_token)
  Serve->>Health: spawn_update_health_checks(join_set, cancellation_token)
  Serve->>Queues: task_queues_runner(cancellation_token)
  Note right of Serve: monitor JoinSet (join_next_with_id)

  Operator-->>Serve: cancel token (Ctrl+C / SIGTERM)
  Serve->>JoinSet: signal cancellation
  par graceful shutdown
    Router->>Serve: with_graceful_shutdown(token.cancelled)
    Metrics->>Serve: exporter returns on cancel
    Health->>Serve: loops exit on cancel
    Queues->>Serve: workers exit / record status
  and timeout path
    Serve->>JoinSet: wait 20s
    Serve->>JoinSet: abort remaining tasks
  end
  Serve->>Operator: shutdown complete
Loading
sequenceDiagram
  autonumber
  participant Registry as TaskQueueRegistry
  participant Runner as TaskQueuesRunner
  participant Worker as Queue Worker
  participant Catalog as Catalog
  participant Task as SpecializedTask<Q,D>
  participant Publisher as EventPublisher

  Registry->>Runner: task_queues_runner(cancellation_token)
  loop worker lifecycle
    Runner->>Worker: spawn worker(token)
    Worker->>Catalog: poll_for_new_task::<Q,D>(interval, token)
    alt task available
      Catalog-->>Worker: Some(Task)
      Worker->>Task: process (instrumented)
      Task->>Catalog: record_success / record_failure
      Worker->>Publisher: publish events(using TableIdentToIdFn)
    else no task or cancelled
      Worker-->>Runner: exit (graceful)
    end
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~150 minutes

Possibly related PRs

Poem

I hop with a token in paw, the shutdown drum hums low,
Workers bow, tasks tidy up, backoff learns to grow.
IDs changed their nametags, errors stack with grace,
Metrics quiet on my call, health loops keep their pace.
I nibble docs and tests and thump — hooray, let's go! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ct/re-exports

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (7)
crates/lakekeeper/src/catalog/views/commit.rs (1)

345-351: Mismatch in error type: "SetProperties" path returns "AddSchemaError".

Likely a copy/paste. This breaks error analytics/alerts and misleads clients.

Apply:

-            ViewUpdate::SetProperties { updates } => m.set_properties(updates).map_err(|e| {
-                ErrorModel::bad_request(
-                    format!("Error setting properties: {e}"),
-                    "AddSchemaError",
-                    Some(Box::new(e)),
-                )
-            })?,
+            ViewUpdate::SetProperties { updates } => m.set_properties(updates).map_err(|e| {
+                ErrorModel::bad_request(
+                    format!("Error setting properties: {e}"),
+                    "SetPropertiesError",
+                    Some(Box::new(e)),
+                )
+            })?,
crates/lakekeeper/src/service/authz/implementations/openfga/api.rs (1)

1382-1384: Bug: route path parameter name is wrong for view access

The router mounts /permissions/view/{table_id}/access but the handler expects a {view_id} path parameter (and the OpenAPI annotation above uses {view_id}). This will lead to path-parameter extraction errors and mismatched OpenAPI docs.

Apply this fix:

-        .route(
-            "/permissions/view/{table_id}/access",
-            get(get_view_access_by_id),
-        )
+        .route(
+            "/permissions/view/{view_id}/access",
+            get(get_view_access_by_id),
+        )
crates/lakekeeper/src/implementations/postgres/task_queues.rs (2)

151-166: Stale-running pickup ignores queue filter (cross-queue pickup risk)

In the stale-running branch of the CTE, the condition does not constrain t.queue_name = $1. This allows picking up stale tasks from other queues when scanning this queue. Add the same queue filter to the second branch.

Proposed change:

-        WHERE (status = $3 AND t.queue_name = $1
-                   AND scheduled_for < now() AT TIME ZONE 'UTC')
-           OR (status = $4 AND (now() - last_heartbeat_at) > COALESCE(tc.max_time_since_last_heartbeat, $2))
+        WHERE (status = $3 AND t.queue_name = $1
+                   AND scheduled_for < now() AT TIME ZONE 'UTC')
+           OR (status = $4 AND t.queue_name = $1
+                   AND (now() - last_heartbeat_at) > COALESCE(tc.max_time_since_last_heartbeat, $2))

Also applies to: 158-161


467-515: Force-cancel condition matches every status when true (over-deletes tasks)

In the warehouse-wide cancellation, the predicate (status = $3 OR $5) becomes tautologically true when $5 is true, deleting tasks regardless of status. The intent per function doc is “pending tasks,” optionally including running tasks when force_delete_running_tasks is true.

Refine the condition to include only Scheduled and, if requested, Running:

-                        FROM task
-                        WHERE (status = $3 OR $5) AND warehouse_id = $1 AND queue_name = $2
+                        FROM task
+                        WHERE (status = $3 OR ($5 AND status = $6))
+                          AND warehouse_id = $1 AND queue_name = $2
                     )
-                    DELETE FROM task
-                    WHERE (status = $3 OR $5) AND warehouse_id = $1 AND queue_name = $2
+                    DELETE FROM task
+                    WHERE (status = $3 OR ($5 AND status = $6))
+                      AND warehouse_id = $1 AND queue_name = $2

And update the parameters to pass TaskStatus::Running as the new $6:

             )?
-            .map_err(|e| {
+            .map_err(|e| {
                 tracing::error!(
                     ?e,
                     "Failed to cancel {queue_name} Tasks for warehouse {warehouse_id}"
                 );
                 e.into_error_model(format!(
                     "Failed to cancel {queue_name} Tasks for warehouse {warehouse_id}"
                 ))
             })?;
-                *warehouse_id,
-                queue_name,
-                TaskStatus::Scheduled as _,
-                TaskOutcome::Cancelled as _,
-                force_delete_running_tasks
+                *warehouse_id,
+                queue_name,
+                TaskStatus::Scheduled as _,
+                TaskOutcome::Cancelled as _,
+                force_delete_running_tasks,
+                TaskStatus::Running as _,

This change keeps the behavior constrained to Scheduled tasks by default and optionally includes Running tasks when requested.

Also applies to: 493-499, 496-497

crates/lakekeeper/src/tests/mod.rs (2)

299-316: Rename spawn_build_in_queues → spawn_built_in_queues
To maintain consistency with register_built_in_queues, the helper should be renamed and all its usages updated.

Affected locations:

  • Function definition
    • crates/lakekeeper/src/tests/mod.rs: lines 299–316
  • Call-sites
    • crates/lakekeeper/src/tests/drop_warehouse.rs: line 109
    • crates/lakekeeper/src/tests/stats.rs: line 30

Suggested diff:

--- a/crates/lakekeeper/src/tests/mod.rs
+++ b/crates/lakekeeper/src/tests/mod.rs
@@ -299,7 +299,7 @@
 pub(crate) fn spawn_build_in_queues<T: Authorizer>(
     ctx: &ApiContext<State<T, PostgresCatalog, SecretsState>>,
     poll_interval: Option<std::time::Duration>,
-    cancellation_token: tokio_util::sync::CancellationToken,
-) -> tokio::task::JoinHandle<()> {
+)    cancellation_token: tokio_util::sync::CancellationToken,
+) -> tokio::task::JoinHandle<()> {
     let ctx = ctx.clone();
@@
     tokio::task::spawn(task_runner.run_queue_workers(true))
 }
@@
-pub(crate) fn spawn_build_in_queues<T: Authorizer>(
+pub(crate) fn spawn_built_in_queues<T: Authorizer>(
     ctx: &ApiContext<State<T, PostgresCatalog, SecretsState>>,
     poll_interval: Option<std::time::Duration>,
     cancellation_token: tokio_util::sync::CancellationToken,
--- a/crates/lakekeeper/src/tests/drop_warehouse.rs
+++ b/crates/lakekeeper/src/tests/drop_warehouse.rs
@@ -106,7 +106,7 @@
     // ...
     let queues_future = spawn_build_in_queues(
-        &setup.ctx,
+        &setup.ctx,
         Some(Duration::from_millis(10)),
         cancellation_token.clone(),
     );
--- a/crates/lakekeeper/src/tests/stats.rs
+++ b/crates/lakekeeper/src/tests/stats.rs
@@ -27,7 +27,7 @@
     // ...
-    spawn_build_in_queues(&setup.ctx, None, cancellation_token.clone());
+    spawn_built_in_queues(&setup.ctx, None, cancellation_token.clone());

Please update these locations and all imports accordingly. Happy to help with a follow-up patch if needed!


299-316: Ensure spawned queue workers are cleaned up in tests
The new spawn_build_in_queues returns a JoinHandle<()>, but I couldn’t find any .abort() or .await calls in the tests—this will leak background tasks and can cause unpredictable test behavior. Please update the following tests to explicitly abort and await the handle on teardown:

• crates/lakekeeper/src/tests/drop_warehouse.rs at line 109
• crates/lakekeeper/src/tests/stats.rs at line 30

You can add cleanup like:

// after test logic, before exiting:
queues_future.abort();
let _ = queues_future.await;

and in stats.rs:

let queues_future = spawn_build_in_queues(&setup.ctx, None, cancellation_token.clone());
// … test logic …
queues_future.abort();
let _ = queues_future.await;
crates/lakekeeper/src/service/event_publisher/mod.rs (1)

78-129: Remove unnecessary dereferences in EventMetadata constructors

The code currently dereferences identifiers (*table_id, *table_ident_uuid, *view_ident_uuid) even though those IDs are already owned values. This not only causes compilation errors but is also semantically incorrect. Apply the following fixes across crates/lakekeeper/src/service/event_publisher/mod.rs:

• In commit_transaction (around line 110):

-    tabular_id: TabularId::Table(*table_id),
+    tabular_id: TabularId::Table(table_id),

• In the “create table” handler (around line 143):

-    tabular_id: TabularId::Table(*table_ident_uuid),
+    tabular_id: TabularId::Table(table_ident_uuid),

• In the “drop table” handler (around line 234):

-    tabular_id: TabularId::Table(*table_ident_uuid),
+    tabular_id: TabularId::Table(table_ident_uuid),

• In the “create view” handler (around line 333):

-    tabular_id: TabularId::View(*view_ident_uuid),
+    tabular_id: TabularId::View(view_ident_uuid),

• In the “drop view” handler (around line 365):

-    tabular_id: TabularId::View(*view_ident_uuid),
+    tabular_id: TabularId::View(view_ident_uuid),

Additionally:

  • If TableId/ViewId are not Copy, ensure your collection types (e.g., Vec<(TableIdent, TableId)>) and function signatures reflect ownership or use Arc<…>/cloning as needed.
  • Consider logging a warning wherever an identifier lookup fails (e.g., in commit_transaction’s else branch) to aid in debugging missing mappings.
🧹 Nitpick comments (35)
crates/iceberg-ext/src/catalog/rest/error.rs (3)

105-124: Consider de-duplicating the “Caused by:” label and trimming trailing newline

Today, Display prints a “Caused by:” header (Line 117) and error_chain_fmt also prints “Caused by:” for deeper sources. For single-source errors this is fine (as your test asserts exactly one label), but for multi-cause chains this produces repeated headers. If you want a single header followed by the entire cause chain, you can remove the explicit header here and let error_chain_fmt handle the chain formatting, or adjust error_chain_fmt to emit a single top-level header.

This is non-blocking; current behavior is acceptable and matches the test. Flagging as a readability choice in multi-cause scenarios.


259-271: Broaden append API to avoid unnecessary String allocations and add a non-consuming variant

Both append_details/append_detail require owned Strings and consume self. Consider:

  • Accept an IntoIterator<Item = S> where S: Into to allow &str and reduce pre-allocation at call sites.
  • Provide &mut self variants to enable in-place mutation (useful when callers don’t want to rebuild the wrapper).

Proposed diff within this hunk:

 impl IcebergErrorResponse {
     #[must_use]
-    pub fn append_details(mut self, details: impl IntoIterator<Item = String>) -> Self {
+    pub fn append_details<I, S>(mut self, details: I) -> Self
+    where
+        I: IntoIterator<Item = S>,
+        S: Into<String>,
+    {
-        self.error.stack.extend(details);
+        self.error.stack.extend(details.into_iter().map(Into::into));
         self
     }

     #[must_use]
     pub fn append_detail(mut self, detail: impl Into<String>) -> Self {
         self.error.stack.push(detail.into());
         self
     }
 }

If you like, I can follow up with a patch adding non-consuming extend_details(&mut self, ...)/push_detail(&mut self, ...) variants.


286-315: Tighten server-error detection; drop redundant 401/403 check

The ![401, 403].contains(&code) guard is redundant because the left-hand predicate is code >= 500. Prefer an explicit 5xx range or StatusCode helpers.

Minimal change:

-        let mut response = if code >= 500 && ![401, 403].contains(&code) {
+        let mut response = if (500..=599).contains(&code) {
             tracing::error!(%error_id, %stack_s, ?details, %message, %r#type, %code, "Error response");
             axum::Json(IcebergErrorResponse {
                 error: ErrorModel {
                     message,
                     r#type,
                     code,
                     source: None,
                     stack: vec![format!("Error ID: {error_id}")],
                 },
             })
             .into_response()
         } else {
             // Log at info level for 4xx errors
             tracing::info!(%error_id, %stack_s, ?details, %message, %r#type, %code, "Error response");

Alternatively:

-        let mut response = if code >= 500 && ![401, 403].contains(&code) {
+        let mut response = if axum::http::StatusCode::from_u16(code).map(|s| s.is_server_error()).unwrap_or(true) {

Functionally equivalent here, just cleaner/clearer.

crates/lakekeeper/src/catalog/io.rs (1)

156-166: Avoid cloning message unnecessarily

Two arms call message.to_string() even though message is already an owned String. You can move it directly into the constructors to avoid extra allocations.

-            IOErrorExt::Deserialization(_) | IOErrorExt::InvalidLocation(_) => {
-                ErrorModel::bad_request(message.to_string(), typ, Some(boxed))
-            }
+            IOErrorExt::Deserialization(_) | IOErrorExt::InvalidLocation(_) => {
+                ErrorModel::bad_request(message, typ, Some(boxed))
+            }
             IOErrorExt::IOError(e) => {
                 let context = e
                     .context()
                     .iter()
                     .map(ToString::to_string)
                     .collect::<Vec<_>>();
-                ErrorModel::bad_request(message.to_string(), typ, Some(boxed))
+                ErrorModel::bad_request(message, typ, Some(boxed))
                     .append_details(context)
             }
crates/io/src/lib.rs (4)

34-44: safe_usize_to_i32: scoped behind the right features; minor consistency nits.

  • Gating to s3/gcs matches where this is used (multipart part numbers, GCS max_results). Good.
  • Consider aligning error wording and kind usage across all conversion helpers for consistency with error.rs. If you have a more specific kind than ConditionNotMatch (e.g., InvalidArgument/Overflow), switching to it would make downstream handling more expressive.

Would you like me to scan error.rs and propose a consistent ErrorKind across these helpers?


46-55: safe_usize_to_i64: optionally gate to the backends that use it.

This helper is referenced by ADLS and GCS paths; S3 appears to use the i32 variant. You can optionally tighten compilation with a feature gate to reduce surface area for builds that don’t include those backends.

Apply this diff to gate compilation:

-/// Fallible usize→i64 conversion with contextual diagnostics.
-pub(crate) fn safe_usize_to_i64(value: usize, context: impl Into<String>) -> Result<i64, IOError> {
+#[cfg(any(feature = "storage-adls", feature = "storage-gcs"))]
+/// Fallible usize→i64 conversion with contextual diagnostics.
+pub(crate) fn safe_usize_to_i64(value: usize, context: impl Into<String>) -> Result<i64, IOError> {

Also, if error.rs offers a more specific variant than ConditionNotMatch for range/overflow issues, consider using it here to align with how these errors are surfaced elsewhere.


57-82: validate_file_size: good allocation-on-error pattern; add boundary tests.

  • Moving location to impl Into and only materializing it on error paths is a nice improvement.
  • Messages and kind (ConditionNotMatch) are coherent with the conversion helpers; if you do standardize the kind there, mirror it here too.

Adding a couple of unit tests here (negative, >usize::MAX on 32-bit CI, and a large-but-valid size) would lock in the behavior. I can draft those if helpful.


506-507: Macro invocation covers Arc and Box as intended.

Good placement and visibility. Consider a brief doc comment near the invocation to indicate why Rc/Weak aren’t supported (trait requires Send+Sync, Weak would need upgrade semantics).

crates/iceberg-ext/Cargo.toml (1)

43-45: Ensure in-memory storage feature remains test-only

The storage-in-memory feature is indeed used to gate both library code and integration tests in the lakekeeper-io crate, so enabling it in your dev-dependency will activate all memory storage paths across the dependency graph during cargo test. If that’s intended, you’re all set; otherwise isolate or narrow its scope to avoid test-only behavior leaking into library builds.

• Gated library code in lakekeeper-io (crates/io/src/lib.rs):
– #[cfg(feature = "storage-in-memory")] pub mod memory;
– StorageBackend::Memory variants and their match arms (e.g. delete, write, read, list, remove_all)
• Gated tests in lakekeeper-io (crates/io/tests/integration_tests.rs):
– #[cfg(feature = "storage-in-memory")] on helper and test functions
• Your dev-dependency remains:

lakekeeper-io = { path = "../io", default-features = false, features = ["storage-in-memory"] }

Recommendations:
– If you only need memory storage in tests, this setup matches your needs.
– Otherwise, guard test-only code via cfg(test) in the dependent crate or introduce a narrower feature (e.g. test-memory) to prevent behavior drift between test and release builds.

crates/lakekeeper/Cargo.toml (1)

102-102: Optional: consider gating axum/axum-extra behind router to slim no-router builds.

If the intent is to minimize dependency footprint when router is off, consider making axum and axum-extra optional and adding them to the router feature list. Not blocking for this PR.

crates/lakekeeper/src/catalog/views/commit.rs (1)

141-147: Jittered exponential backoff: solid implementation and sane caps.

Cap at 50ms*2^6 and half-span jitter reduces thundering herd; logging helps observability. Nice touch with saturating ops.

If we end up using similar backoff elsewhere, consider extracting a small helper (e.g., compute_backoff_delay(attempt, base_ms, cap_exp)) for reuse and unit tests.

crates/lakekeeper/src/service/mod.rs (1)

493-497: Sweep complete – no lingering .ident usages found.

All code references to the old ident field have been removed, and the public rename to table_id is fully in place. As noted, a brief rustdoc on TabularDetails will improve discoverability:

• Location to add docs:

  • crates/lakekeeper/src/service/mod.rs at the TabularDetails definition (around lines 493–497)

Suggested diff:

--- a/crates/lakekeeper/src/service/mod.rs
+++ b/crates/lakekeeper/src/service/mod.rs
@@ -492,6 +492,9 @@ pub struct TabularDetails {
     pub table_id: TableId,
     pub location: String,
 }
+
+/// Metadata for a tabular dataset, including its unique `table_id` and
+/// the storage `location` where its data lives.
 #[derive(Debug, Clone)]
 pub struct TabularDetails {
     pub table_id: TableId,
crates/lakekeeper/src/implementations/postgres/task_queues.rs (2)

47-66: Nit: rename local states to payloads for clarity

Now that the domain term is “payload/data,” the local states variable naming is confusing. Renaming improves readability.

-    let mut states = Vec::with_capacity(tasks.len());
+    let mut payloads = Vec::with_capacity(tasks.len());
@@
-        states.push(payload);
+        payloads.push(payload);
@@
-        &states,
+        &payloads,

Also applies to: 111-114


134-151: Optional: guard against negative durations when building PgInterval

If max_time_since_last_heartbeat could be negative (from a misconfiguration), the conversion will succeed but semantics are odd. Consider clamping to zero or validating upstream. Not a blocker.

Would you like a follow-up patch to clamp negative durations here and in set_task_queue_config?

crates/lakekeeper/src/api/router.rs (1)

245-255: Graceful shutdown wired to CancellationToken — LGTM

Using with_graceful_shutdown(cancellation_token.cancelled().await) integrates cleanly with the orchestrator in serve.rs. Consider logging a message once the cancellation future resolves for easier operational observability, but not required.

If you want a tiny enhancement:

-    let cancellation_future = async move { cancellation_token.cancelled().await };
+    let cancellation_future = async move {
+        cancellation_token.cancelled().await;
+        tracing::info!("HTTP server shutdown requested (cancellation token)");
+    };
docs/docs/table-maintenance.md (1)

1-6: Clear, concise doc; minor wording polish.

Nice summary of the retention behavior and defaults. Consider tightening the last sentence and explicitly tying deletion to the metadata log to remove any ambiguity.

Apply this diff:

-Lakekeeper honors the Iceberg table properties `write.metadata.delete-after-commit.enabled` and `write.metadata.previous-versions-max`. Starting with Lakekeeper v0.10.0, `delete-after-commit` is enabled by default (it was disabled in earlier versions). On each table commit, when `delete-after-commit` is enabled, Lakekeeper keeps the current table metadata file plus up to `write.metadata.previous-versions-max` previous metadata files (default: 100) and deletes the oldest tracked metadata file once that limit is exceeded. This cleanup applies only to metadata files tracked in the metadata log; it does not remove orphaned metadata files.
+Lakekeeper honors the Iceberg table properties `write.metadata.delete-after-commit.enabled` and `write.metadata.previous-versions-max`. Starting with Lakekeeper v0.10.0, `delete-after-commit` is enabled by default (it was disabled in earlier versions). On each table commit, when `delete-after-commit` is enabled, Lakekeeper keeps the current table metadata file plus up to `write.metadata.previous-versions-max` previous metadata files (default: 100) and deletes the oldest tracked metadata file from the metadata log once that limit is exceeded. This cleanup applies only to metadata files tracked in the metadata log; it does not remove orphaned metadata files.

Would you like a follow-up PR to add cross-links to Iceberg’s “metadata log” docs and Lakekeeper’s orphan cleanup guidance to help users navigate related maintenance tasks?

crates/lakekeeper/src/metrics.rs (1)

45-55: Good use of tokio::select! for cooperative shutdown; minor idiomatic tweaks.

The cancellation branch is correct and drops the exporter future cleanly. Two small improvements:

  • Use anyhow! directly instead of anyhow!(format!(...)).
  • Include the port in the cancellation log to aid operators when multiple exporters run.

Apply this diff:

-            tokio::select! {
-                () = cancellation_token.cancelled() => {
-                    tracing::info!("Metrics exporter cancelled");
-                    Ok(())
-                },
-                r = exporter => {
-                    r.map_err(|e| anyhow::anyhow!(format!("Metrics exporter failed: {e:?}")))
-                }
-            }
+            tokio::select! {
+                () = cancellation_token.cancelled() => {
+                    tracing::info!(port = metrics_port, "Metrics exporter cancelled");
+                    Ok(())
+                },
+                r = exporter => {
+                    r.map_err(|e| anyhow::anyhow!("Metrics exporter failed: {e:?}"))
+                }
+            }
crates/lakekeeper/src/tests/drop_warehouse.rs (1)

108-113: Nice: cancellable workers and captured JoinHandle. Consider renaming and eliminating fixed sleeps.

  • The variable queues_future is a JoinHandle<()>. Consider renaming to queues_handle for clarity.
  • The subsequent fixed sleep(2s) can be flaky if purge takes longer than two poll intervals. Prefer polling with a deadline and small backoff until delete_warehouse succeeds.

Apply this diff to replace the fixed sleep with a robust poll:

-    // Wait for tables to be dropped
-    tokio::time::sleep(std::time::Duration::from_secs(2)).await;
-    // Drop warehouse - this should succeed now
-    ApiServer::delete_warehouse(
-        warehouse.warehouse_id,
-        DeleteWarehouseQuery::builder().build(),
-        api_context.clone(),
-        random_request_metadata(),
-    )
-    .await
-    .expect("Warehouse deletion should succeed after purge tasks are completed");
+    // Drop warehouse — poll until purge tasks complete to avoid flakiness
+    let deadline = std::time::Instant::now() + std::time::Duration::from_secs(15);
+    loop {
+        match ApiServer::delete_warehouse(
+            warehouse.warehouse_id,
+            DeleteWarehouseQuery::builder().build(),
+            api_context.clone(),
+            random_request_metadata(),
+        )
+        .await {
+            Ok(_) => break,
+            Err(e) if std::time::Instant::now() < deadline => {
+                tokio::time::sleep(std::time::Duration::from_millis(200)).await;
+            }
+            Err(e) => panic!("Warehouse deletion did not complete within 15s: {e:?}"),
+        }
+    }
crates/lakekeeper/src/api/mod.rs (1)

26-74: Graceful shutdown via CancellationToken looks solid; minor nits on consistency and panics

Overall, the select! logic and signal handling are correct, and the external-cancellation branch is a nice touch. Two small suggestions:

  • Unify error messages and terminology (“install” vs “register”, capitalization) across Ctrl+C/SIGTERM/SIGINT for consistency.
  • Consider logging and returning instead of panicking on handler registration failures, unless a hard fail here is desired in all deployments (the current docstring still says “Panics…”).

Apply this diff if you want consistent wording and non-panicking registration on Unix signals:

 #[cfg(feature = "router")]
 pub async fn shutdown_signal(cancellation_token: tokio_util::sync::CancellationToken) {
   use tokio::signal;
@@
   let ctrl_c = async {
     signal::ctrl_c()
       .await
-      .expect("failed to install Ctrl+C handler");
+      .expect("Failed to register Ctrl+C handler");
   };
@@
   #[cfg(unix)]
   let terminate = async {
-    signal::unix::signal(signal::unix::SignalKind::terminate())
-      .expect("Failed to register SIGTERM handler")
-      .recv()
-      .await;
+    match signal::unix::signal(signal::unix::SignalKind::terminate()) {
+      Ok(mut s) => { s.recv().await; }
+      Err(e) => {
+        tracing::error!("Failed to register SIGTERM handler: {e}");
+        return;
+      }
+    }
   };
@@
   #[cfg(unix)]
   let interrupt = async {
-    signal::unix::signal(signal::unix::SignalKind::interrupt())
-      .expect("Failed to register SIGINT handler")
-      .recv()
-      .await;
+    match signal::unix::signal(signal::unix::SignalKind::interrupt()) {
+      Ok(mut s) => { s.recv().await; }
+      Err(e) => {
+        tracing::error!("Failed to register SIGINT handler: {e}");
+        return;
+      }
+    }
   };
crates/lakekeeper/src/service/event_publisher/mod.rs (2)

423-476: Channel-based publisher: backpressure handling is good; consider including queue length metrics

You already warn on send_timeout failures. If feasible, expose a gauge/counter for dropped events to make this observable in metrics.


512-586: Background task fan-out: safe and robust; minor improvement on error context

join_all intentionally swallows individual sink errors after logging. If you ever need stronger delivery guarantees, consider try_join_all with per-sink retry/backoff, but current behavior is acceptable for best-effort emissions.

crates/lakekeeper/src/service/endpoint_hooks.rs (2)

75-78: Introduce TableIdentToIdFn: good abstraction; document lifetime expectations

Nice move away from cloning large maps into hooks. Because hooks receive &TableIdentToIdFn, clarify in docs that implementations must not hold onto this reference beyond the scope of the call (e.g., don’t store it for later async work). If long-lived use is needed, we can switch to passing Arc<dyn TableIdentToIdFn + Send + Sync>.

Proposed doc addition:

 /// Function type used by hooks to resolve a `TableIdent` to its `TableId`.
-/// Implementations should be cheap and non-blocking.
+/// Implementations should be cheap and non-blocking.
+/// Note: Hooks receive this as a borrowed reference valid only for the duration of the call.
+/// Do not store it for use outside the async method invocation.
 pub type TableIdentToIdFn = dyn Fn(&TableIdent) -> Option<TableId> + Send + Sync;

367-375: Trait signature change: commit_transaction now takes a resolver fn — good, but call out non-retention

The new parameter _table_ident_to_id_fn: &TableIdentToIdFn is an improvement. As above, consider adding a note in trait docs that the resolver must not be retained or invoked after the method returns.

crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs (1)

217-219: Consider verifying transaction state before recording success.

The code records success in the transaction before committing it. While this follows the transactional pattern, ensure that record_success_in_transaction doesn't assume the transaction will definitely commit.

Consider adding a comment to clarify the transactional semantics:

+    // Record success within the transaction - will be rolled back if commit fails
     task.record_success_in_transaction::<C>(trx.transaction(), None)
         .await;
crates/lakekeeper/src/service/health.rs (1)

27-27: Consider documenting the jitter range choice.

The jitter range of 0-500ms seems reasonable for health checks, but it would be helpful to document why this specific range was chosen.

-            // Jitter is a random value between 0 and 500 milliseconds (inclusive)
+            // Jitter is a random value between 0 and 500 milliseconds (inclusive)
+            // to prevent thundering herd when multiple services start simultaneously
             let jitter = fastrand::u64(0..=500);
crates/lakekeeper/src/catalog/tables.rs (2)

955-956: Consider handling the return value.

The function discards the return value from commit_tables_with_authz. While this is intentional for the transaction endpoint, consider if any useful information could be logged.

-        let _ = commit_tables_with_authz(prefix, request, state, request_metadata).await?;
+        let contexts = commit_tables_with_authz(prefix, request, state, request_metadata).await?;
+        tracing::debug!("Successfully committed {} table(s)", contexts.len());

1865-1866: String parsing for boolean could be more strict.

The current implementation accepts "1" as true, which might be unexpected. Consider being more explicit about accepted values.

-            v.to_lowercase() == "true" || v == "1"
+            matches!(v.to_lowercase().as_str(), "true" | "yes" | "on" | "1")

Or alternatively, use a standard boolean parser:

-            v.to_lowercase() == "true" || v == "1"
+            v.parse::<bool>().unwrap_or(false)
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (4)

37-41: QueueConfig impl OK; consider explicit overrides for retries/heartbeat

Leaving max_retries and max_time_since_last_heartbeat at defaults is fine, but purge can be IO-bound and flaky; a slightly higher retry budget and a shorter heartbeat may improve resilience/latency. If desired, override via static fns on PurgeQueueConfig.


63-70: Add task_id to the span for easier cross-log correlation

You already log queue_name, location, and attempt. Including task_id in the span makes correlating success/failure records and DB state much easier during ops.

Apply this diff to enrich the span:

 let span = tracing::debug_span!(
     QUEUE_NAME,
     location = %task.data.tabular_location,
     warehouse_id = %task.task_metadata.warehouse_id,
     tabular_type = %task.data.tabular_type,
     queue_name = %task.queue_name(),
     attempt = %task.attempt,
+    task_id = %task.task_id,
 );

88-90: Consider recording a brief success message for operator visibility

Currently success is recorded with None; a short message helps when scanning task_history without needing to cross-reference structured logs.

Apply this minimal diff (uses a static str to avoid borrow issues in async calls):

-            task.record_success::<C>(catalog_state, None).await;
+            task.record_success::<C>(catalog_state, Some("Purged tabular data")).await;

135-141: Unify error conversion style for consistency

Elsewhere in this file you convert to IcebergErrorResponse explicitly. While the “?” here likely leverages From for IcebergErrorResponse, using the same explicit style improves readability and avoids confusion.

Suggested change:

-    let tabular_location = Location::from_str(tabular_location_str).map_err(|e| {
-        ErrorModel::internal(
-            format!("Failed to parse table location `{tabular_location_str}` to purge table data."),
-            "ParseError",
-            Some(Box::new(e)),
-        )
-    })?;
+    let tabular_location = Location::from_str(tabular_location_str).map_err(|e| {
+        IcebergErrorResponse::from(ErrorModel::internal(
+            format!("Failed to parse table location `{tabular_location_str}` to purge table data."),
+            "ParseError",
+            Some(Box::new(e)),
+        ))
+    })?;
crates/lakekeeper/src/service/task_queue/mod.rs (4)

64-66: Add Send + Sync + 'static bounds to TaskData

SpecializedTask

instances flow through async tasks and may cross threads. Requiring payloads to be Send + Sync + 'static at the trait level prevents accidentally registering non-sendable payloads that could break under multi-threaded runtimes.

Apply this diff:

-/// Task Payload
-pub trait TaskData: Clone + Serialize + DeserializeOwned {}
+/// Task Payload
+pub trait TaskData: Clone + Serialize + DeserializeOwned + Send + Sync + 'static {}

212-259: Passing poll_interval by reference is fine; consider by-value to simplify lifetimes

The closures capture poll_interval by value and pass &poll_interval to async fns. This compiles, but passing Duration by value to workers (and taking Duration in worker signatures) removes the interior borrowing entirely and avoids subtle lifetime pitfalls for future refactors.

If you decide to do this, adjust worker signatures to take Duration (not &Duration) and drop the ampersand at call sites.


692-739: report_deserialization_failure could include queue name in message

You log the queue in append_detail, but the stored error message is just “Failed to deserialize task data: …”. Consider prefixing with Q::queue_name() for quicker context in DB history rows (even without details expansion).

Apply this diff:

-            format!("Failed to deserialize task data: {error}").as_str(),
+            format!("Queue `{}`: failed to deserialize task data: {error}", Q::queue_name()).as_str(),

1008-1141: Test harness covers cancellation-based shutdown

Spawning the runner with a CancellationToken and cancelling at the end validates the new shutdown semantics. Consider adding a purge-queue integration test mirroring expiration to exercise the new purge worker end-to-end as well.

Happy to sketch an integration test for purge similar to test_queue_expiration_queue_task if you want.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7e90a8e and c33d61e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (36)
  • Cargo.toml (1 hunks)
  • crates/iceberg-ext/Cargo.toml (1 hunks)
  • crates/iceberg-ext/src/catalog/rest/error.rs (6 hunks)
  • crates/io/Cargo.toml (0 hunks)
  • crates/io/src/lib.rs (4 hunks)
  • crates/lakekeeper/Cargo.toml (3 hunks)
  • crates/lakekeeper/src/api/mod.rs (2 hunks)
  • crates/lakekeeper/src/api/router.rs (3 hunks)
  • crates/lakekeeper/src/catalog/io.rs (2 hunks)
  • crates/lakekeeper/src/catalog/tables.rs (30 hunks)
  • crates/lakekeeper/src/catalog/views/commit.rs (2 hunks)
  • crates/lakekeeper/src/implementations/postgres/catalog.rs (1 hunks)
  • crates/lakekeeper/src/implementations/postgres/tabular/mod.rs (2 hunks)
  • crates/lakekeeper/src/implementations/postgres/tabular/table/mod.rs (6 hunks)
  • crates/lakekeeper/src/implementations/postgres/task_queues.rs (8 hunks)
  • crates/lakekeeper/src/lib.rs (2 hunks)
  • crates/lakekeeper/src/metrics.rs (2 hunks)
  • crates/lakekeeper/src/serve.rs (6 hunks)
  • crates/lakekeeper/src/service/authz/implementations/openfga/api.rs (2 hunks)
  • crates/lakekeeper/src/service/authz/mod.rs (2 hunks)
  • crates/lakekeeper/src/service/catalog.rs (3 hunks)
  • crates/lakekeeper/src/service/endpoint_hooks.rs (2 hunks)
  • crates/lakekeeper/src/service/event_publisher/mod.rs (2 hunks)
  • crates/lakekeeper/src/service/health.rs (2 hunks)
  • crates/lakekeeper/src/service/mod.rs (1 hunks)
  • crates/lakekeeper/src/service/secrets.rs (1 hunks)
  • crates/lakekeeper/src/service/task_queue/mod.rs (21 hunks)
  • crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs (4 hunks)
  • crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (2 hunks)
  • crates/lakekeeper/src/tests/drop_warehouse.rs (3 hunks)
  • crates/lakekeeper/src/tests/mod.rs (2 hunks)
  • crates/lakekeeper/src/tests/stats.rs (2 hunks)
  • crates/lakekeeper/src/tests/tasks.rs (5 hunks)
  • docs/docs/table-maintenance.md (1 hunks)
  • docs/mkdocs.yml (1 hunks)
  • tests/python/tests/test_spark.py (1 hunks)
💤 Files with no reviewable changes (1)
  • crates/io/Cargo.toml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-22T05:44:22.632Z
Learnt from: c-thiel
PR: lakekeeper/lakekeeper#1298
File: crates/lakekeeper/src/service/secrets.rs:11-11
Timestamp: 2025-08-22T05:44:22.632Z
Learning: In crates/lakekeeper/src/implementations/kv2.rs, there is a separate `impl std::fmt::Debug for SecretsState` implementation that provides Debug support for the KV2 SecretsState type, so it already satisfies Debug trait bounds without needing a derive macro.

Applied to files:

  • crates/lakekeeper/src/service/secrets.rs
📚 Learning: 2025-08-22T05:44:22.632Z
Learnt from: c-thiel
PR: lakekeeper/lakekeeper#1298
File: crates/lakekeeper/src/service/secrets.rs:11-11
Timestamp: 2025-08-22T05:44:22.632Z
Learning: In crates/lakekeeper/src/implementations/kv2.rs, the SecretsState struct has a manual `impl std::fmt::Debug` implementation (lines 239-249) that properly redacts sensitive fields like vault_password (shows "REDACTED") and replaces complex objects like vault_client with simple string representations. This is the correct approach for Debug implementations on secret-handling types.

Applied to files:

  • crates/lakekeeper/src/service/secrets.rs
🧬 Code graph analysis (18)
crates/lakekeeper/src/lib.rs (2)
crates/lakekeeper/src/request_metadata.rs (2)
  • determine_base_uri (294-363)
  • determine_forwarded_prefix (282-292)
crates/lakekeeper/src/api/iceberg/mod.rs (1)
  • metrics (62-62)
crates/lakekeeper/src/implementations/postgres/tabular/mod.rs (1)
crates/lakekeeper/src/service/tabular_idents.rs (2)
  • typ_str (24-29)
  • typ_str (69-74)
crates/lakekeeper/src/tests/stats.rs (1)
crates/lakekeeper/src/tests/mod.rs (2)
  • random_request_metadata (295-297)
  • spawn_build_in_queues (299-316)
crates/lakekeeper/src/catalog/views/commit.rs (1)
crates/lakekeeper/src/service/authn.rs (3)
  • try_from (342-344)
  • try_from (350-359)
  • try_from (365-367)
crates/lakekeeper/src/api/router.rs (1)
crates/lakekeeper/src/serve.rs (1)
  • serve (134-398)
crates/iceberg-ext/src/catalog/rest/error.rs (1)
crates/lakekeeper/src/catalog/io.rs (5)
  • from (108-113)
  • from (117-122)
  • from (126-131)
  • from (141-168)
  • from (172-175)
crates/lakekeeper/src/serve.rs (4)
crates/lakekeeper/src/api/mod.rs (3)
  • std (53-53)
  • std (56-56)
  • shutdown_signal (27-75)
crates/lakekeeper/src/service/task_queue/mod.rs (4)
  • task (605-605)
  • task (617-617)
  • new (171-176)
  • len (270-272)
crates/lakekeeper/src/api/router.rs (1)
  • serve (245-255)
crates/lakekeeper/src/metrics.rs (1)
  • get_axum_layer_and_install_recorder (20-57)
crates/lakekeeper/src/tests/drop_warehouse.rs (1)
crates/lakekeeper/src/tests/mod.rs (3)
  • get_api_context (268-293)
  • random_request_metadata (295-297)
  • spawn_build_in_queues (299-316)
crates/lakekeeper/src/catalog/io.rs (2)
crates/iceberg-ext/src/catalog/rest/error.rs (5)
  • failed_dependency (219-230)
  • internal (161-172)
  • bad_request (127-133)
  • from (28-30)
  • from (40-47)
crates/io/src/error.rs (1)
  • context (277-279)
crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs (3)
crates/lakekeeper/src/service/task_queue/mod.rs (8)
  • tabular_purge_queue (246-246)
  • queue_name (61-61)
  • queue_name (741-743)
  • task (605-605)
  • task (617-617)
  • poll_for_new_task (645-690)
  • from (460-462)
  • from (466-468)
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (4)
  • SpecializedTask (51-51)
  • queue_name (38-40)
  • task (89-89)
  • task (96-96)
crates/lakekeeper/src/service/catalog.rs (3)
  • drop_table (463-467)
  • drop_view (731-735)
  • queue_tabular_purge (884-904)
crates/lakekeeper/src/service/event_publisher/mod.rs (1)
crates/lakekeeper/src/catalog/tables.rs (4)
  • request (1056-1060)
  • request (1204-1208)
  • request (1284-1350)
  • maybe_body_to_json (1918-1925)
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (5)
crates/lakekeeper/src/catalog/io.rs (2)
  • remove_all (74-79)
  • e (159-163)
crates/lakekeeper/src/catalog/mod.rs (2)
  • maybe_get_secret (68-77)
  • new (101-120)
crates/iceberg-ext/src/catalog/rest/error.rs (6)
  • new (232-244)
  • internal (161-172)
  • from (28-30)
  • from (40-47)
  • from (61-63)
  • from (67-69)
crates/lakekeeper/src/service/task_queue/mod.rs (8)
  • new (171-176)
  • queue_name (61-61)
  • queue_name (741-743)
  • task (605-605)
  • task (617-617)
  • poll_for_new_task (645-690)
  • from (460-462)
  • from (466-468)
crates/lakekeeper/src/service/storage/mod.rs (1)
  • file_io (146-182)
crates/lakekeeper/src/service/endpoint_hooks.rs (1)
crates/lakekeeper/src/service/event_publisher/mod.rs (1)
  • commit_transaction (80-128)
crates/lakekeeper/src/service/health.rs (1)
crates/lakekeeper/src/implementations/mod.rs (2)
  • health (112-118)
  • update_health (120-126)
crates/io/src/lib.rs (4)
crates/io/src/error.rs (5)
  • context (277-279)
  • new (14-20)
  • new (215-223)
  • new (342-349)
  • location (259-261)
crates/io/src/adls/adls_storage.rs (5)
  • new (88-93)
  • write (199-280)
  • read (300-378)
  • read_single (282-298)
  • list (380-441)
crates/io/src/gcs/gcs_storage.rs (5)
  • new (49-51)
  • write (151-273)
  • read (300-386)
  • read_single (275-298)
  • list (388-464)
crates/io/src/s3/s3_storage.rs (4)
  • write (85-246)
  • read (248-322)
  • read_single (324-347)
  • list (349-440)
crates/lakekeeper/src/tests/tasks.rs (1)
crates/lakekeeper/src/service/task_queue/mod.rs (6)
  • queue_name (61-61)
  • queue_name (741-743)
  • new (171-176)
  • task (605-605)
  • task (617-617)
  • pick_new_task (593-641)
crates/lakekeeper/src/service/task_queue/mod.rs (6)
crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs (5)
  • queue_name (43-45)
  • tabular_expiration_worker (48-82)
  • task (102-102)
  • task (217-217)
  • SpecializedTask (55-55)
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (5)
  • queue_name (38-40)
  • tabular_purge_worker (43-76)
  • task (89-89)
  • task (96-96)
  • SpecializedTask (51-51)
crates/iceberg-ext/src/catalog/rest/error.rs (2)
  • new (232-244)
  • internal (161-172)
crates/lakekeeper/src/service/catalog.rs (5)
  • pick_new_task (795-799)
  • begin_write (57-57)
  • record_task_failure (805-810)
  • transaction (65-65)
  • record_task_success (800-804)
crates/lakekeeper/src/implementations/postgres/catalog.rs (3)
  • pick_new_task (701-712)
  • record_task_failure (723-736)
  • record_task_success (714-721)
crates/lakekeeper/src/implementations/postgres/task_queues.rs (2)
  • record_failure (268-328)
  • record_success (223-266)
crates/lakekeeper/src/catalog/tables.rs (3)
crates/lakekeeper/src/service/catalog.rs (6)
  • load_storage_profile (753-757)
  • resolve_table_ident (759-764)
  • transaction (65-65)
  • load_tables (421-426)
  • commit_table_transaction (487-491)
  • commit (61-61)
crates/iceberg-ext/src/catalog/rest/error.rs (3)
  • internal (161-172)
  • new (232-244)
  • bad_request (127-133)
crates/lakekeeper/src/catalog/io.rs (2)
  • e (159-163)
  • delete_file (27-32)
🪛 LanguageTool
docs/docs/table-maintenance.md

[grammar] ~6-~6: There might be a mistake here.
Context: ...eletes the oldest tracked metadata file.

(QB_NEW_EN)

🪛 GitHub Actions: integration tests
crates/iceberg-ext/src/catalog/rest/error.rs

[error] 300-300: NamespaceActionForbidden (404): Namespace not found or action can_get_metadata forbidden for Principal(oidc~9410d0bf-4487-4177-a34f-af364cac0a59)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: security_audit
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: clippy
  • GitHub Check: test
  • GitHub Check: check-generated-openapi-matches
  • GitHub Check: sqlx-check

Comment thread Cargo.toml Resolved
Comment thread crates/lakekeeper/Cargo.toml Resolved
Comment thread crates/lakekeeper/src/tests/stats.rs Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 25, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
crates/lakekeeper/src/catalog/io.rs (2)

140-175: Reclassification of IOError as 400 risks sensitive detail leakage; prefer Failed Dependency or redact.

Mapping IOErrorExt::IOError to a 400 Bad Request while appending backend context exposes internal/storage details to clients (4xx paths preserve stack per IntoResponse). IO failures are typically backend/infra issues, not client faults. Recommend classifying as Failed Dependency (424) and/or redacting these details in responses.

Apply this diff to reclassify IO errors to 424:

-            IOErrorExt::IOError(e) => {
-                let context = e
-                    .context()
-                    .iter()
-                    .map(ToString::to_string)
-                    .collect::<Vec<_>>();
-                ErrorModel::bad_request(message, typ, Some(boxed)).append_details(context)
-            }
+            IOErrorExt::IOError(e) => {
+                let context = e
+                    .context()
+                    .iter()
+                    .map(ToString::to_string)
+                    .collect::<Vec<_>>();
+                ErrorModel::failed_dependency(message, typ, Some(boxed)).append_details(context)
+            }

Follow-up in iceberg-ext suggested below ensures 424 responses get the same redaction treatment as 5xx.


63-71: Misclassified join error on deserialize path.

If spawn_blocking fails (JoinError), it’s not a decompression error. This mislabeling confuses downstream error handling and status codes. Map it to Deserialization with a custom serde_json error message instead.

-    {
-        Ok(result) => result,
-        Err(e) => Err(IOErrorExt::FileDecompression(Box::new(e))),
-    }
+    {
+        Ok(result) => result,
+        Err(e) => Err(IOErrorExt::Deserialization(
+            serde_json::Error::custom(format!("spawn_blocking failed: {e}")),
+        )),
+    }
♻️ Duplicate comments (3)
crates/lakekeeper/src/tests/stats.rs (1)

29-31: Clean shutdown implemented correctly (captures + awaits JoinHandle).

You addressed the earlier concern: the worker handle is now captured and awaited after cancellation, preventing leaked background tasks and DB connection contention in tests. Nicely done.

Also applies to: 121-122

crates/iceberg-ext/src/catalog/rest/error.rs (2)

367-427: Great Display tests.

These validate header/message/stack/caused-by formatting paths. This addresses prior feedback to cover formatting behavior.


429-488: IntoResponse tests lock in redaction and Error ID behaviors.

Solid coverage for 5xx redaction and 4xx preservation with Error ID propagation.

🧹 Nitpick comments (15)
crates/io/tests/integration_tests.rs (1)

1393-1401: Deterministic RNG via fastrand is solid; small readability nit: lift the seed to a named constant.

This keeps tests reproducible and avoids thread-local global RNG. Defining a constant seed makes intent clearer and eases future tweaks.

Apply within this hunk:

-    let mut rng = fastrand::Rng::with_seed(42);
+    const RNG_SEED: u64 = 42;
+    let mut rng = fastrand::Rng::with_seed(RNG_SEED);

If you need to support older fastrand versions that might lack Rng::fill, a portable fallback is:

-        rng.fill(&mut chunk);
+        // Portable fallback if Rng::fill is unavailable in older fastrand:
+        for b in &mut chunk {
+            *b = rng.u8();
+        }

(Only necessary if CI flags the method; current code is preferred.)

crates/lakekeeper/src/tests/stats.rs (1)

32-42: Harden initial stats fetch to avoid first-poll race.

Fetching stats immediately after starting the workers can still race with the first producer tick and occasionally yield an empty page. Consider a short deadline-bound retry before asserting, to reduce flakiness.

Apply this diff to wrap the initial fetch with a 2s retry window:

-        let stats = ApiServer::get_warehouse_statistics(
-            whi,
-            GetWarehouseStatisticsQuery {
-                page_token: PageToken::NotSpecified,
-                page_size: None,
-            },
-            setup.ctx.clone(),
-            random_request_metadata(),
-        )
-        .await
-        .unwrap();
+        let stats = {
+            let deadline = std::time::Instant::now() + Duration::from_secs(2);
+            loop {
+                let s = ApiServer::get_warehouse_statistics(
+                    whi,
+                    GetWarehouseStatisticsQuery {
+                        page_token: PageToken::NotSpecified,
+                        page_size: None,
+                    },
+                    setup.ctx.clone(),
+                    random_request_metadata(),
+                )
+                .await
+                .unwrap();
+                if !s.stats.is_empty() || std::time::Instant::now() >= deadline {
+                    break s;
+                }
+                tokio::time::sleep(Duration::from_millis(100)).await;
+            }
+        };
crates/lakekeeper/src/tests/drop_warehouse.rs (2)

115-132: Deletion retry loop is pragmatic; consider tightening naming.

The bounded retry avoids flakes while purge tasks complete. Minor naming nit: the spawned JoinHandle isn’t a "future"; rename for clarity.

-    let queues_future = spawn_build_in_queues(
+    let queues_handle = spawn_build_in_queues(
         &api_context,
         Some(std::time::Duration::from_secs(1)),
         cancellation_token.clone(),
     );
@@
-    queues_future.await.unwrap();
+    queues_handle.await.unwrap();

108-135: Option: use timeout to simplify retry control flow.

An alternative to manual deadline arithmetic is tokio::time::timeout over a small loop, which makes the failure mode clearer. Not required, just a readability option.

docs/docs/table-maintenance.md (2)

6-6: Tiny wording tweak for flow.

Consider tightening the example sentence for readability.

Apply this diff:

-For example: if `write.metadata.previous-versions-max=20`, Lakekeeper retains 21 files in total (the current plus 20 previous); committing a 22nd version deletes the oldest tracked metadata file.
+For example, if `write.metadata.previous-versions-max=20`, Lakekeeper retains 21 files in total (the current file plus 20 previous). On the 22nd commit, Lakekeeper deletes the oldest tracked metadata file from the metadata log.

3-4: Add an ops caveat about rollback horizon.

Since enabling delete-after-commit shrinks the metadata log, rollbacks/branching to older points may become impossible once entries fall off the log. A short note recommending setting a sufficiently high write.metadata.previous-versions-max for workloads that rely on rollback would prevent surprises.

I can draft a one-liner and link to your disaster-recovery/rollback docs if you’d like.

crates/lakekeeper/src/catalog/tables.rs (4)

1038-1088: Validation improves error specificity and duplicate detection.

Requiring an identifier and producing a human-readable duplicate list is great. Minor improvement: include counts to speed up debugging in multi-change transactions.

-        let dups = counts
+        let dups = counts
             .into_iter()
-            .filter(|&(_i, c)| (c > 1))
-            .map(|(i, _c)| i.to_string())
+            .filter(|&(_i, c)| c > 1)
+            .map(|(i, c)| format!("{i} (x{c})"))
             .collect::<Vec<_>>()
             .join(", ");

1090-1172: Retry + jittered exponential backoff: solid concurrency posture.

  • Capped exponent and jitter reduce thundering herds.
  • Keeping attempt state local and returning original errors preserves debuggability.

Two small nits:

  • The log currently prints attempt as 0-based; consider logging attempt + 1 to match “human” expectations.
  • Make MAX_RETRIES_ON_CONCURRENT_UPDATE configurable (env/flag) for large deployments.
-                tracing::info!(
+                tracing::info!(
                     warehouse_id = %warehouse_id,
                     n_tables = %table_ids.len(),
-                    attempt = attempt,
+                    attempt = attempt + 1,
                     max_attempts = MAX_RETRIES_ON_CONCURRENT_UPDATE,
                     "Concurrent update detected, retrying commit operation"
                 );

If you want, I can provide a small config hook to source MAX_RETRIES and base delay from state or env with sane defaults.


1390-1423: Best-effort cleanup on DB failure is the right trade-off; add correlation for observability.

The write-then-DB-commit strategy with compensating deletes is correct. To aid incident triage, consider including a correlation id (e.g., commit attempt UUID) in both the write and delete logs.

-                tracing::warn!("Failed to delete metadata file after failed commit: {e:?}");
+                tracing::warn!(%warehouse_id, attempt, location=%commit.new_metadata_location, "Failed to delete metadata file after failed commit: {e:?}");

Note: include attempt or a generated correlation id at the top of the try_commit_tables call to thread through logs.


1863-1868: Broaden “truthy” parsing for delete-after-commit.

Supporting common truthy values reduces footguns when properties are set via env or external tooling.

-            matches!(v.to_lowercase().as_str(), "true" | "yes" | "1")
+            matches!(v.to_lowercase().as_str(), "true" | "yes" | "1" | "on" | "y" | "t")
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (5)

26-33: Typed payload is clean; consider exposing schema for API docs

TabularPurgePayload is minimal and correct. If this payload is surfaced via management APIs or admin tooling, deriving ToSchema would integrate it into Utoipa-generated docs.

Apply this diff to derive ToSchema as well (harmless if unused):

-#[derive(Debug, Clone, Serialize, Deserialize)]
+#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
 pub(crate) struct TabularPurgePayload {
     pub(crate) tabular_location: String,
     pub(crate) tabular_type: TabularType,
 }

73-73: Type args can be omitted for readability

instrumented_purge::<_, C>(...) is correct but a bit opaque. Type inference can handle both generics here; consider letting the compiler infer to reduce visual noise.

-        instrumented_purge::<_, C>(catalog_state.clone(), &secret_state, &task)
+        instrumented_purge(catalog_state.clone(), &secret_state, &task)
             .instrument(span.or_current())
             .await;

110-118: Function shape is good; consider ordering generics as <C, S> consistently

purge<C, S>(...) contrasts with instrumented_purge<S, C>(...). Consider standardizing generic parameter order across helpers to reduce mental friction.


137-143: Minor wording: use “tabular data” for consistency

Nit on the error message; everything else looks solid (and you retain the source for stack traces).

-            format!("Failed to parse table location `{tabular_location_str}` to purge table data."),
+            format!("Failed to parse table location `{tabular_location_str}` to purge tabular data."),

153-161: Preserving error classification from file_io init (good); consider the same for IO remove later

Mapping file_io init errors via IcebergErrorResponse::from(e) keeps non-internal classifications and stacks. For consistency, consider doing the same for remove_all (see next comment), or add a From for IcebergErrorResponse so we don’t need to wrap in ErrorModel::internal.

Do you want me to open a follow-up PR to introduce From for IcebergErrorResponse and apply it here?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c33d61e and c914a36.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (21)
  • Cargo.toml (1 hunks)
  • crates/iceberg-ext/Cargo.toml (1 hunks)
  • crates/iceberg-ext/src/catalog/rest/error.rs (6 hunks)
  • crates/io/Cargo.toml (1 hunks)
  • crates/io/src/lib.rs (4 hunks)
  • crates/io/tests/integration_tests.rs (1 hunks)
  • crates/lakekeeper/src/api/mod.rs (1 hunks)
  • crates/lakekeeper/src/api/router.rs (3 hunks)
  • crates/lakekeeper/src/catalog/io.rs (2 hunks)
  • crates/lakekeeper/src/catalog/tables.rs (30 hunks)
  • crates/lakekeeper/src/implementations/kv2.rs (1 hunks)
  • crates/lakekeeper/src/implementations/postgres/tabular/mod.rs (2 hunks)
  • crates/lakekeeper/src/implementations/postgres/task_queues.rs (11 hunks)
  • crates/lakekeeper/src/metrics.rs (2 hunks)
  • crates/lakekeeper/src/service/endpoint_hooks.rs (2 hunks)
  • crates/lakekeeper/src/service/mod.rs (1 hunks)
  • crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs (4 hunks)
  • crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (2 hunks)
  • crates/lakekeeper/src/tests/drop_warehouse.rs (2 hunks)
  • crates/lakekeeper/src/tests/stats.rs (2 hunks)
  • docs/docs/table-maintenance.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/lakekeeper/src/implementations/kv2.rs
🚧 Files skipped from review as they are similar to previous changes (11)
  • Cargo.toml
  • crates/lakekeeper/src/implementations/postgres/tabular/mod.rs
  • crates/lakekeeper/src/implementations/postgres/task_queues.rs
  • crates/iceberg-ext/Cargo.toml
  • crates/lakekeeper/src/metrics.rs
  • crates/lakekeeper/src/service/mod.rs
  • crates/lakekeeper/src/api/mod.rs
  • crates/lakekeeper/src/service/endpoint_hooks.rs
  • crates/lakekeeper/src/service/task_queue/tabular_expiration_queue.rs
  • crates/lakekeeper/src/api/router.rs
  • crates/io/src/lib.rs
🧰 Additional context used
🧬 Code graph analysis (6)
crates/lakekeeper/src/tests/drop_warehouse.rs (1)
crates/lakekeeper/src/tests/mod.rs (3)
  • get_api_context (268-293)
  • random_request_metadata (295-297)
  • spawn_build_in_queues (299-316)
crates/lakekeeper/src/tests/stats.rs (1)
crates/lakekeeper/src/tests/mod.rs (2)
  • random_request_metadata (295-297)
  • spawn_build_in_queues (299-316)
crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (5)
crates/lakekeeper/src/catalog/io.rs (2)
  • remove_all (74-79)
  • e (159-163)
crates/lakekeeper/src/catalog/mod.rs (2)
  • maybe_get_secret (68-77)
  • new (101-120)
crates/iceberg-ext/src/catalog/rest/error.rs (6)
  • new (232-244)
  • internal (161-172)
  • from (28-30)
  • from (40-47)
  • from (61-63)
  • from (67-69)
crates/lakekeeper/src/service/task_queue/mod.rs (8)
  • new (171-176)
  • queue_name (61-61)
  • queue_name (741-743)
  • task (605-605)
  • task (617-617)
  • poll_for_new_task (645-690)
  • from (460-462)
  • from (466-468)
crates/lakekeeper/src/service/storage/mod.rs (1)
  • file_io (146-182)
crates/lakekeeper/src/catalog/tables.rs (5)
crates/lakekeeper/src/service/catalog.rs (7)
  • load_storage_profile (753-757)
  • resolve_table_ident (759-764)
  • transaction (65-65)
  • load_tables (421-426)
  • table_idents_to_ids (411-416)
  • commit_table_transaction (487-491)
  • commit (61-61)
crates/lakekeeper/src/implementations/postgres/tabular/table/mod.rs (5)
  • load_storage_profile (426-454)
  • resolve_table_ident (49-78)
  • load_tables (457-656)
  • format (1095-1097)
  • table_idents_to_ids (80-112)
crates/iceberg-ext/src/catalog/rest/error.rs (3)
  • internal (161-172)
  • new (232-244)
  • bad_request (127-133)
crates/lakekeeper/src/catalog/io.rs (2)
  • e (159-163)
  • delete_file (27-32)
crates/lakekeeper/src/implementations/postgres/tabular/table/commit.rs (2)
  • commit_table_transaction (23-97)
  • commits (32-35)
crates/lakekeeper/src/catalog/io.rs (2)
crates/iceberg-ext/src/catalog/rest/error.rs (7)
  • failed_dependency (219-230)
  • internal (161-172)
  • bad_request (127-133)
  • from (28-30)
  • from (40-47)
  • from (61-63)
  • from (67-69)
crates/io/src/error.rs (1)
  • context (277-279)
crates/iceberg-ext/src/catalog/rest/error.rs (1)
crates/lakekeeper/src/catalog/io.rs (5)
  • from (108-113)
  • from (117-122)
  • from (126-131)
  • from (141-167)
  • from (171-174)
🪛 LanguageTool
docs/docs/table-maintenance.md

[grammar] ~6-~6: There might be a mistake here.
Context: ...eletes the oldest tracked metadata file.

(QB_NEW_EN)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: sqlx-check
  • GitHub Check: check-generated-openapi-matches
  • GitHub Check: clippy
  • GitHub Check: test
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
🔇 Additional comments (23)
crates/io/Cargo.toml (1)

78-78: All direct rand dependencies and imports have been removed — workspace now consistently uses fastrand. The absence of any rand = entries in Cargo.toml files and no use rand:: or extern crate rand in the Rust sources confirms the migration is complete. The rand entries in Cargo.lock are from transitive dependencies and expected.

– Cargo.toml manifests: no rand = lines found
– Rust code: no use rand:: or extern crate rand occurrences
– fastrand is declared and used consistently across crates

No further changes needed here.

crates/lakekeeper/src/tests/drop_warehouse.rs (2)

108-114: Good use of CancellationToken + awaiting the worker.

Spawning with a token and awaiting the JoinHandle at teardown ensures no worker leakage between tests. The 1s poll interval is a sensible choice for this test.


23-24: Imports align with the new helper.

Importing spawn_build_in_queues alongside the existing helpers keeps the test module consistent with the harness refactor.

crates/lakekeeper/src/catalog/io.rs (1)

170-175: Bridging to IcebergErrorResponse looks good.

The From -> ErrorModel and bridging impl to IcebergErrorResponse preserve compatibility while centralizing classification in ErrorModel.

crates/iceberg-ext/src/catalog/rest/error.rs (3)

33-37: Display delegation is correct.

Implementing Display for IcebergErrorResponse via its inner ErrorModel keeps formatting consistent across types.


66-70: Bridging conversion is appropriate.

From for ErrorModel is a useful addition for cross-crate conversions.


105-124: ErrorModel Display reads well and includes stack and cause chains.

Clear, structured formatting that’s helpful in logs and developer diagnostics.

docs/docs/table-maintenance.md (1)

3-4: Clear, actionable doc — thanks for shipping this alongside the behavior change.

The explanation of the two properties and the per-commit retention behavior is concise and matches the implementation intent. Calling out that orphan cleanup is out of scope is particularly helpful for operators.

crates/lakekeeper/src/catalog/tables.rs (7)

979-1012: Returning TabularDetails from authz path improves ergonomics.

Passing TabularDetails through authz and deriving storage permissions inline reduces re-loading and avoids extra round-trips. LGTM.


1015-1031: Nice extraction: load_table_inner centralizes staged checks and not-found handling.

This removes duplication and ensures consistent 404/staged semantics across callers.


1256-1281: Good transaction scoping before I/O.

Committing the read transaction before external I/O avoids holding DB locks while waiting on storage. This aligns with the two-phase commit approach adopted below.


1870-1894: Property whitelist looks correct and protects against unsupported keys.

Guarding write.metadata.* to the known set and blocking write.data.path avoids subtle misconfigurations. LGTM.


955-957: API surface simplifications: single-path commit and credential loading improvements.

  • commit_transaction delegates to commit_tables_with_authz: clearer surface with consistent validation and retry behavior.
  • commit_table now reuses the same path and ensures exactly one CommitContext (debug_assert is a nice extra check).
  • load_table[_credentials] use TabularDetails.table_id and free DB transactions before doing storage work.

Also applies to: 663-685, 615-619, 530-538


2137-2149: Tests updated to the new entry point: good coverage retained.

Switching tests to commit_tables_with_authz maintains end-to-end semantics, and the expire-metadata-log scenario still asserts the intended metadata parity. LGTM.

Also applies to: 2296-2311, 2353-2368, 2438-2452, 2490-2501, 2529-2540, 2572-2583, 2652-2664, 2714-2726, 2771-2783, 2810-2821


1151-1156: No changes needed for the fastrand dependency

I’ve confirmed that fastrand is declared in the workspace’s root Cargo.toml (line 162) and is pulled into crates/lakekeeper/Cargo.toml under [dependencies] as fastrand = { workspace = true }. The backoff implementation can safely rely on it without further CI adjustments.

crates/lakekeeper/src/service/task_queue/tabular_purge_queue.rs (8)

3-3: Good move: adopt IcebergErrorResponse for richer error propagation

Importing ErrorModel and IcebergErrorResponse aligns with the PR goal of returning error stacks and adds consistency to downstream handling.


9-9: Trait imports look correct; Transaction in scope enables associated fn calls

Bringing QueueConfig/QueueApiConfig, SpecializedTask/TaskData, and the Transaction trait into scope is necessary for the new typed queue flow and for calling C::Transaction::begin_read.

Also applies to: 13-16


37-41: QueueConfig impl is straightforward and consistent

Returning the static QUEUE_NAME keeps the SpecializedTask plumbing simple.


46-56: Cancellation-aware polling: solid integration

Switching to SpecializedTask::<PurgeQueueConfig, TabularPurgePayload>::poll_for_new_task with a CancellationToken and &Duration poll interval is correct and avoids unnecessary clones.


59-60: Graceful shutdown message is helpful

Exiting the worker on cancellation with an info log avoids noisy error paths during shutdown.


79-85: Signature change fits the new SpecializedTask flow

Taking &SpecializedTask in instrumented_purge and threading it into purge centralizes context and simplifies success/failure recording.


119-136: Good: limit DB tx scope to metadata fetch; warn on commit failure

Starting a read tx just to load the warehouse and committing before IO avoids long-held DB txs during remote deletes. Warning on commit failure is pragmatic here.


20-24: No changes needed: LazyLock is supported by the MSRV

The workspace’s minimum supported Rust version is 1.86.0 (as declared in Cargo.toml), and std::sync::LazyLock was stabilized in Rust 1.80.0. Since 1.86.0 ≥ 1.80.0, using LazyLock everywhere in the codebase (including in tabular_purge_queue.rs) is safe. (blog.rust-lang.org)

Comment thread crates/lakekeeper/src/catalog/tables.rs Resolved
Comment thread docs/docs/table-maintenance.md Resolved
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 25, 2025
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (3)
crates/iceberg-ext/src/catalog/rest/error.rs (3)

429-458: Nice — 5xx redaction test added as previously requested

This locks the server-error branch and “Error ID” behavior. Thanks for adding it.


459-488: Great — 4xx preservation test added as previously requested

Covers the client-error path and Error ID appending.


286-315: Adjust redaction to only server-side and failed-dependency errors

The current logic at crates/iceberg-ext/src/catalog/rest/error.rs (line 286) treats 401/403 as “redacted,” which contradicts the PR’s goal of “return[ing] error stacks for non-internal errors.” We should reserve stack redaction (and error-level logging) for true server-side faults (5xx) and Failed Dependency (424), while preserving client error stacks (including 401/403) with an appended Error ID.

Locations to update:

  • File: crates/iceberg-ext/src/catalog/rest/error.rs
  • Around line 286 (the if code >= 500 || [401, 403, 424].contains(&code) branch)

Suggested diff:

-       let mut response = if code >= 500 || [401, 403, 424].contains(&code) {
+       let redact = code >= 500 || code == StatusCode::FAILED_DEPENDENCY.as_u16();
+       let mut response = if redact {
            tracing::error!(%error_id, %stack_s, ?details, %message, %r#type, %code, "Error response");
            axum::Json(IcebergErrorResponse {
                error: ErrorModel {
                    message,
                    r#type,
                    code,
                    source: None,
                    stack: vec![format!("Error ID: {error_id}")],
                },
            })
            .into_response()
        } else {
            // Log at info level for 4xx errors
            tracing::info!(%error_id, %stack_s, ?details, %message, %r#type, %code, "Error response");

            let mut details = details;
            details.push(format!("Error ID: {error_id}"));

            axum::Json(IcebergErrorResponse {
                error: ErrorModel {
                    message,
                    r#type,
                    code,
                    source: None,
                    stack: details,
                },
            })
            .into_response()
        };

Add tests to lock in behavior:

@@ #[tokio::test]
+async fn test_into_response_failed_dependency_redacts_stack_and_adds_error_id() { /*…*/ }

@@ #[tokio::test]
+async fn test_into_response_unauthorized_preserves_stack_and_adds_error_id() { /*…*/ }

Ensure imports for axum::http::StatusCode and any necessary traits.

🧹 Nitpick comments (3)
crates/iceberg-ext/src/catalog/rest/error.rs (3)

105-121: Avoid duplicate “Caused by:” labels and extra blank lines in Display output

Current formatting prints “Caused by:” in Display and again inside error_chain_fmt for deeper chains, and also introduces an extra blank line. Streamline the helper to print causes without its own header, and keep the single header in Display.

Apply this diff:

- fn error_chain_fmt(e: impl std::error::Error, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-     writeln!(f, "{e}\n")?;
-     let mut current = e.source();
-     while let Some(cause) = current {
-         writeln!(f, "Caused by:\n\t{cause}")?;
-         current = cause.source();
-     }
-     Ok(())
- }
+ fn error_chain_fmt(e: &(dyn StdError), f: &mut Formatter<'_>) -> std::fmt::Result {
+     // Print the first source, then each subsequent cause (no extra headers).
+     writeln!(f, "\t{e}")?;
+     let mut current = e.source();
+     while let Some(cause) = current {
+         writeln!(f, "\t{cause}")?;
+         current = cause.source();
+     }
+     Ok(())
+ }

And keep a single header in Display (no functional change here, just relies on the adjusted helper):

 impl Display for ErrorModel {
   fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
     writeln!(f, "{} ({}): {}", self.r#type, self.code, self.message)?;
@@
     if let Some(source) = self.source.as_ref() {
-      writeln!(f, "Caused by:")?;
-      // Dereference `source` to get `dyn StdError` and then take a reference to pass
-      error_chain_fmt(&**source, f)?;
+      writeln!(f, "Caused by:")?;
+      error_chain_fmt(&**source, f)?;
     }
     Ok(())
   }
 }

Also applies to: 50-58


259-271: Public appenders on IcebergErrorResponse are handy; consider non-consuming variants

The consuming builder-style methods are great for pipelines. For handlers that already have a mutable value, non-consuming helpers reduce moves/allocations.

Proposed additive API (keeps current methods intact):

 impl IcebergErrorResponse {
   #[must_use]
   pub fn append_details(mut self, details: impl IntoIterator<Item = String>) -> Self {
     self.error.stack.extend(details);
     self
   }

   #[must_use]
   pub fn append_detail(mut self, detail: impl Into<String>) -> Self {
     self.error.stack.push(detail.into());
     self
   }
+
+  // Optional: non-consuming variants
+  pub fn push_detail(&mut self, detail: impl Into<String>) {
+      self.error.stack.push(detail.into());
+  }
+
+  pub fn extend_details(&mut self, details: impl IntoIterator<Item = String>) {
+      self.error.stack.extend(details);
+  }
 }

367-427: Display tests are solid; add a multi-cause assertion

Great coverage for empty stack, with stack, and with a source. To guard regressions in the “causes” formatting, add a test where the source has its own source, asserting that only one “Caused by:” header is printed and both causes appear (after applying the helper refactor above).

Example to add:

#[test]
fn test_error_model_display_with_nested_sources() {
    // innermost cause (no source)
    let inner = std::io::Error::new(std::io::ErrorKind::Other, "root cause");
    // wrap it once
    let middle = anyhow::anyhow!(inner).context("mid layer");
    // wrap again as the ErrorModel source
    let source_error = Box::new(middle) as Box<dyn std::error::Error + Send + Sync + 'static>;

    let error = ErrorModel {
        message: "top".into(),
        r#type: "Chained".into(),
        code: 500,
        source: Some(source_error),
        stack: vec![],
    };

    let out = format!("{error}");
    assert!(out.contains("Caused by:"));
    // exactly one header even with nested causes
    assert_eq!(out.matches("Caused by:").count(), 1);
    assert!(out.contains("mid layer"));
    assert!(out.contains("root cause"));
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c914a36 and 5de0864.

📒 Files selected for processing (1)
  • crates/iceberg-ext/src/catalog/rest/error.rs (6 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
crates/iceberg-ext/src/catalog/rest/error.rs (1)
crates/lakekeeper/src/catalog/io.rs (5)
  • from (108-113)
  • from (117-122)
  • from (126-131)
  • from (141-167)
  • from (171-174)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: docker / docker
  • GitHub Check: sqlx-check
  • GitHub Check: test
  • GitHub Check: check-generated-openapi-matches
  • GitHub Check: clippy
  • GitHub Check: openfga
  • GitHub Check: security_audit
🔇 Additional comments (2)
crates/iceberg-ext/src/catalog/rest/error.rs (2)

33-37: Display delegation for IcebergErrorResponse looks good

Simple, clear delegation to the inner ErrorModel’s Display implementation.


66-70: Symmetric conversion added (IcebergErrorResponse -> ErrorModel)

Useful for ergonomics and aligns with the existing ErrorModel -> IcebergErrorResponse conversion.

@c-thiel
c-thiel merged commit 8fec31f into main Aug 25, 2025
@c-thiel
c-thiel deleted the ct/re-exports branch August 25, 2025 19:19
@coderabbitai coderabbitai Bot mentioned this pull request Sep 24, 2025
2 tasks done
mrjoe7 added a commit to mrjoe7/lakekeeper that referenced this pull request Oct 30, 2025
* feat: Publish images to Dockerhub (lakekeeper#1274)

* feat: Update UI to 0.9.0 with multi-project support (lakekeeper#1275)

* chore: release 0.9.4

Release-As: 0.9.4

* chore: release main (lakekeeper#1262)

* chore(ci): Fix Dockerhub login

* chore(docs): Improve developer guide (lakekeeper#1265)

* chore(docs): add info regarding `view_version`'s internal representation (lakekeeper#1261)

* chore(docs): Architecture clarify Secret Store (lakekeeper#1284)

* fix: Update Limes to 0.2.2 - Fixes compilation issue due to breaking `jwks_client_rs` change (lakekeeper#1282)

* fix: Update Limes to 0.2.2

* increase min rust version

* chore: release 0.9.5

Release-As: 0.9.5

* chore: release main (lakekeeper#1286)

* chore: enable changelog sections for release-please (lakekeeper#1264)

k

* fix(deps): update rust crate rand to v0.9.2 (lakekeeper#1252)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-channel to v2.5.0 (lakekeeper#1225)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mkdocs-material to v9.6.17 (lakekeeper#1289)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate anyhow to v1.0.99 (lakekeeper#1290)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Remove bitnami images (lakekeeper#1288)

* feat!: Move to Lakekeeper IO based on hyperscaler SDKs (lakekeeper#1285)

* chore(deps): update rust crate reqwest to v0.12.23 (lakekeeper#1294)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(docs): Improve Cloud storage test docs

* fix: accept "disable" as PG sslmode as documented (lakekeeper#1303)

* feat: Simplify task interface, re-exports, enable delete-after-commit (lakekeeper#1302)

* feat: Introduce `RequestMetadata` for Internal Principals which bypass AuthZ (lakekeeper#1306)

* chore(deps): update azure/setup-helm action to v4.3.1 (lakekeeper#1299)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(test): use nextest filterset instead of needs_env_var (lakekeeper#1304)

* chore(deps): update rust crate openssl-src to v300.5.2 (lakekeeper#1292)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-compression to v0.4.28 (lakekeeper#1311)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate thiserror to v2.0.16 (lakekeeper#1296)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Provide `ApiContext` to externally registered tasks (lakekeeper#1307)

* feat!: Simplify Task interface, extend SpecializedTask interface (lakekeeper#1310)

* feat: Improve authorizer `are_allowed_*` batch check signature (lakekeeper#1315)

* chore(authz): Enforce use of AuthZ decisions with #[must_use] (lakekeeper#1317)

* feat: Task Management APIs (lakekeeper#1316)

* chore(deps): update rust crate tracing-subscriber to v0.3.20 [security] (lakekeeper#1318)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Add `RunNow` and `RunAt` to Controls for Tasks (lakekeeper#1322)

* chore(deps): update rust crate tokio-util to v0.7.16 (lakekeeper#1313)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(docs): Improve Entra ID docs (lakekeeper#1325)

* chore(docs): Improve Upgrades & Migration docs (lakekeeper#1326)

* feat: Add tasks heartbeat with Catalog state (lakekeeper#1324)

* ci: add configuration for CodeRabbit reviews (lakekeeper#1327)

* feat: Add optional STS session-tags in S3 STS requests for ABAC authorization (lakekeeper#1230)

* feat: Random Server IDs (lakekeeper#1328)

* chore(deps): update rust crate percent-encoding to v2.3.2 (lakekeeper#1312)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(authz): Deprecate Permission Endpoints for Tables without WarehouseIDs (lakekeeper#1334)

* fix: Tasks endpoints in router (lakekeeper#1335)

* feat(ci): add nextest profile ci_no_secrets for external PRs (lakekeeper#1333)

* chore(deps): update rust crate chrono to v0.4.42 (lakekeeper#1331)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Pin examples duckdb version to 1.3 (lakekeeper#1343)

* feat!: Require warehouse_id when checking permissions on views or tables via ID (lakekeeper#1340)

* fix: migrate away from bitnami in unittest.yml (lakekeeper#1344)

* chore: Remove coderabitt config

* fix(docs): Fix inconsistent URL format in README (lakekeeper#1345)

Co-authored-by: Christian <[email protected]>

* feat: Remove serde_yaml & serde_yml (lakekeeper#1341)

* feat!: add `warehouse_id` to PKs of all `table_*` and `view_*` tables (lakekeeper#1254)

* feat: Minor namespace join performance improvements

* fix: Warehouse permissions are directly used for task retrieval & control (lakekeeper#1347)

* fix: Potential Race Condition when undropping Tabulars (lakekeeper#1342)

* fix: table rename authz and error handling (lakekeeper#1346)

Co-authored-by: Andre Luis Anastacio <[email protected]>

* chore(deps): update rust crate google-cloud-auth to v1.1.2 (lakekeeper#1337)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate time to v0.3.44 (lakekeeper#1349)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency mkdocs-material to v9.6.20 (lakekeeper#1309)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* feat: Set ServerID during migration (lakekeeper#1348)

* chore(deps): Remove utoipa fork (lakekeeper#1352)

* chore(deps): update rust crate serde_with to v3.14.1 (lakekeeper#1351)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate url to v2.5.7 (lakekeeper#1354)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-compression to v0.4.30 (lakekeeper#1323)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate serde_json to v1.0.145 (lakekeeper#1250)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update strum monorepo to v0.27.2 (lakekeeper#1251)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update serde monorepo to v1.0.226 (lakekeeper#1355)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update rust crate clap to v4.5.48 (lakekeeper#1356)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Add Entity Names to Tasks (lakekeeper#1353)

* fix: case insensitivity of catalog endpoints (lakekeeper#1338)

* fix: Improve delete_warehouse error message for active tasks

* chore(deps): update rust crate tempfile to v3.22.0 (lakekeeper#1359)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian <[email protected]>

* chore(deps): update rust crate axum-prometheus to 0.9.0 (lakekeeper#1358)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: PgSslMode not supported error string

* feat(authz)!: add OpenFGA schema v4 and v3->v4 migration (lakekeeper#1314)

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>

* chore(deps): update rust crate uuid to v1.18.1 (lakekeeper#1362)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency markdown-grid-tables to v0.6.0 (lakekeeper#1357)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate anyhow to v1.0.100 (lakekeeper#1350)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: clippy

* chore(deps): update rust crate moka to v0.12.11 (lakekeeper#1365)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate tempfile to v3.23.0 (lakekeeper#1367)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update rust crate async-nats to 0.43.0 (lakekeeper#1366)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-node action to v5 (lakekeeper#1371)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/checkout action to v5 (lakekeeper#1369)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update actions/setup-python action to v6 (lakekeeper#1372)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: V3 support (lakekeeper#1364)

* chore: Set Get Task Permission to "CanGetMetadata" (lakekeeper#1376)

* chore(deps): update dependency node to v22 (lakekeeper#1373)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(authz)!: extend OpenFGA tabular entities with WarehouseId (lakekeeper#1329)


---------

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>

* feat: Add support for tasks affecting views (lakekeeper#1378)

* feat(authz): Add specific Task Actions (lakekeeper#1379)

* chore(tests): Test with Iceberg 1.9.2 & 1.10.0 (lakekeeper#1267)

* feat: Enrich task metadata with concrete tabular type (lakekeeper#1383)

* feat: Add loadTable Snapshots filter (lakekeeper#1385)

* feat: add endpoint for fuzzy search of tabulars (lakekeeper#1387)

* feat: Update UI to 0.10.0 (lakekeeper#1390)

* feat(ui): Update UI to 0.10.1

* chore: Use lakekeeper re-exports in bin (lakekeeper#1391)

* fix(tabular-search): distance and docs for `searchterm is uuid` (lakekeeper#1393)

* chore(examples): Idempotent bucket creation in minimal example (lakekeeper#1386)

In the case where you already have a bucket created, like the "examples" bucket, I ran into an issue where the createbuckets service fails, and this prevents lakekeeper from starting back up.

This fix adds a simple minio flag to ignore buckets that already exist, making things even more user friendly

* feat: Make number of workers spawned for Expiration & Purge configurable (lakekeeper#1395)

* chore: release main (lakekeeper#1295)

* chore: added gif to readme (lakekeeper#1396)

* chore: remove unneded `#[allow(dead_code)]` (lakekeeper#1399)

* fix: Use FnOnce for queue & service registration

* Revert "fix: Use FnOnce for queue & service registration"

This reverts commit 47b03a0.

* chore(docs): Add 0.10 docs

* perf(db): remove `join namespace` from `active_tabulars` view (lakekeeper#1401)

* doc(db): how to connect to db and inspect schema (lakekeeper#1402)

* feat: implement `OpenFgaEntity` for `ServerId` (lakekeeper#1394)

* impl OpenFgaEntity
* Use the implementation

* fix: Use FnOnce for queue & service registration (lakekeeper#1404)

* chore(deps): update dependency mkdocs-material to v9.6.21 (lakekeeper#1406)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Expose client-managed X-Iceberg-Access-Delegation (lakekeeper#1407)

* fix: Use higher consistency for some OpenFGA queries (lakekeeper#1408)

* feat: Improve Kubernetes Auth docs (lakekeeper#1415)

* chore: release 0.10.1

Release-As: 0.10.1

* fix: Endpoint stats for Project Endpoints (lakekeeper#1412)

* feat: Add create table guard to cleanup location on Failure (lakekeeper#1418)

* chore: Generate ID types with Macro (lakekeeper#1419)

* chore: Re-Export Tokio from lakekeeper-io create (lakekeeper#1420)

* fix: Add support for `write.metadata.metrics.` Table Properties (lakekeeper#1422)

* fix: Update UI to 0.10.2 (lakekeeper#1423)

* chore: release main (lakekeeper#1403)

* fix: Parse empty ProjectID headers as None (lakekeeper#1424)

* chore: release 0.10.2

Release-As: 0.10.2

* chore: release main (lakekeeper#1425)

* feat: Add `debug_migrate_before_serve` env var (lakekeeper#1426)

* feat: Move OpenFGA Authorizer to separate crate (lakekeeper#1421)

* chore(renovate): Group dependencies

* chore(renovate): ignore additional deps

* chore: Rename src/service -> src/server, trait Catalog -> CatalogStore (lakekeeper#1428)

* feat(examples): add k8s iceberg sink connector (avro) (lakekeeper#1336)


---------

Co-authored-by: Christian <[email protected]>

* chore(ci): Fix release please (lakekeeper#1433)

* feat: Expose License Information via API (lakekeeper#1432)

* fix(deps): update all non-major dependencies (lakekeeper#1429)

* chore(ci): Remove mgmt API version update via release-please

* chore: Restructure catalog_store into multiple modules (lakekeeper#1434)

* feat: Validate Downscoping works on Warehouse creation (lakekeeper#1437)

* chore(ci): Fix release please

* docs: Add info about installing sqlx to developer-guide.md (lakekeeper#1438)

* docs: Update developer-guide.md (lakekeeper#1439)

* chore(deps): update all non-major dependencies (lakekeeper#1436)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: Better normalization for ARNs in S3 Profile (lakekeeper#1441)

* chore(deps): update all non-major dependencies (lakekeeper#1442)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(main): release 0.10.3 (lakekeeper#1427)

* fix: Release Please CI outputs

* fix(ci): Revert 0.10.3 release

* chore(main): release 0.10.3 (lakekeeper#1446)

* feat: Introduce CatalogWarehouseOps & CatalogNamespaceOps abstractions (lakekeeper#1440)

* feat: Allow x-user-agent header (lakekeeper#1453)

* feat: Table & View Ops Abstractions, Improved Error Handling (lakekeeper#1454)

* fix: CORS allow access delegation & etag headers (lakekeeper#1455)

* fix: Headers should be lowercase (lakekeeper#1457)

* chore(tests): Add trino information_schema.tables test (lakekeeper#1456)

* chore: Introduce open-api feature to gate utoipa and swagger (lakekeeper#1458)

* chore: Release As 0.11

* fix: Debug assertion table identifier mismatch for signer (lakekeeper#1460)

* feat: Caching Short-Term-Credentials (STC) (lakekeeper#1459)

* feat: Warehouse Cache (lakekeeper#1462)

* chore(deps): update actions/setup-node action to v6 (lakekeeper#1443)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: Version based Warehouse Cache (lakekeeper#1465)

* feat: AuthZ Server and Project Ops (lakekeeper#1471)

* chore(deps): update github artifact actions (lakekeeper#1461)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: Rename release branch pattern to rel-*

* feat: Catalog returns full Namespace Hierarchy for nested Namespaces (lakekeeper#1472)

---------

Co-authored-by: Christian <[email protected]>
Co-authored-by: Christian Thiel <[email protected]>
Co-authored-by: Dao Thanh Tung <[email protected]>
Co-authored-by: Moritz Zielke <[email protected]>
Co-authored-by: Baptiste Gouhoury <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dolan Antenucci <[email protected]>
Co-authored-by: Anatoly Popov <[email protected]>
Co-authored-by: Andre Luis Anastacio <[email protected]>
Co-authored-by: Scott Haines <[email protected]>
Co-authored-by: Viktor Kessler <[email protected]>
Co-authored-by: Yohan Valencia <[email protected]>
Co-authored-by: Paul Roman <[email protected]>
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