Repository navigation
feat: Version based Warehouse Cache - #1465
Conversation
WalkthroughThis PR introduces a versioning system for warehouses by adding a Changes
Sequence DiagramsequenceDiagram
actor Client
participant API as API Handler
participant Service as Warehouse Service
participant Cache as Warehouse Cache
participant DB as PostgreSQL DB
Client->>API: Update Warehouse (e.g., rename)
API->>Service: update_warehouse(...)
Service->>DB: UPDATE warehouse SET ... RETURNING version
DB->>DB: Trigger: increment version
DB-->>Service: version: 42
Service->>Cache: Insert warehouse with version 42
Cache->>Cache: Check: new_version > cached_version?
alt Version is newer
Cache->>Cache: Update cached entry
else Version is older/equal
Cache->>Cache: Skip (no-op)
end
Service-->>API: ResolvedWarehouse { version: 42 }
API-->>Client: 200 OK + response body
Note over Cache: Later: Cache policy check
Client->>API: Get Table
API->>Service: load_table_cache_aware()
Service->>Cache: Get warehouse by ID
Cache-->>Service: CachedWarehouse { version: 42 }
Service->>Service: Check: CachePolicy::RequireMinimumVersion(42)
Service->>Service: Use cached warehouse
Service-->>API: Table + warehouse_version: 42
API-->>Client: 200 OK
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Areas requiring extra attention:
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/lakekeeper/src/server/tables/load_table.rs (1)
62-68: Remove unnecessary dereference and access the inneri64via.0.
warehouse_versionis a value of typeWarehouseVersion(i64), not a reference.CachePolicy::RequireMinimumVersionexpectsi64. Use:- CachePolicy::RequireMinimumVersion(*warehouse_version), + CachePolicy::RequireMinimumVersion(warehouse_version.0),This same correction applies at line 82 in
crates/lakekeeper/src/server/views/load.rs:- CachePolicy::RequireMinimumVersion(*view.warehouse_version), + CachePolicy::RequireMinimumVersion(view.warehouse_version.0),
🧹 Nitpick comments (12)
crates/lakekeeper/src/service/storage/mod.rs (1)
156-157: Consider adding validation for Memory profile updates to match documented behavior.While this implementation correctly handles the previously unimplemented Memory profile case, it bypasses validation that other profiles perform. The method documentation states it should fail if profiles are incompatible (e.g., location changes), but this simply replaces the profile without checking if
base_locationchanged.For consistency with S3, Adls, and Gcs profiles (which call their own
update_withmethods), consider validating that thebase_locationremains unchanged.Apply this diff to add validation:
#[cfg(feature = "test-utils")] -(StorageProfile::Memory(_this_profile), StorageProfile::Memory(other_profile)) => { - Ok(other_profile.into()) +(StorageProfile::Memory(this_profile), StorageProfile::Memory(other_profile)) => { + if this_profile.base_location != other_profile.base_location { + return Err(UpdateError::IncompatibleProfiles( + format!("memory ({})", this_profile.base_location), + format!("memory ({})", other_profile.base_location), + )); + } + Ok(other_profile.into()) }crates/lakekeeper/migrations/20251027163724_introduce_entity_versions.sql (1)
19-31: Consider usingtextand%Ifor clearer identifier handling.The current approach using
regclassand%sin FORMAT will work, but PostgreSQL convention favors usingtextparameters with the%Iplaceholder for explicit identifier quoting. This makes the intent clearer and avoids implicit type conversions.Suggested refactor:
-CREATE OR REPLACE FUNCTION trigger_updated_at_and_version_if_distinct(tablename regclass) RETURNS VOID AS $$ +CREATE OR REPLACE FUNCTION trigger_updated_at_and_version_if_distinct(tablename text) RETURNS VOID AS $$ BEGIN EXECUTE FORMAT( 'CREATE TRIGGER set_updated_at_and_increment_version BEFORE UPDATE - ON %s + ON %I FOR EACH ROW WHEN (OLD IS DISTINCT FROM NEW) EXECUTE FUNCTION set_updated_at_and_increment_version();', tablename ); END; $$ LANGUAGE plpgsql;And update the function calls:
-SELECT trigger_updated_at_and_version_if_distinct('"project"'); -SELECT trigger_updated_at_and_version_if_distinct('"warehouse"'); -SELECT trigger_updated_at_and_version_if_distinct('"namespace"'); +SELECT trigger_updated_at_and_version_if_distinct('project'); +SELECT trigger_updated_at_and_version_if_distinct('warehouse'); +SELECT trigger_updated_at_and_version_if_distinct('namespace');crates/lakekeeper/src/tests/mod.rs (1)
221-221: Be explicit about the trait object to avoid Vec coercion surprises.
EndpointHookCollection::newtakesVec<Arc<dyn EndpointHook>>. Depending on inference,vec![Arc::new(WarehouseCacheEndpointHook {})]may remainVec<Arc<WarehouseCacheEndpointHook>>. Make the element a trait object explicitly.Apply:
-use crate::{ - service::{ - contract_verification::ContractVerifiers, - endpoint_hooks::EndpointHookCollection, - storage::{StorageCredential, StorageProfile}, - warehouse_cache::WarehouseCacheEndpointHook, - UserId, - }, -}; +use crate::{ + service::{ + contract_verification::ContractVerifiers, + endpoint_hooks::{EndpointHook, EndpointHookCollection}, + storage::{StorageCredential, StorageProfile}, + warehouse_cache::WarehouseCacheEndpointHook, + UserId, + }, +}; @@ - hooks: EndpointHookCollection::new(vec![Arc::new(WarehouseCacheEndpointHook {})]), + hooks: EndpointHookCollection::new(vec![ + Arc::new(WarehouseCacheEndpointHook {}) as Arc<dyn EndpointHook> + ]),Please confirm this compiles across all feature flags (especially
test-utils).crates/lakekeeper/src/server/views/load.rs (1)
81-85: Avoid deref on WarehouseVersion; pass a clear, typed value.
*view.warehouse_versionsuggestsDeref<Target = i64>on a newtype, which is atypical. Prefer explicit extraction or passing the strong type, depending onCachePolicy.Options:
- If
RequireMinimumVersionacceptsWarehouseVersion:- CachePolicy::RequireMinimumVersion(*view.warehouse_version), + CachePolicy::RequireMinimumVersion(view.warehouse_version),
- If it expects an
i64andWarehouseVersion(pub i64):- CachePolicy::RequireMinimumVersion(*view.warehouse_version), + CachePolicy::RequireMinimumVersion(view.warehouse_version.0),
- Or implement
From<WarehouseVersion> for i64and use:- CachePolicy::RequireMinimumVersion(*view.warehouse_version), + CachePolicy::RequireMinimumVersion(view.warehouse_version.into()),Please confirm which signature you want and adjust consistently across load paths (tables/views).
crates/lakekeeper/src/service/catalog_store/view.rs (1)
17-18: CatalogView now carries WarehouseVersion — looks good.Change aligns with versioned cache and view load/commit paths.
Ensure DB indices and query plans consider
warehouse_versionif it’s part of hot-path cache validation queries.Also applies to: 28-29
crates/lakekeeper/src/implementations/postgres/tabular/view/load.rs (1)
119-206: Stabilize array/jsonb aggregation order for deterministic results.
ARRAY_AGG/JSONB_AGGreturn unspecified order; laterizip!assumes aligned arrays. AddORDER BYinside each aggregate.Example adjustments inside the SQL:
- ARRAY_AGG(schema_id) AS schema_ids, - ARRAY_AGG(schema) AS schemas + ARRAY_AGG(schema_id ORDER BY schema_id) AS schema_ids, + ARRAY_AGG(schema ORDER BY schema_id) AS schemas ... - ARRAY_AGG(version_id) AS version_log_ids, - ARRAY_AGG(timestamp) AS version_log_timestamps + ARRAY_AGG(version_id ORDER BY timestamp) AS version_log_ids, + ARRAY_AGG(timestamp ORDER BY timestamp) AS version_log_timestamps ... - ARRAY_AGG(version_id) AS version_ids, + ARRAY_AGG(version_id ORDER BY version_id) AS version_ids, - ARRAY_AGG(summary) AS summaries, + ARRAY_AGG(summary ORDER BY version_id) AS summaries, - ARRAY_AGG(schema_id) AS version_schema_ids, + ARRAY_AGG(schema_id ORDER BY version_id) AS version_schema_ids, - ARRAY_AGG(timestamp) AS version_timestamps, + ARRAY_AGG(timestamp ORDER BY version_id) AS version_timestamps, - ARRAY_AGG(default_namespace_id) AS version_default_namespace_ids, + ARRAY_AGG(default_namespace_id ORDER BY version_id) AS version_default_namespace_ids, - ARRAY_AGG(default_catalog) AS version_default_catalogs, + ARRAY_AGG(default_catalog ORDER BY version_id) AS version_default_catalogs, - JSONB_AGG(typ) as "typ", - JSONB_AGG(sql) as "sql", - JSONB_AGG(dialect) as "dialect" + JSONB_AGG(typ ORDER BY version_id) as "typ", + JSONB_AGG(sql ORDER BY version_id) as "sql", + JSONB_AGG(dialect ORDER BY version_id) as "dialect"crates/lakekeeper/src/service/catalog_store/warehouse.rs (1)
413-422: Consider typing CachePolicy::RequireMinimumVersion with WarehouseVersionImproves type-safety and readability (avoids mixing raw i64). Comparison and logs then use WarehouseVersion directly. Non-blocking, can be deferred.
Example:
- RequireMinimumVersion(i64), + RequireMinimumVersion(WarehouseVersion), @@ - CachePolicy::RequireMinimumVersion(require_min_version) => { + CachePolicy::RequireMinimumVersion(require_min_version) => { @@ - let cache_is_valid = warehouse.version.0 >= require_min_version; + let cache_is_valid = warehouse.version >= require_min_version;Also applies to: 543-581
crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs (1)
109-123: Optional: simplify version comparison with matchCosmetic clippy fix; keeps intent clear.
- if let Some(existing) = ¤t_entry { - let current_version = existing.warehouse.version; - let new_version = warehouse.version; - if new_version < current_version { - ... - return; - } else if new_version == current_version { - ... - return; - } - } + if let Some(existing) = ¤t_entry { + match warehouse.version.cmp(&existing.warehouse.version) { + std::cmp::Ordering::Less | std::cmp::Ordering::Equal => { + tracing::debug!("Skipping insert of warehouse id {warehouse_id} into cache; existing version {} vs new {}", existing.warehouse.version, warehouse.version); + return; + } + std::cmp::Ordering::Greater => {} + } + }crates/lakekeeper/src/implementations/postgres/warehouse.rs (4)
63-65: RETURNING version across updates is correct; add tests to assert version bumps.Good to return version on all mutations. Please add/update tests that:
- Capture old version, perform the update, assert new_version > old_version for each of: set_warehouse_deletion_profile, rename_warehouse, set_warehouse_status, set_warehouse_protection, update_storage_profile.
Also applies to: 533-535, 570-572, 607-609, 650-652
284-285: WarehouseRecord.version: enforce non-negative invariant.Field is i64. If negative slips in, caches could misbehave. Prefer DB CHECK (version >= 0). Optionally guard in code (see next comment).
306-307: Prefer validated conversion for version.If WarehouseVersion supports TryFrom, validate here to fail-fast on bad data.
- version: WarehouseVersion::from(value.version), + version: WarehouseVersion::try_from(value.version) + .map_err(|_| DatabaseIntegrityError::new("invalid warehouse.version from DB"))?,If TryFrom is not available, consider implementing it and adding a DB CHECK (version >= 0).
296-308: Downstream API mapper likely missing version field.ResolvedWarehouse now has version, but management v1 mapper (see api/management/v1/warehouse/mod.rs) appears not to expose it. Align API responses if version is part of the public contract.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
.sqlx/query-367fe5b576e1b20861a378a58b1fb1ee7ed5318cf0e22978486a33e9e4068193.jsonis excluded by!.sqlx/**.sqlx/query-5691c6fcc6ff1ea68bcd4601370e857df265a645246572031bdf7b4265c0f575.jsonis excluded by!.sqlx/**.sqlx/query-56d8028355ea7526d7ea058fd5df0421f6917d9c9d03e311f6e07bfe29b84710.jsonis excluded by!.sqlx/**.sqlx/query-699149ae3d1c7432aae5ad504fa8170521a648955229029d9b79da336aa82f2e.jsonis excluded by!.sqlx/**.sqlx/query-7268056f45996f6a99106a57fa5bf8b6b9a127d5b004683e20d3a1a57387676b.jsonis excluded by!.sqlx/**.sqlx/query-80b88583b4395d85b351b1ffa80156b4514856e8bde1475e9fcab906cd45b670.jsonis excluded by!.sqlx/**.sqlx/query-866c21d361cb3edcb12f126e822c6b90ca6cdbc4b59429d04d2309d2367b9b3a.jsonis excluded by!.sqlx/**.sqlx/query-8818aabd4a0acdb79ff4ce5c3c64b85dd9bb7b2a4facd301be48ce088f39cb02.jsonis excluded by!.sqlx/**.sqlx/query-8fbe746adf4d627635597dcdaaf5eb84dc15773cc07e9b358aa4fd1e8d89ea27.jsonis excluded by!.sqlx/**.sqlx/query-99e60de0f6aed1a2e16aa330765626307b20d78da6110e9b9721dca9e93d04fa.jsonis excluded by!.sqlx/**.sqlx/query-9a1d9b777d4d91c44114e91bbe76e8759d9b0133f4bc278266d3ed7521324a61.jsonis excluded by!.sqlx/**.sqlx/query-abdbc91a03d5a5564ba259916c20563103fe2adb2daa6b50eafceec4f8afab99.jsonis excluded by!.sqlx/**.sqlx/query-c131c632f9bfff038c5b7040c4f7de497151fde0f06dd2e701465a1b8a092361.jsonis excluded by!.sqlx/**
📒 Files selected for processing (17)
crates/lakekeeper/migrations/20251027163724_introduce_entity_versions.sql(1 hunks)crates/lakekeeper/src/api/management/mod.rs(2 hunks)crates/lakekeeper/src/api/management/v1/warehouse/mod.rs(3 hunks)crates/lakekeeper/src/implementations/postgres/tabular/table/mod.rs(5 hunks)crates/lakekeeper/src/implementations/postgres/tabular/view/load.rs(6 hunks)crates/lakekeeper/src/implementations/postgres/warehouse.rs(12 hunks)crates/lakekeeper/src/server/tables/load_table.rs(2 hunks)crates/lakekeeper/src/server/views/commit.rs(1 hunks)crates/lakekeeper/src/server/views/load.rs(1 hunks)crates/lakekeeper/src/service/catalog_store/table.rs(2 hunks)crates/lakekeeper/src/service/catalog_store/view.rs(2 hunks)crates/lakekeeper/src/service/catalog_store/warehouse.rs(4 hunks)crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs(5 hunks)crates/lakekeeper/src/service/storage/mod.rs(1 hunks)crates/lakekeeper/src/tests/mod.rs(4 hunks)crates/lakekeeper/src/tests/warehouse_ops.rs(1 hunks)docs/docs/api/management-open-api.yaml(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
crates/lakekeeper/src/service/catalog_store/warehouse.rs (1)
crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs (1)
warehouse_cache_get_by_id(143-155)
crates/lakekeeper/src/tests/warehouse_ops.rs (5)
crates/lakekeeper/src/implementations/postgres/warehouse.rs (10)
from(676-681)create_warehouse(81-152)get_warehouse_by_id(391-428)get_warehouse_by_name(353-389)list_warehouses(311-351)set_warehouse_status(550-585)rename_warehouse(512-548)update_storage_profile(624-666)set_warehouse_protection(587-622)set_warehouse_deletion_profile(32-79)crates/lakekeeper/src/tests/mod.rs (2)
memory_io_profile(54-56)random_request_metadata(228-230)crates/lakekeeper/src/api/management/v1/warehouse/mod.rs (11)
default(143-145)from(1245-1257)create_warehouse(311-413)warehouse_id(154-156)warehouses(443-446)list_warehouses(415-462)rename_warehouse(586-622)update_warehouse_delete_profile(624-661)set_warehouse_protection(547-584)expiration_seconds(134-139)update_storage(723-809)crates/lakekeeper/src/service/catalog_store/warehouse.rs (10)
create_warehouse(430-449)get_warehouse_by_id(499-517)require_warehouse_by_id(588-595)get_warehouse_by_name(607-624)list_warehouses(473-494)set_warehouse_status(649-657)rename_warehouse(462-470)get_warehouse_by_id_cache_aware(520-585)update_storage_profile(659-673)set_warehouse_deletion_profile(639-647)crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs (4)
create_warehouse(195-202)rename_warehouse(225-233)update_warehouse_delete_profile(235-247)set_warehouse_protection(215-223)
crates/lakekeeper/src/tests/mod.rs (1)
crates/lakekeeper/src/service/endpoint_hooks.rs (1)
new(46-48)
crates/lakekeeper/src/implementations/postgres/warehouse.rs (1)
crates/lakekeeper/src/api/management/v1/warehouse/mod.rs (1)
from(1245-1257)
🪛 GitHub Check: clippy
crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs
[failure] 111-111:
if chain can be rewritten with match
⏰ 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). (7)
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: check-generated-openapi-matches
- GitHub Check: sqlx-check
- GitHub Check: test
🔇 Additional comments (16)
crates/lakekeeper/migrations/20251027163724_introduce_entity_versions.sql (3)
2-7: ✓ Column additions are sound.Adding non-null version columns with a sensible default (0) to the three tables is a safe operation that won't corrupt existing data.
10-16: ✓ Trigger function logic is correct.The function correctly increments the version from the previous value and updates the timestamp. The RETURNS TRIGGER signature is appropriate.
33-41: ✓ Trigger lifecycle management is sound.Using
DROP TRIGGER IF EXISTSbefore creation is the correct approach. Reusing the same trigger name across different tables (which are table-scoped) is appropriate and makes the intent clear.crates/lakekeeper/src/tests/mod.rs (1)
1-2: LGTM on test scaffolding additions.Arc import, new
warehouse_opstest module, and the hook wiring are consistent with versioned warehouse cache tests.Also applies to: 38-39, 20-21
crates/lakekeeper/src/service/catalog_store/table.rs (1)
20-21: Switch to WarehouseVersion looks consistent.
LoadTableResponsenow carrieswarehouse_version: WarehouseVersion. This aligns with version-based caching.Please verify all constructors/call sites now populate
warehouse_versionand that serialization (if any) is updated accordingly.Also applies to: 31-32
crates/lakekeeper/src/server/views/commit.rs (1)
209-215: Confirm warehouse_version semantics on commit.You set
warehouse_version: previous_view.warehouse_version. If the DB increments warehouse version on commit, ensure the persisted row ends up with the new warehouse version (DB trigger or store layer) and this field isn’t written stale.If the store relies on the app-supplied value, consider populating from the authoritative source (e.g., returning version from
commit_view_implor reading it post-commit) to avoid drift.crates/lakekeeper/src/implementations/postgres/tabular/view/load.rs (1)
41-67: WarehouseVersion propagation is consistent.Selecting
w.versionand threadingwarehouse_versionintoCatalogViewlooks good.Also applies to: 91-117, 119-206, 384-408
docs/docs/api/management-open-api.yaml (1)
1747-1750: 200 body for delete-profile is correctly aligned with handler.Verification confirms: handler returns
GetWarehouseResponse, spec defines matching 200 response body, and no 204 response exists. Code and documentation are in sync.crates/lakekeeper/src/api/management/mod.rs (1)
822-823: Delete-profile endpoint response change verified—no external callers found.Code, OpenAPI documentation, and internal tests are consistent. The endpoint returns 200 with GetWarehouseResponse body (lines 822-823, 835-843) and this is correctly documented in the OpenAPI spec. No HTTP client code in the codebase was found calling this endpoint, so there are no callers to update. Internal tests using this function directly work correctly with the new response format.
crates/lakekeeper/src/api/management/v1/warehouse/mod.rs (2)
97-114: Good addition: derive PartialEq/Eq on TabularDeleteProfileEnables straightforward comparisons in tests and cache logic.
629-661: OpenAPI spec already documents GetWarehouseResponse response; breaking change is implemented. Version field suggestion remains pending.The endpoint change returning
GetWarehouseResponseinstead of an empty body is already documented in the OpenAPI spec (line 1750 ofmanagement-open-api.yaml). Tests have been updated accordingly (warehouse_ops.rs:567, 1236).The suggestion to add a version field to
GetWarehouseResponsefor cache policies remains unimplemented—the current schema lacks such a field. If downstream clients exist in this repository, they would need to be verified for compatibility with the new response body.crates/lakekeeper/src/service/catalog_store/warehouse_cache.rs (2)
44-79: Selective name-index invalidation on Replaced evictions looks goodPrevents unnecessary churn of NAME_TO_ID_CACHE while keeping mappings correct on rename/project changes.
If clippy flags this block, feel free to ignore; behavior is clear and intentional.
102-132: Version-aware insertion policy is correctSkipping insert on <= version prevents cache regressions. Nice.
crates/lakekeeper/src/implementations/postgres/warehouse.rs (3)
119-121: Insert path: ensure version default is set.SELECT * FROM whi returns version as inserted. This relies on warehouse.version having a DEFAULT. If missing, FromRow will fail at runtime. Please confirm migration sets DEFAULT 0 (or 1) and NOT NULL.
334-336: All WarehouseRecord queries correctly include 'version'—no issues found.Verification of all 9
query_as!(WarehouseRecord)calls in the file confirms thatversionis present in every query (lines 46, 97, 321, 358, 399, 517, 555, 592, 633). No FromRow mismatches exist.
27-28: Version wiring is complete and correct.All concerns verified:
- ✓ Migration adds
warehouse.version BIGINT NOT NULL DEFAULT 0- ✓ Trigger
trigger_updated_at_and_version_if_distinctapplied to warehouse table- ✓ WarehouseRecord struct includes
version: i64field- ✓ All INSERT/UPDATE queries include
versionin RETURNING clause- ✓ TryFrom properly maps
WarehouseVersion::from(value.version)- ✓ WarehouseVersion type defined as newtype wrapper
struct WarehouseVersion(i64)- ✓ Import present at line 27
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
|
@CodeRabbit review, resolve if solved |
|
@c-thiel I'll review the changes and resolve any previously flagged issues that have been addressed. ✅ Actions performedComments resolved and changes approved. Review triggered.
|
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/docs/configuration.md (1)
268-280: Fix malformed Warehouse Cache configuration table.The Warehouse Cache table is missing a proper header row. Lines 269–270 show the table structure exists (header and separator row), but the formatting appears incomplete or corrupted. Compare this to the STC Cache table above (lines 252–255), which has a well-formed structure.
Ensure the Warehouse Cache table is properly formatted with both header and data rows intact:
-| Configuration Key | Type | Default | Description | -|------------------------------------------------------|---------|---------|-----| | <nobr>`LAKEKEEPER__CACHE__WAREHOUSE__ENABLED`<nobr> | boolean | `true` | Enable/disable warehouse caching. Default: `true` | | <nobr>`LAKEKEEPER__CACHE__WAREHOUSE__CAPACITY`<nobr> | integer | `1000` | Maximum number of warehouses to cache. Default: `1000` |Verify the header row content is correct and properly aligned with the data rows.
🧹 Nitpick comments (1)
docs/docs/configuration.md (1)
257-257: Standardize subsection formatting for consistency.Lines 257 and 276 use italic emphasis (
*text*) to introduce subsection headings ("Expiry Mechanism" and "Metrics"), while other structural elements in the document use different patterns. For better consistency and maintainability, consider adopting a uniform approach: either use proper heading hierarchy (level-5#####) or standardize the emphasis format throughout the cache configuration sections.Currently:
- STC Cache uses italic for "Expiry Mechanism" and introduces metrics with "Metrics:"
- Warehouse Cache uses italic for "Metrics:"
For clarity and maintainability, consider upgrading to proper headings:
-*Expiry Mechanism*: Cached credentials automatically expire based on the validity period... +##### Expiry Mechanism + +Cached credentials automatically expire based on the validity period...This approach improves document structure and makes subsections more discoverable in the table of contents.
Also applies to: 276-276
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/docs/configuration.md(3 hunks)docs/docs/developer-guide.md(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-24T11:22:41.758Z
Learnt from: c-thiel
PR: lakekeeper/lakekeeper#1459
File: crates/lakekeeper/src/service/storage/s3.rs:521-527
Timestamp: 2025-10-24T11:22:41.758Z
Learning: In the STC caching implementation for S3 credentials in crates/lakekeeper/src/service/storage/s3.rs, the cache TTL is intentionally computed from the requested sts_token_validity_seconds using Instant (monotonic time) rather than the credential's expiration timestamp (SystemTime). This design avoids dependency on system clock accuracy and potential issues from clock drift/skew, which is more important than the slight risk of caching credentials beyond their actual expiration when the provider returns a shorter validity than requested.
Applied to files:
docs/docs/configuration.md
🪛 markdownlint-cli2 (0.18.1)
docs/docs/configuration.md
248-248: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
265-265: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
docs/docs/developer-guide.md
48-48: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
58-58: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
⏰ 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). (7)
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: docker / docker
- GitHub Check: test
- GitHub Check: clippy
- GitHub Check: sqlx-check
* 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]>
Summary by CodeRabbit
New Features
Improvements
Documentation