Skip to content

UI: Preserve raw connection extra JSON#69741

Open
Vamsi-klu wants to merge 2 commits into
apache:mainfrom
Vamsi-klu:fix-57984-snowflake-extra
Open

UI: Preserve raw connection extra JSON#69741
Vamsi-klu wants to merge 2 commits into
apache:mainfrom
Vamsi-klu:fix-57984-snowflake-extra

Conversation

@Vamsi-klu

Copy link
Copy Markdown
Contributor

Problem

Editing a Snowflake connection in the UI could silently rewrite the raw extra JSON. If the connection had manually entered extras such as {"account":"1234"}, opening and saving the form could replace that JSON with provider-field defaults like {"insecure_mode":false}.

closes: #57984

What Changed

The connection form now preserves the raw extra JSON as the source of truth for keys that the user did not change through provider-specific fields.

Provider extra fields are initialized from matching keys in the raw JSON, but untouched provider defaults are not serialized back into the JSON. When a user edits a provider field, only that changed key is merged into the existing JSON. Clearing a provider field removes that key while preserving unrelated keys.

Impact

Users can safely edit Snowflake connections without losing manually configured extras. Existing raw JSON keys are preserved, and defaults such as insecure_mode: false are not injected unless the user explicitly changes the field.

Testing

  • pnpm exec vitest run src/queries/useParamStore.test.ts src/pages/Connections/ConnectionForm.test.tsx
  • pnpm lint
  • Commit hook: Compile / format / lint UI
  • git diff --check

The tests cover the problem statement expectations: preserving account, avoiding untouched insecure_mode, preserving unknown keys, merging changed provider fields, and removing cleared provider fields.


Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-5)

Generated-by: Codex (GPT-5) following the guidelines

Editing a provider connection could serialize untouched provider defaults into extra JSON, overwriting values the user entered manually.
@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 11, 2026
The UI change is visible to users editing provider connections, so the release notes should mention the bug fix.
@Vamsi-klu Vamsi-klu marked this pull request as ready for review July 11, 2026 05:52
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow Snowflake connection: extra JSON silently overwritten

2 participants