Skip to content

feat: Table tagging related changes#236

Merged
harshavardhana merged 2 commits into
minio:mainfrom
taran-p:feat/table-tags
Jun 12, 2026
Merged

feat: Table tagging related changes#236
harshavardhana merged 2 commits into
minio:mainfrom
taran-p:feat/table-tags

Conversation

@taran-p

@taran-p taran-p commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
  • Adds WarehouseTag and TableTag condition keys
  • Replaces TagResourceAction, untag, and list with TagTableAction and TagWarehouseAction
  • Adds withWarehouseCommon, withTableCommon, and withViewCommon for condition key map creation to centralzie the most common conditon key sets.

See https://github.com/miniohq/aistor/pull/5687

Summary by CodeRabbit

  • New Features

    • Added IAM condition keys for S3 Tables warehouse and table tagging.
    • Added policy actions for tagging, untagging, and listing tags on S3 Tables warehouses and tables.
  • Chores

    • Removed legacy resource-level tagging actions in favor of dedicated warehouse and table operations.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR extends MinIO S3 Tables IAM policy support by introducing dedicated warehouse and table tagging operations. New condition keys are registered, action constants replace resource-level tagging with warehouse/table-specific variants, and the condition-key mapping logic is refactored to use helper closures that automatically include tag keys for relevant actions.

Changes

S3 Tables Warehouse and Table Tagging Policy Support

Layer / File(s) Summary
Condition key definitions
policy/condition/keyname.go
New S3TablesWarehouseTag and S3TablesTableTag condition key constants are added and registered in AllSupportedKeys to support warehouse and table tag policy conditions.
Table action constants and registration
policy/table-action.go
New action constants for tagging, untagging, and listing tags on warehouses and tables replace removed resource-level tagging actions; SupportedTableActions is updated with the new actions.
Condition-key mapping refactoring
policy/table-action.go
Warehouse and table tag condition keys are defined; helper closures (withWarehouseCommon, withTableCommon, withViewCommon) are introduced to automatically include common and tag-specific keys; per-action mappings in createTableActionConditionKeyMap are rewritten to use the helpers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Tags take flight on warehouse breeze,
Tables tagged with S3 ease,
Conditions map in helper's grace,
MinIO policy finds its place!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Table tagging related changes' is vague and does not clearly convey the main changes: refactoring generic resource actions to warehouse/table-specific actions and introducing new condition keys. Consider a more specific title like 'Replace generic resource tagging actions with warehouse and table-specific actions' to better describe the primary refactoring.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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/table-action.go`:
- Around line 211-223: Restore the legacy exported constants
(S3TablesTagResourceAction, S3TablesUntagResourceAction,
S3TablesListTagsForResourceAction) as deprecated aliases that map to the new
names (e.g. S3TablesTagResourceAction = S3TablesTagTableAction or appropriate
mapping), and ensure those legacy strings are included in SupportedTableActions
so ValidateTable continues to accept existing persisted policies; also add the
same deprecated aliases for the warehouse variants referenced around the later
block (the other set at lines ~288-293) so both table and warehouse legacy
symbols remain exported for v3 compatibility.
🪄 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: 21ed3803-0e80-4a62-8414-fca4a6ed88cb

📥 Commits

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

📒 Files selected for processing (2)
  • policy/condition/keyname.go
  • policy/table-action.go

Comment thread policy/table-action.go
@harshavardhana harshavardhana merged commit 4d6cf68 into minio:main Jun 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants