josh-fell opened a new issue #17235:
URL: https://github.com/apache/airflow/issues/17235


   **Apache Airflow version**:
   2.1.0
   
   **What happened**:
   There are several hooks that still use optional parameters from the classic 
`Extra` field.  However, when creating the connection the `Extra` field is 
overwritten with values from the custom fields that are included in the form.  
Because the `Extra` field is overwritten, these optional parameters cannot be 
used by the hook.
   
   For example, in the `AzureDataFactoryHook`, If `resource_group_name` or 
`factory_name` are not provided when initializing the hook, it defaults to the 
value specified in the connection extras. Using the Azure Data Factory 
connection form, here is the initial connection submission:
   
![image](https://user-images.githubusercontent.com/48934154/127029091-a8b1c979-f238-4bac-9d3a-f94b6cd92a2b.png)
   
   After saving the connection, the `Extra` field is overwritten with the 
custom fields that use "extras" under the hood:
   
![image](https://user-images.githubusercontent.com/48934154/127029242-79c990f0-b9cf-43bb-9a6b-28b4e9c6d4e1.png)
   
   
   **What you expected to happen**:
   
   Wavering slightly but I would have initially expected that the `Extra` field 
wasn't overwritten but updated with both the custom field "extras" plus the 
originally configured values in the `Extra` field.  However, a better UX would 
be that the values used in the `Extra` field should be separate custom fields 
for these hooks and the `Extra` field is hidden.  Perhaps it's even both?
   
   **How to reproduce it**:
   install either the Microsoft Azure or Snowflake providers, attempt to create 
a connection for either the Snowflake, Azure Data Factory, Azure Container 
Volume, or Azure types with the `Extra` field populated prior to saving the 
form.
   
   
   **Anything else we need to know**:
   Happy to submit PRs to fix this issue. 🚀 
   
   


-- 
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]


Reply via email to