You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "yj-lee0503 (via GitHub)" <gi...@apache.org> on 2026/08/08 01:52:49 UTC
[PR] Console: allow setting connection-type-specific fields on EXTERNAL catalogs [polaris-tools]
yj-lee0503 opened a new pull request, #267:
URL: https://github.com/apache/polaris-tools/pull/267
## Problem
The create-catalog form supports `EXTERNAL` catalogs but collects none of the connection-type-specific fields, because `ConnectionConfigInfo` in `console/src/types/api.ts` mirrors only the spec's base schema:
| Connection type | Missing field | Declared on |
|---|---|---|
| `ICEBERG_REST` | `remoteCatalogName` | [`IcebergRestConnectionConfigInfo`](https://github.com/apache/polaris-tools/blob/e5fea020aedcb1834f306d9a13de7fccbfff1943/console/spec/polaris-management-service.yml#L937-L947) |
| `HADOOP` | `warehouse` | [`HadoopConnectionConfigInfo`](https://github.com/apache/polaris-tools/blob/e5fea020aedcb1834f306d9a13de7fccbfff1943/console/spec/polaris-management-service.yml#L949-L957) |
| `HIVE` | `warehouse` | [`HiveConnectionConfigInfo`](https://github.com/apache/polaris-tools/blob/e5fea020aedcb1834f306d9a13de7fccbfff1943/console/spec/polaris-management-service.yml#L959-L967) |
All three are selectable in the form. The server accepts the resulting catalog, so the failure is deferred to first use rather than surfacing at create time.
For `ICEBERG_REST` the consequence is concrete: the spec describes `remoteCatalogName` as translating "into a 'prefix' added to all REST resource paths", so a prefix-scoped remote rejects the proxied request and namespace listing returns `400`.
Reported in #266, which has the reproduction.
## Change
Adds both fields to the flattened `ConnectionConfigInfo`, following how `StorageConfigInfo` handles the S3/Azure/GCS discriminator in the same file, renders them conditionally on the selected connection type, and displays them on the catalog details page gated the same way the storage section is.
The payload builder filters by connection type as well as presence: [`react-hook-form` retains values for unmounted fields](https://react-hook-form.com/docs/useform#shouldUnregister) by default, so a name typed under `ICEBERG_REST` would otherwise be submitted after switching to `HADOOP`.
Both fields are optional and nothing existing changes behavior; the diff is additive.
## Testing
`make lint` and `make build` (which covers `format-check`) are clean.
Verified against a live Polaris 1.5.0: a federated catalog created with `remoteCatalogName` set resolves and lists namespaces, where the same catalog without it returns `400`. That was done through the management API, so it confirms the server behavior and the payload shape rather than the browser interaction.
`HADOOP` and `HIVE` are compile-and-render only; I have no such remote to test against. Both take the same code path as `ICEBERG_REST` apart from the field name.
## Notes
- **No spec change needed.** All three subtypes already declare these fields.
- **`EditCatalogModal` is untouched deliberately.** [`UpdateCatalogRequest`](https://github.com/apache/polaris-tools/blob/e5fea020aedcb1834f306d9a13de7fccbfff1943/console/spec/polaris-management-service.yml#L1208-L1221) accepts only `currentEntityVersion`, `properties`, and `storageConfigInfo`, so a field there would be a control that does nothing. This differs from the storage field proposed in #261, which the edit modal can handle.
- **Flattened rather than discriminated.** Proper subtypes would be more faithful to the spec, but `StorageConfigInfo` in the same file is flattened, so this follows the local convention. Happy to rework if you would rather change the pattern.
- **The unused `icebergRemoteCatalogName` / `hadoopWarehouse` on `CreateCatalogRequest` (`api.ts:83-84`) are left alone.** They sit flat on the catalog object rather than under `connectionConfigInfo`, are never assigned, and cover only two of the three types. Removing them is a separate cleanup.
- The spec marks `ConnectionConfigInfo` experimental; that applies equally to the existing `uri` and `authenticationParameters` fields.
--
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@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org