Skip to content

policy: rename DeltaSharing actions to TableSharing, add OpenSharing aliases#237

Open
harshavardhana wants to merge 1 commit into
mainfrom
policy-table-sharing-rename
Open

policy: rename DeltaSharing actions to TableSharing, add OpenSharing aliases#237
harshavardhana wants to merge 1 commit into
mainfrom
policy-table-sharing-rename

Conversation

@harshavardhana

@harshavardhana harshavardhana commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Introduces TableSharing* admin action constants (admin:TableSharing*) as the canonical name for MinIO AIStor
  • Adds OpenSharing* as source-level aliases resolving to the same action strings (open-standard protocol name)
  • Retains DeltaSharing* as source-compatible aliases so existing callers compile without changes
  • All three families map to identical wire values — single map entry in SupportedAdminActions, no extra policy lookups, no migration needed

Validation

go build ./policy/...
go test -race ./policy/...

Both pass clean.

Summary by CodeRabbit

  • New Features
    • Added support for table sharing admin actions, enabling management of shares and access tokens
    • Introduced OpenSharing and DeltaSharing as alternative naming conventions for table-sharing operations, providing unified action recognition and compatibility

…aliases

TableSharing is the canonical name for MinIO AIStor. OpenSharing is the
open-standard protocol name. Both are aliases that resolve to the same
admin:TableSharing* action strings, so no policy migration is needed.

DeltaSharing constants are kept as source-compatible aliases for existing
callers but all three families now map to the same wire values.
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR introduces canonical admin:TableSharing* admin action constants and defines OpenSharing* and DeltaSharing* as aliases to those same actions. The SupportedAdminActions map is updated to register the canonical table-sharing actions, consolidating distinct action strings under unified naming.

Changes

Table Sharing Admin Actions

Layer / File(s) Summary
Table sharing action constants and aliases
policy/admin-action.go
Adds nine new TableSharingAdminAction, TableSharingCreateShareAction, and related constants using admin:TableSharing strings. Defines OpenSharing* and DeltaSharing* as new/updated exported constants that alias the corresponding TableSharing* action strings.
Supported actions map registration
policy/admin-action.go
Updates SupportedAdminActions to register the new TableSharing* action constants, replacing the previous distinct DeltaSharing* entries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Sharing tables far and wide,
Constants unified with pride,
Aliases dance in harmony,
Delta, Open, TableSharing spree!
A simple hop to clarity.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: renaming DeltaSharing actions to TableSharing and adding OpenSharing aliases, which matches the core purpose of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch policy-table-sharing-rename

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@policy/admin-action.go`:
- Around line 312-328: The DeltaSharing* aliases (e.g.,
DeltaSharingCreateShareAction) must remain accepted by string-based
validation/matching: update SupportedAdminActions and/or AdminAction.IsValid()
to recognize legacy "admin:DeltaSharing*" literals while keeping the canonical
constants as TableSharing*; specifically ensure DeltaSharingCreateShareAction,
DeltaSharingDeleteShareAction, DeltaSharingListSharesAction,
DeltaSharingGetShareAction, DeltaSharingUpdateShareAction,
DeltaSharingCreateTokenAction, DeltaSharingDeleteTokenAction,
DeltaSharingListTokensAction are included in the set checked by
SupportedAdminActions (or have IsValid() consult a backward-compatibility map
from legacy string -> canonical TableSharing*), so persisted policies containing
"admin:DeltaSharing..." continue to validate/match but any new outputs still use
the TableSharing* canonical names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: df4f939c-e1ba-44b2-a39f-a0ae3ce9501b

📥 Commits

Reviewing files that changed from the base of the PR and between 63865ce and b128feb.

📒 Files selected for processing (1)
  • policy/admin-action.go

Comment thread policy/admin-action.go
Comment on lines +312 to +328
DeltaSharingAdminAction = TableSharingAdminAction
// DeltaSharingCreateShareAction - allow creating Delta Sharing shares
DeltaSharingCreateShareAction = "admin:DeltaSharingCreateShare"
DeltaSharingCreateShareAction = TableSharingCreateShareAction
// DeltaSharingDeleteShareAction - allow deleting Delta Sharing shares
DeltaSharingDeleteShareAction = "admin:DeltaSharingDeleteShare"
DeltaSharingDeleteShareAction = TableSharingDeleteShareAction
// DeltaSharingListSharesAction - allow listing Delta Sharing shares
DeltaSharingListSharesAction = "admin:DeltaSharingListShares"
DeltaSharingListSharesAction = TableSharingListSharesAction
// DeltaSharingGetShareAction - allow getting Delta Sharing share details
DeltaSharingGetShareAction = "admin:DeltaSharingGetShare"
DeltaSharingGetShareAction = TableSharingGetShareAction
// DeltaSharingUpdateShareAction - allow updating Delta Sharing shares
DeltaSharingUpdateShareAction = "admin:DeltaSharingUpdateShare"
DeltaSharingUpdateShareAction = TableSharingUpdateShareAction
// DeltaSharingCreateTokenAction - allow creating Delta Sharing tokens
DeltaSharingCreateTokenAction = "admin:DeltaSharingCreateToken"
DeltaSharingCreateTokenAction = TableSharingCreateTokenAction
// DeltaSharingDeleteTokenAction - allow deleting Delta Sharing tokens
DeltaSharingDeleteTokenAction = "admin:DeltaSharingDeleteToken"
DeltaSharingDeleteTokenAction = TableSharingDeleteTokenAction
// DeltaSharingListTokensAction - allow listing Delta Sharing tokens
DeltaSharingListTokensAction = "admin:DeltaSharingListTokens"
DeltaSharingListTokensAction = TableSharingListTokensAction

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Legacy admin:DeltaSharing* policy strings are no longer recognized.

Line 312-328 aliases DeltaSharing* identifiers to new admin:TableSharing* values, and Line 439-447 registers only TableSharing* in SupportedAdminActions. Because validation/matching is string-based (see AdminAction.IsValid()), persisted policies containing old literals like admin:DeltaSharingCreateShare will fail to validate/match after upgrade.

Please preserve legacy wire-string compatibility (e.g., keep legacy admin:DeltaSharing* strings accepted in validation/matching, even if canonical output is TableSharing*).

Based on learnings, rename/removal should be treated as breaking specifically when persisted policy data may still reference old action strings, which is the risk introduced here.

Also applies to: 439-447

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

In `@policy/admin-action.go` around lines 312 - 328, The DeltaSharing* aliases
(e.g., DeltaSharingCreateShareAction) must remain accepted by string-based
validation/matching: update SupportedAdminActions and/or AdminAction.IsValid()
to recognize legacy "admin:DeltaSharing*" literals while keeping the canonical
constants as TableSharing*; specifically ensure DeltaSharingCreateShareAction,
DeltaSharingDeleteShareAction, DeltaSharingListSharesAction,
DeltaSharingGetShareAction, DeltaSharingUpdateShareAction,
DeltaSharingCreateTokenAction, DeltaSharingDeleteTokenAction,
DeltaSharingListTokensAction are included in the set checked by
SupportedAdminActions (or have IsValid() consult a backward-compatibility map
from legacy string -> canonical TableSharing*), so persisted policies containing
"admin:DeltaSharing..." continue to validate/match but any new outputs still use
the TableSharing* canonical names.

Source: Learnings

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