Repository navigation
Conversation
|
Warning Rate limit exceeded@c-thiel has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 13 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe rename_table flow now authorizes against the destination namespace instead of the source. It derives destination_namespace_id from destination.namespace, calls require_namespace_action(CanCreateTable) on it, and maps authorization errors to a not-found-like status via map_err before continuing with existing logic. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant TablesAPI as Tables::rename_table
participant AuthZ as Authorization
participant Catalog as Catalog Store
Client->>TablesAPI: rename_table(source, destination)
TablesAPI->>TablesAPI: compute destination_namespace_id
TablesAPI->>AuthZ: require_namespace_action(dest_id, CanCreateTable)
AuthZ-->>TablesAPI: allow/deny
alt deny
TablesAPI->>Client: error (mapped to not-found-like)
else allow
TablesAPI->>Catalog: perform rename with existing logic
Catalog-->>TablesAPI: result
TablesAPI-->>Client: success
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
crates/lakekeeper/src/catalog/tables.rs (2)
918-919: Authorize against destination namespace: correct fix; consider early no-op fast pathGood change to resolve and authorize against the destination namespace. This aligns the check with where the rename will land.
Optional: Short-circuit no-op renames before the destination-namespace lookup and auth to avoid requiring CanCreateTable when source == destination.
Example (outside this hunk, place just before computing destination_namespace_id):
if source == destination { return Ok(()); }
925-930: Nit: prefer function pointer in map_err for consistencyUse the function directly to match other call sites and simplify the code.
- .await - .map_err(|e| set_not_found_status_code(e))?; + .await + .map_err(set_not_found_status_code)?;This still ensures a not-found-like status when the destination namespace doesn't exist or when authorization should not leak existence.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
crates/lakekeeper/src/catalog/tables.rs(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
crates/lakekeeper/src/catalog/tables.rs (2)
crates/iceberg-ext/src/catalog/rest/table.rs (1)
RenameTableRequest(58-61)crates/iceberg-ext/src/catalog/mod.rs (2)
test_table_ident_serialization(58-66)table(27-27)
98e51db to
9493ee6
Compare
✅ PR Title Formatted CorrectlyThe title of this PR match the correct format. Thank you! |
|
Closed in favor of #1346 |
Summary by CodeRabbit