You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/28 14:23:33 UTC

[GitHub] [airflow] josh-fell commented on a change in pull request #17269: Handle connection parameters added to Extra and custom fields

josh-fell commented on a change in pull request #17269:
URL: https://github.com/apache/airflow/pull/17269#discussion_r678351223



##########
File path: airflow/www/views.py
##########
@@ -3226,6 +3226,12 @@ def process_form(self, form, is_created):
             for key in self.extra_fields
             if key in form.data and key.startswith(f"extra__{conn_type}__")
         }
+
+        # If parameters are added to the classic `Extra` field, include these values along with
+        # custom-field extras.
+        if form.data.get("extra"):
+            extra.update(json.loads(form.data.get("extra")))

Review comment:
       Are you thinking this should not fail if an invalid dictionary value is added? I assumed this would fail hard and the user would need to recreate the connection again. Happy to flash an error message but still create the connection entry or catch some exceptions and log a custom failure message for users.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org