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 2020/08/31 07:49:53 UTC

[GitHub] [airflow] MahsaSeifikar opened a new issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

MahsaSeifikar opened a new issue #10656:
URL: https://github.com/apache/airflow/issues/10656


   <!--
   
   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.
   This questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: 1.10.10
   
   **What happened**:
   
   I wrote the following piece of code:
   ```
   from datetime import datetime
   from airflow import DAG
   from airflow.contrib.operators.ssh_operator import SSHOperator
   
   
   args = {
       'owner': 'airflow',
       'start_date': datetime(year=2020, month=7, day=21,
                              hour=3, minute=0, second=0),
       'provide_context': True,
   }
   
   dag = DAG(
       dag_id='test_ssh_operator',
       default_args=args,
       schedule_interval='@daily',
   )
   
   ssh_command = """
   echo 'hello work'
   """
   task = SSHOperator(
       task_id="check_ssh_perator",
       ssh_conn_id='ssh_default',
       command=ssh_command,
       do_xcom_push=True,
       dag=dag,
   )
   
   task
   ```
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**:
   And I got the following error:
   
   `Broken DAG: [/etc/airflow/dags/dag_test_sshoperator.py] 'NoneType' object has no attribute 'startswith'`
   <!-- What do you think went wrong? -->
   <!---
   
   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**:
   I add new ssh connection in Admin--> Connections. and in Extra field, I put the following JSON:
   
   ```
   {"key_file":"/root/.ssh/airflow-connector/id_ed25519",
   "timeout": "10",
   "compress": "false",
   "no_host_key_check": "false",
   "allow_host_key_change": "false"}
   ```
   
   <!--
   
   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.

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



[GitHub] [airflow] kaxil edited a comment on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   I have created a PR to fix this: https://github.com/apache/airflow/pull/11361


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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   Let us know if you need any help @MahsaSeifikar 


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

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



[GitHub] [airflow] kaxil edited a comment on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   I have created a PR to fix this: https://github.com/apache/airflow/pull/11361


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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   Let us know if you need any help @MahsaSeifikar 


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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   hmm I thought this was fixed, just needs to add some validation at https://github.com/apache/airflow/blob/master/airflow/providers/ssh/operators/ssh.py#L80
   
   Assigning this issue to you @MahsaSeifikar 


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

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



[GitHub] [airflow] kaxil edited a comment on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   hmm I thought this was fixed, just needs to add some validation at https://github.com/apache/airflow/blob/master/airflow/providers/ssh/operators/ssh.py#L80
   
   Assigning this issue to you @MahsaSeifikar looking forward for the PR


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

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



[GitHub] [airflow] YashxRaj commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   @MahsaSeifikar Thank you bringing this up. I'm running into the same issue. Have you had a chance since to fix the validate? 


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

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   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.

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



[GitHub] [airflow] mik-laj commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #10656:
URL: https://github.com/apache/airflow/issues/10656#issuecomment-683751304


   This looks like real issue. Do I have to assign you to this ticket? Would you like to contribute a fix for this problem? I happy to help with review. 


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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   I have created a PR: https://github.com/apache/airflow/pull/11361


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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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






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

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



[GitHub] [airflow] kaxil closed issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   


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

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



[GitHub] [airflow] MahsaSeifikar commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   > This looks like real issue. Do I have to assign you to this ticket? Would you like to contribute a fix for this problem? I happy to help with review.
   
   Yup, I know what's the problem. and I really like 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.

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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






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

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



[GitHub] [airflow] kaxil commented on issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   I have created a PR: https://github.com/apache/airflow/pull/11361


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

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



[GitHub] [airflow] kaxil closed issue #10656: Error in SSHOperator " 'NoneType' object has no attribute 'startswith' "

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


   


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

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