[Improvement] Support built-in Iceberg compaction policy creation in Web UI
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### What would you like to be improved?
The Web UI policy creation dialog currently only exposes the `Custom` policy type. However, Gravitino already supports the built-in Iceberg compaction policy type `system_iceberg_compaction` through the REST API and Java client.
As a result, users can create an Iceberg compaction policy with REST, but cannot do the same from the Web UI.
Relevant current behavior:
- `web-v2/web/src/app/compliance/policies/CreatePolicyDialog.js` defaults `policyType` to `custom`.
- The policy type `` only contains `Custom`.
- The submit payload always builds custom policy content with `customRules`, `supportedObjectTypes`, and `properties`.
### How should we improve?
Add Web UI support for creating and viewing/editing built-in Iceberg compaction policies.
Suggested scope:
- Add `system_iceberg_compaction` as a policy type option in the policy creation dialog.
- For this type, submit typed Iceberg compaction content instead of custom policy content.
- Support default content `{}` so the backend can apply the default compaction policy values.
- Optionally expose advanced fields such as `minDataFileMse`, `minDeleteFileNumber`, `dataFileMseWeight`, `deleteFileNumberWeight`, `maxPartitionNum`, and `rewriteOptions`.
- Ensure the policy details drawer can display typed built-in policy rules/properties clearly.
Contributor guide
Research direction
Start in web-v2/web/src/app/compliance/policies/CreatePolicyDialog.js and trace the policy type selection and submit payload, then locate the policy details drawer's current rendering path. Done means the dialog can create the built-in Iceberg compaction type with default content, and its rules and properties are clearly displayed when viewed or edited.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100