Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test connection with codemirror and extra #35122

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

vchiapaikeo
Copy link
Contributor

closes: #32890

This fixes an issue where the addition of CodeMirror on the extra text field in #28583 causes the Test button to no longer send the extra field. This fix was previously attempted in #32893 but was later reverted due to inadvertent issues with other connections in #33032.

The reason for the revert was because non-applicable fields were being shown in connections. Instead of moving the instantiation of CodeMirror on textArea, we can declare a global editor variable that is populated if the extra field exists on the connection. If it does exist and a user wants to test a connection with extras, we will call editor.save to save the value to textArea which will make it accessible in getSerializedFormData.

Test Plan

Check other connections and make sure they look okay

image

Create a new connection of type HTTP, set a host, and add an extra json field

image

Ensure extra is passed through the test

image

Ensure the connection is persisted properly:

image image

Please let me know if there's anything else I can test.

cc @pankajkoti @genehynson @eladkal

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Oct 23, 2023
@bbovenzi bbovenzi added this to the Airflow 2.7.3 milestone Oct 23, 2023
Copy link
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@eladkal eladkal merged commit 789222c into apache:main Oct 23, 2023
44 checks passed
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Oct 23, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 29, 2023
ephraimbuddy pushed a commit that referenced this pull request Oct 30, 2023
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. area:webserver Webserver related Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Airflow UI ignoring extra connection field during test connection
4 participants