fix: backend-driven display fields for engine connections (closes #52)#54
Open
shirshanka wants to merge 2 commits into
Open
fix: backend-driven display fields for engine connections (closes #52)#54shirshanka wants to merge 2 commits into
shirshanka wants to merge 2 commits into
Conversation
Hive (and any future connector registered in _CONNECTOR_MAP) previously fell into the unconfigured else-branch of list_connections and returned fields=[], so the Data Sources settings page showed an empty card. Extend ConnectorSpec with a display_fields list (key/label/placeholder/ sensitive/secret_key) and dispatch through it for any registered type that the per-type branches don't already handle. Sensitive values render as "(configured)" rather than being sent to the client. Existing snowflake / bigquery / SQLAlchemy branches are untouched, so url-form SQL connections and BigQuery's credentials masking are preserved. This keeps the backend as the source of truth for connection schema instead of duplicating labels across backend and frontend plugins. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
DisplayFieldanddisplay_fields: list[DisplayField]toConnectorSpec(engines/factory.py).display_fieldsfor the Hive connector — the missing piece behind bug(frontend): The hive data source fields are not displayed on the Data Sources settings page #52.list_connectionsnow dispatches throughdisplay_fieldsfor any registered connector type the per-type branches don't already handle. Sensitive values render as"(configured)", never the raw value.Background
#52 reported that the Data Sources settings page renders an empty card for Hive. The reason was that
list_connectionsonly had explicit branches for snowflake / bigquery / SQLAlchemy types — everything else fell through tofields = []. Hive was fully registered in_CONNECTOR_MAPalready; the spec just lacked display metadata.#53 took an alternative approach (sending raw
conn_cfg.items()from the backend and rebuilding fields client-side from plugin definitions). That introduced silent regressions for BigQuery credential sensitivity and URL-form SQL connections, and put snowflake on a different code path from the rest. This PR is the backend-driven alternative discussed in the review.What changes
Why this beats client-side rebuild
Test plan
Closes #52.
🤖 Generated with Claude Code