On 2026-11-26 07:06 UTC Indhumathi Muthu Murugesh via dev wrote:
> Hi all,
>
> I would like feedback on a proposed behavior change in the management API,
> currently outlined in PR-6204 <https://github.com/apache/polaris/pull/6204/>
> .
>
> *Problem:*
> An UpdateCatalogRequest that omits properties (for example, when updating
> only storageConfigInfo) currently *removes all catalog properties *except
> default-base-location. Because the generated Java model replaces an absent
> properties field with an empty map, the server cannot distinguish between
> an omitted field and {}. Consequently, it replaces the properties with an
> empty map in both cases. However, the spec specifies that fields required
> in Catalog should "remain unaltered if omitted," and properties is a
> required field.
>
> *Proposed Semantics (as discussed in the PR):*
>
> - Absent (or null): Properties remain unchanged.
> - {}: Properties are cleared.
> - Non-empty map: Replaces the current properties.
>
> With this change, only requests that omit properties will behave
> differently: currently, they clear the properties, but after the change,
> they will preserve them. Requests sending {} or a non-empty map will
> continue to behave as before.
>
> *Implementation Details:*
>
> - In polaris-management-service.yml, UpdateCatalogRequest.properties is
> updated to type: [object, "null"] with a description of the semantics above.
> - The management model generator sets openApiNullable=false (aligning
> with polaris-catalog-service and semantic-models).
> - No template changes are required; UpdateCatalogRequest is the only
> generated class affected.
> - The existing getProperties() != null check in PolarisAdminService will
> then work as intended.
>
> *Java API Impact:*
> UpdateCatalogRequest.getProperties() in polaris-api-management-model will
> now return null when the field is omitted. In-repo readers already check
> for null, and an entry has been added to the Upgrade Notes in the changelog.
>
> *Alternative Considered:*
> Treating {} the same as omitted was considered, but rejected in the PR
> discussion because it would leave no way to explicitly clear the properties.
>
> *Questions for the Team:*
>
> 1. Are there any concerns with the proposed semantics above?
> 2. Is the nullable getProperties() return value acceptable for the
> published model?
>
> Thanks,
> Indhumathi
>
+1 from me on the proposed approach.
For Question 1: The semantics look right to me.
- Absent/null: properties unchanged
- {}: properties cleared
- Non-empty map: properties replaced
This matches what the spec already says about required fields that are
omitted, and keeping {} as an explicit "clear" is important. Treating {}
the same as omitted would leave no way to clear properties.
I also checked the other management update requests (UpdatePrincipalRequest,
UpdatePrincipalRoleRequest, UpdateCatalogRoleRequest). They list properties
as required in the spec, so they don't have this problem.
Question 2: A nullable getProperties() is acceptable. The only in-repo
reader (PolarisAdminService.updateCatalog) already null-checks it, and the
Upgrade Notes entry covers downstream Java users. A @Nullable annotation on
the getter and a line in the spec description saying that null means
"unchanged" would make the contract clearer.
The only behavior change is for requests that omit properties, which were
clearing them before. That looks like a bug fix rather than a supported
behavior, but it deserves the changelog entry it already has.
Thanks,
Akash