Vamsi-klu opened a new pull request, #69741:
URL: https://github.com/apache/airflow/pull/69741
## 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?
- [X] Yes — Codex (GPT-5)
Generated-by: Codex (GPT-5) following [the
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]