mchades commented on code in PR #15028: URL: https://github.com/apache/gravitino/pull/15028#discussion_r4599422326
########## docs/open-api/policies.yaml: ########## @@ -303,6 +303,44 @@ paths: components: + # YAML-only merge source for TMS execution peers. Not a public schema: each maintenance + # content object inlines these properties so additionalProperties: false still accepts them. + x-gravitino-policy-execution-peer-properties: &policy-execution-peer-properties + timeTrigger: + type: string + nullable: true + description: > + Optional six-field Quartz cron (`second minute hour day-of-month month day-of-week`). + When due, PolicyExpand schedules cron maintenance for matching tables. + commitTrigger: + type: boolean + nullable: true + description: > + When true, a successful Iceberg REST table update can enqueue commit-triggered + maintenance. Orphan file removal rejects `commitTrigger=true`. Review Comment: nit: This orphan-specific sentence renders into all four content schemas via the merge, and `IcebergOrphanFileRemovalContent`'s own schema description already states the rejection (line ~474). Consider dropping it here — or, if you want per-type precision, override `commitTrigger` under the orphan schema's `properties` (an explicit key wins over the YAML merge), e.g. restricting it to `enum: [false]`. ########## docs/open-api/policies.yaml: ########## @@ -303,6 +303,44 @@ paths: components: + # YAML-only merge source for TMS execution peers. Not a public schema: each maintenance + # content object inlines these properties so additionalProperties: false still accepts them. + x-gravitino-policy-execution-peer-properties: &policy-execution-peer-properties + timeTrigger: + type: string + nullable: true + description: > + Optional six-field Quartz cron (`second minute hour day-of-month month day-of-week`). + When due, PolicyExpand schedules cron maintenance for matching tables. + commitTrigger: + type: boolean + nullable: true + description: > + When true, a successful Iceberg REST table update can enqueue commit-triggered + maintenance. Orphan file removal rejects `commitTrigger=true`. + minIntervalMs: + type: integer + format: int64 + minimum: 0 + nullable: true + description: > + Optional cooldown in milliseconds after a finished run of this policy on a table. + When omitted, the server uses the per-type default. + jobOptions: + type: object + additionalProperties: + type: string + minLength: 1 + description: Optional Spark/job option bag. Keys and values must be non-blank. + updaterOptions: + type: object + additionalProperties: + type: string + minLength: 1 + description: > + Optional updater option bag (for example `gravitino_uri`). Keys and values must be + non-blank. Review Comment: Two small fidelity gaps vs `PolicyExecutionSpec.of`: 1. `minLength: 1` still allows whitespace-only values like `" "`, which the server rejects via `StringUtils.isNotBlank` on both keys and values. Consider a `pattern` on the values, or soften the wording to "non-empty". (Non-blank map keys can't be expressed in OAS 3.0, so keeping that in prose is fine.) 2. The three scalar peers are `nullable: true` but these aren't — the server accepts `"jobOptions": null` on input as unset, so `nullable: true` would be more consistent. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
