fix(console): allow setting connection-type-specific fields on EXTERNAL catalogs - #267
Open
yj-lee0503 wants to merge 1 commit into
Open
fix(console): allow setting connection-type-specific fields on EXTERNAL catalogs#267yj-lee0503 wants to merge 1 commit into
yj-lee0503 wants to merge 1 commit into
Conversation
yj-lee0503
force-pushed
the
console-connection-type-fields
branch
4 times, most recently
from
August 9, 2026 03:38
2e2fa20 to
1129fb1
Compare
…AL catalogs The create-catalog form collects the shared connection settings but none of the type-specific ones, so an EXTERNAL catalog can be created that the server accepts and that cannot resolve against a remote which needs them. ConnectionConfigInfo mirrored only the base schema. The spec declares remoteCatalogName on IcebergRestConnectionConfigInfo and warehouse on the Hadoop and Hive variants, and all three connection types are selectable in the form. Adds both fields to the flattened interface, following how StorageConfigInfo already handles the S3/Azure/GCS discriminator, renders them conditionally on the selected connection type, and displays them on the catalog details page. The form guards on connection type in two places for different reasons. Rendering is gated so a field only appears for the types it applies to. The payload builder filters by type as well as presence because react-hook-form retains values for unmounted fields, so a name typed under ICEBERG_REST would otherwise be submitted after switching to HADOOP. The details page guards on presence alone. The discriminated union means a response for one connection type cannot carry another's field, so a type check there would exclude nothing. Fixes apache#266
yj-lee0503
force-pushed
the
console-connection-type-fields
branch
from
August 10, 2026 17:04
1129fb1 to
2a1a264
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The create-catalog form supports
EXTERNALcatalogs but collects none of the connection-type-specific fields, becauseConnectionConfigInfoinconsole/src/types/api.tsmirrors only the spec's base schema:ICEBERG_RESTremoteCatalogNameIcebergRestConnectionConfigInfoHADOOPwarehouseHadoopConnectionConfigInfoHIVEwarehouseHiveConnectionConfigInfoAll 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_RESTthe consequence is concrete: the spec describesremoteCatalogNameas translating "into a 'prefix' added to all REST resource paths", so a prefix-scoped remote rejects the proxied request and namespace listing returns400.The Iceberg REST federation docs document this as user-facing configuration — "supply it when the remote server multiplexes multiple logical catalogs under one URI" — and the CLI exposes it as
--iceberg-remote-catalog-name. The console is the only surface that cannot set it.Reported in #266, which has the reproduction.
Change
Adds both fields to the flattened
ConnectionConfigInfo, following howStorageConfigInfohandles the S3/Azure/GCS discriminator in the same file, and renders them conditionally on the selected connection type.Connection type is checked in two places, for different reasons. Rendering is gated so a field only appears for the types it applies to. The payload builder filters by type as well as presence, because
react-hook-formretains values for unmounted fields by default, so a name typed underICEBERG_RESTwould otherwise be submitted after switching toHADOOP.The details page guards on presence alone. The discriminator means a response for one connection type cannot carry another's field, so a type check there would exclude nothing.
Both fields are optional and nothing existing changes behavior; the diff is additive.
Testing
make lintandmake build(which coversformat-check) are clean.Verified against a live Polaris 1.5.0: a federated catalog created with
remoteCatalogNameset resolves and lists namespaces, where the same catalog without it returns400. That was done through the management API, so it confirms the server behavior and the payload shape rather than the browser interaction.HADOOPandHIVEare compile-and-render only; I have no such remote to test against. Both take the same code path asICEBERG_RESTapart from the field name.Notes
EditCatalogModalis untouched deliberately.UpdateCatalogRequestaccepts onlycurrentEntityVersion,properties, andstorageConfigInfo, so a field there would be a control that does nothing. This differs from the storage field proposed in Console: add kmsUnavailable option for S3 catalogs #261, which the edit modal can handle.StorageConfigInfoin the same file is flattened, so this follows the local convention. Happy to rework if you would rather change the pattern.UpdateCatalogRequestdoes not acceptconnectionConfigInfoat all.uriand the auth fields already had this limitation; these two inherit it.icebergRemoteCatalogName/hadoopWarehouseonCreateCatalogRequest(api.ts:83-84) are left alone. They sit flat on the catalog object rather than underconnectionConfigInfo, are never assigned, and cover only two of the three types. Removing them is a separate cleanup.ConnectionConfigInfoexperimental; that applies equally to the existinguriandauthenticationParametersfields.