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/11/03 16:04:55 UTC

[GitHub] [airflow] cb149 opened a new issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

cb149 opened a new issue #19386:
URL: https://github.com/apache/airflow/issues/19386


   ### Apache Airflow version
   
   2.2.0
   
   ### Operating System
   
   Ubuntu
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other
   
   ### Deployment details
   
   airflow standalone
   
   ### What happened
   
   Relabeling of fields in **Add Connection** never gets reverted, so switching connection types results in the form showing wrong field names.
   
   ### What you expected to happen
   
   Changing connection type while adding a connection should show the fields/fieldnames for that connection.
   
   ### How to reproduce
   
   1. Install microsoft-azure and docker provider package (or any provider package that has relabeling)
   2. Click **Add a new record** in the Connections UI
   3. This will default to connection type Azure
   4. Change connection type to HTTP or other connection with Login and/or Password
   5. Login and Password fields now show as Azure Client ID and Azure Secret
   6. Change connection type to Docker
   7. Change connection type to HTTP again
   8. Host will now show as Registry URL, Login will show Username and Password fields still shows Azure Secret
   
   
   
   ### Anything else
   
   If I am not mistaken, the issues is with the code in [connection_form.js](https://github.com/apache/airflow/blob/main/airflow/www/static/js/connection_form.js#L87)
   
   ```js
   if (connection.relabeling) {
         Object.keys(connection.relabeling).forEach((field) => {
           const label = document.querySelector(`label[for='${field}']`);
           label.dataset.origText = label.innerText;
           label.innerText = connection.relabeling[field];
         });
   }
   ```
   
   and there should probably be a reset to the default label texts before it.
   
   
   Also, when trying to open a provider issue the newest available Airflow version in the version selector is 2.1.4
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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



[GitHub] [airflow] bbovenzi closed issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #19386:
URL: https://github.com/apache/airflow/issues/19386


   


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



[GitHub] [airflow] josh-fell commented on issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
josh-fell commented on issue #19386:
URL: https://github.com/apache/airflow/issues/19386#issuecomment-961373151


   @cb149 A PR has been opened to correct this issue. There is a reset of field performed when switch connection types, however, the logic was querying for an incorrect `label` attribute in the Connection form.
   
   Thanks for reporting this issue. Nice catch!


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



[GitHub] [airflow] josh-fell commented on issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
josh-fell commented on issue #19386:
URL: https://github.com/apache/airflow/issues/19386#issuecomment-961373151


   @cb149 A PR has been opened to correct this issue. There is a reset of field performed when switch connection types, however, the logic was querying for an incorrect `label` attribute in the Connection form.
   
   Thanks for reporting this issue. Nice catch!


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



[GitHub] [airflow] bbovenzi closed issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #19386:
URL: https://github.com/apache/airflow/issues/19386


   


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



[GitHub] [airflow] bbovenzi closed issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #19386:
URL: https://github.com/apache/airflow/issues/19386


   


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



[GitHub] [airflow] josh-fell commented on issue #19386: Relabeling in Connection form causes falsely named fields (UI only)

Posted by GitBox <gi...@apache.org>.
josh-fell commented on issue #19386:
URL: https://github.com/apache/airflow/issues/19386#issuecomment-961373151


   @cb149 A PR has been opened to correct this issue. There is a reset of field performed when switch connection types, however, the logic was querying for an incorrect `label` attribute in the Connection form.
   
   Thanks for reporting this issue. Nice catch!


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