You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "mayuriphad (via GitHub)" <gi...@apache.org> on 2026/10/04 04:07:43 UTC
[PR] Treat missing as optional in UpdateNamespacePropertiesResponse [iceberg-python]
mayuriphad opened a new pull request, #4074:
URL: https://github.com/apache/iceberg-python/pull/4074
Closes #4066
# Rationale for this change
In the REST spec, `UpdateNamespacePropertiesResponse` requires only `updated` and `removed`. `missing` is optional and `nullable: true` ("Server's do not need to implement this"). pyiceberg's response model declared `missing: list[str] = Field()` as required. So against a server that omits it (Lakekeeper, or anything built on iceberg-rust's response type), `RestCatalog.update_namespace_properties` raised:
```
pydantic_core._pydantic_core.ValidationError: 1 validation error for UpdateNamespacePropertiesResponse
missing
Field required [type=missing, input_value={'updated': [], 'removed': ['a', 'b']}, input_type=dict]
```
That happens after the server had already applied the update.
`missing` now defaults to an empty list, and an explicit `null` is mapped to `[]`. That keeps `PropertiesUpdateSummary.missing` a `list[str]` as before, so callers see no type change.
# Are these changes tested?
Yes. `test_update_namespace_properties_200_without_missing` covers a response that omits `missing` and one with `"missing": null`. Both fail on `main` with the `ValidationError` above and pass with this change. The rest of `tests/catalog/test_rest.py` passes locally, except `test_rest_catalog_with_google_credentials_path`, which fails on `main` too because `google-auth` isn't installed in my environment.
# Are there any user-facing changes?
Yes, a bug fix: `update_namespace_properties` works with REST servers that omit the optional `missing` field.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] Treat missing as optional in UpdateNamespacePropertiesResponse [iceberg-python]
Posted by "mayuriphad (via GitHub)" <gi...@apache.org>.
mayuriphad commented on PR #4074:
URL: https://github.com/apache/iceberg-python/pull/4074#issuecomment-6489151641
Hi, just a gentle ping on this PR. It's ready for review whenever you have time, and I'm happy to make any changes you'd like. Thanks!
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org