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 2022/04/26 03:43:45 UTC

[GitHub] [airflow] josh-fell opened a new pull request, #23241: Validate conn_type and values for extra_field_name_mapping

josh-fell opened a new pull request, #23241:
URL: https://github.com/apache/airflow/pull/23241

   Related: #22607
   
   There are a few connections which have default values for particular extra fields namely Google (`extra__google_cloud_platform__num_retries`: 5), Kubernetes (`extra__kubernetes__in_cluster`: False), and Snowflake (`extra__snowflake__insecure_mode`: False). Since all extra fields are available in the form data, a check is needed to only add extra fields that are germane to the connection type of the submission.  Otherwise, the extras with default values could be added to a connection's URI and `extra_dejson` incorrectly.
   
   For example, before this change, assuming a user submits a connection like so:
   <img width="799" alt="image" src="https://user-images.githubusercontent.com/48934154/165216271-933e0293-1d7a-4086-b448-d416c5fcbcf8.png">
   
   The connection data stores extra information for `extra__google_cloud_platform__num_retries`:
   <img width="1408" alt="image" src="https://user-images.githubusercontent.com/48934154/165216385-c98140ce-047a-4605-9c51-5f009e4497d6.png">
   
   With this change, the connection data does not contain extras which are not of the same connection type as the form submission:
   <img width="1171" alt="image" src="https://user-images.githubusercontent.com/48934154/165216516-1ad564f2-3cce-4b50-be68-2e7238e6d2c7.png">
   
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a newsfragement file, named `{pr_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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 pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
josh-fell commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109814135

   > yeah i verified the bad behavior in 22607 thank you very much for this. one question with `if value` vs `if value != ""` is it not the case that the form data is always string at this point?
   
   Yes in the vast majority of cases except for `BooleanFIeld` and `IntegerField` widgets.


-- 
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] dstandish commented on pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109785497

   @josh-fell is this a bug introduced by 22607?


-- 
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] dstandish commented on pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109809856

   yeah i verified the bad behavior in 22607 thank you very much for this.
   one question with `if value` vs `if value != ""` is it not the case that the form data is always string at this point?


-- 
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] ashb merged pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
ashb merged PR #23241:
URL: https://github.com/apache/airflow/pull/23241


-- 
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 pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
josh-fell commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109802312

   > @josh-fell is this a bug introduced by 22607?
   
   Yes, I could have been much more clear about that 🤦 


-- 
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 pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
josh-fell commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109285234

   CC @dstandish 


-- 
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] github-actions[bot] commented on pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109808979

   The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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] dstandish commented on pull request #23241: Validate conn_type and values for extra_field_name_mapping

Posted by GitBox <gi...@apache.org>.
dstandish commented on PR #23241:
URL: https://github.com/apache/airflow/pull/23241#issuecomment-1109815752

   ah yes of course 🤦 damn widgets!


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