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/06/29 17:44:59 UTC

[GitHub] [airflow] saurasingh opened a new issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

saurasingh opened a new issue #16717:
URL: https://github.com/apache/airflow/issues/16717


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 2.1.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): 
   
   **Environment**: 
   
   - **Cloud provider or hardware configuration**: AWS EKS, AWS ECS
   - **OS** (e.g. from /etc/os-release): Debian GNU/Linux 10
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   When creating a snowflake connector using a snowflake hook(using UI), not able to add snowflake roles in the extras. 
   here is the screenshot of the connection which I am creating 
   ![Screen Shot 2021-06-29 at 1 31 33 PM](https://user-images.githubusercontent.com/19628707/123842261-92abbd00-d8de-11eb-93ae-baf29999ba9d.png)
   
   but once I am done saving it I lose the role and if I edit my connection this is what I see in the UI
   
   ![Screen Shot 2021-06-29 at 1 32 18 PM](https://user-images.githubusercontent.com/19628707/123842357-b111b880-d8de-11eb-9a73-146b0b069851.png)
   
   so Extra gets populated with all the other placeholders.  I can see that https://github.com/apache/airflow/blob/4b14d93f25f237b8cca17f57352c253f292a111b/airflow/providers/snowflake/hooks/snowflake.py#L89 you guys are returning some value to the widget but it is not having a snowflake "role" definition.
   
   https://github.com/apache/airflow/blob/4b14d93f25f237b8cca17f57352c253f292a111b/airflow/providers/snowflake/hooks/snowflake.py#L105 
   
   I also updated the JSON object and created it as a nested JSON `{{"role": "test"}}`  following the `placeholder` from the above function but still, the behaviour remains the same. 
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   ```
   "placeholders": {
                   'extra': json.dumps(
                       {
                           "role": "snowflake role",
                           "authenticator": "snowflake oauth",
                           "private_key_file": "private key",
                           "session_parameters": "session parameters",
                       },
                       indent=1,
                   ),
                   'host': 'snowflake hostname',
                   'schema': 'snowflake schema',
                   'login': 'snowflake username',
                   'password': 'snowflake password',
                   'extra__snowflake__account': 'snowflake account name',
                   'extra__snowflake__warehouse': 'snowflake warehouse name',
                   'extra__snowflake__database': 'snowflake db name',
                   'extra__snowflake__region': 'snowflake hosted region',
                   'extra__snowflake__aws_access_key_id': 'aws access key id (S3ToSnowflakeOperator)',
                   'extra__snowflake__aws_secret_access_key': 'aws secret access key (S3ToSnowflakeOperator)',
               }
   ```
   If I follow above code I should be able to pass the snowflake role into the Extras. But this behaiour is missing
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   
   Create a connection with connection type snowflake in airflow UI.
   
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


-- 
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] spniemansburg commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
spniemansburg commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-901748260


   Issue is closed, but wanted to note that the same issue is happening when trying to add a private key file (using "private_key_file" parameter) in the Extra field. I am using Apache Airflow 2.1.0. Should I file a new bug report?


-- 
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] potiuk edited a comment on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-870972709


   You need to make Pull request from your branch (you need to fork the repo before).


-- 
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] boring-cyborg[bot] commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-870792487


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
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] potiuk commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-870849380


   @saurasingh - would you be willing to add a PR to add this feature?


-- 
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] eladkal closed issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

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


   


-- 
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] uranusjr commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-871052536


   See: https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#contribution-workflow


-- 
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] saurasingh commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
saurasingh commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-870967240


   @potiuk I have committed my changes to a local branch but not able to push to create a PR for you guys to review. 
   `unable to access 'https://github.com/apache/airflow.git/': The requested URL returned error: 403` I am getting this error


-- 
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] eladkal commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-889058753


   Fixed in https://github.com/apache/airflow/pull/16735


-- 
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] potiuk commented on issue #16717: Airflow 2.1.0: Snowflake connection not enabling snowflake "role"

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #16717:
URL: https://github.com/apache/airflow/issues/16717#issuecomment-870972709


   You need to make Pull request from your branch.


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