fix(ui): Connection Form Extras not inferring the correct type#55492
Merged
jscheffl merged 2 commits intoapache:mainfrom Sep 11, 2025
Merged
fix(ui): Connection Form Extras not inferring the correct type#55492jscheffl merged 2 commits intoapache:mainfrom
jscheffl merged 2 commits intoapache:mainfrom
Conversation
jscheffl
approved these changes
Sep 11, 2025
Contributor
jscheffl
left a comment
There was a problem hiding this comment.
Thanks for the fix! That sounds reasonable.
kaxil
pushed a commit
that referenced
this pull request
Sep 15, 2025
(cherry picked from commit a697436)
suman-himanshu
pushed a commit
to suman-himanshu/airflow
that referenced
this pull request
Sep 17, 2025
Brunda10
pushed a commit
to Brunda10/airflow
that referenced
this pull request
Sep 17, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Sep 30, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 1, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 2, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 3, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 4, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 5, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 5, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 7, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 8, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 9, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 10, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 11, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 12, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 14, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 15, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 17, 2025
abdulrahman305 bot
pushed a commit
to qenex-ai/airflow
that referenced
this pull request
Oct 19, 2025
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.
closes: #53961
related: #53961
Problem Analysis
The issue was that when editing non-string fields (like lists, booleans, etc.) through the "Extra fields" in the Connection Form (not using the JSON editor), the fields were being converted to strings instead of maintaining their original data types.
Root Cause
The problem was in the
FieldSelector.tsxcomponent. TheinferTypefunction was only using theinitialParamDict(which contains schema definitions) to determine field types, but it wasn't considering the actual current values stored inparamsDictwhen editing existing connections.Solution Implemented
I modified the
FieldSelectorcomponent inairflow-core/src/airflow/ui/src/components/FlexibleForm/FieldSelector.tsxto:Use both parameter dictionaries: The component now accesses both
initialParamDict(for schema information) andparamsDict(for current values) from theuseParamStore.Combine schema with actual values: Created a combined parameter object that uses:
initialParamDictparamsDictPreserve original data types: This ensures that when editing existing extra fields, the type inference is based on the actual stored values rather than just the schema defaults, preventing arrays, booleans, numbers, and objects from being converted to strings.
Improvement
Extra Fields JSON
{ "string": "hello world", "list": [ "p1", "p2", "p3", "p4" ], "bool": true, "num": 1234, "object": { "key": "value" } }^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.