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/20 13:59:01 UTC

[GitHub] [airflow] aspain opened a new issue, #23118: `Amazon Web Services` connection type gives error upon using 'Test' button despite connection working

aspain opened a new issue, #23118:
URL: https://github.com/apache/airflow/issues/23118

   ### Apache Airflow Provider(s)
   
   amazon
   
   ### Versions of Apache Airflow Providers
   
   [apache-airflow-providers-amazon](https://airflow.apache.org/docs/apache-airflow-providers-amazon/3.2.0/) 3.2.0
   
   ### Apache Airflow version
   
   2.2.5 (latest released)
   
   ### Operating System
   
   macOS 11.5.2
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   No customization
   
   ### What happened
   
   When setting up an `Amazon Web Services` connection type, using `AWS Access Key ID` and `AWS Secret Access Key` as the Login and Password fields, and then using the `Test` button, I receive an `Either client_type or resource_type must be provided.` error. 
   
   But my DAG using this connection still works properly and the connection works fine.
   
   
   ![image](https://user-images.githubusercontent.com/15913202/164246651-da8bb5cb-7d9e-4330-8f5f-068708b20915.png)
   
   
   ### What you think should happen instead
   
   If client_type or resource_type are not required fields, this error should not appear
   
   ### How to reproduce
   
   Set up an `Amazon Web Services` connection type populating only `connection id`, `connection type`, `login`, `password`, and including region in the `extra` field such as `{"region_name": "us-east-1"}`
   
   ### Anything else
   
   _No response_
   
   ### 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.apache.org

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


[GitHub] [airflow] josh-fell closed issue #23118: `Amazon Web Services` connection type gives error upon using 'Test' button despite connection working

Posted by GitBox <gi...@apache.org>.
josh-fell closed issue #23118: `Amazon Web Services` connection type gives error upon using 'Test' button despite connection working
URL: https://github.com/apache/airflow/issues/23118


-- 
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 #23118: `Amazon Web Services` connection type gives error upon using 'Test' button despite connection working

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

   This is fixed by #19792 and confirmed in the 2.3.0b1 release. The current implementation of the Test Connection button in the UI is either enabled/disabled relative only to the enablement of Airflow REST APIs within an environment. Meaning if REST APIs are enabled, the Test Connection button is enabled for all connection types even if a selected type doesn't actually support testing connectivity in this way.
   
   With 2.3.0, the Test Connection button will be entirely disabled since the underlying `AwsBaseHook` doesn't implement a `test_connection()` method which is required to actually test the connection. 
   
   Screenshot of what you'd see in 2.3.0:
   <img width="768" alt="image" src="https://user-images.githubusercontent.com/48934154/164257972-411173d3-7978-4e20-b66c-f1935a9b7010.png">
   
   That particular [exception is thrown](https://github.com/apache/airflow/blob/d7dbfb7e26a50130d3550e781dc71a5fbcaeb3d2/airflow/providers/amazon/aws/hooks/base_aws.py#L415-L416) when the trying to instantiate the `AwsBaseHook` to then call the  non-existant `test_connection()` method.


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