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/07/08 08:43:21 UTC

[GitHub] [airflow] hsnprsd opened a new pull request, #24915: Less verbose logging in ssh operator

hsnprsd opened a new pull request, #24915:
URL: https://github.com/apache/airflow/pull/24915

   Current logs of ssh operator are too verbose. SSH hook already logs stdout and stderr of the running command in task logs, so there is no need for including stderr in AirflowException message returned by run_ssh_client_command.
   
   Example of current logs:
   ```
   <combined stderr & stdout of command>
   
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/ssh/operators/ssh.py", line 173, in execute
       result = self.run_ssh_client_command(ssh_client, self.command)
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/ssh/operators/ssh.py", line 160, in run_ssh_client_command
       self.raise_for_status(exit_status, agg_stderr)
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/ssh/operators/ssh.py", line 153, in raise_for_status
       raise AirflowException(f"error running cmd: {self.command}, error: {error_msg}")
   airflow.exceptions.AirflowException: error running cmd: **<ssh command>**, error: **<stderr of command>**
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/divar_airflow/operators/spark_operator/ssh/spark_operator.py", line 199, in execute
       return super().execute(**context)
     File "/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/ssh/operators/ssh.py", line 175, in execute
       raise AirflowException(f"SSH operator error: {str(e)}")
   airflow.exceptions.AirflowException: SSH operator error: error running cmd: **<ssh command>**, error: error running cmd: **<ssh command>**, error: **<stderr of command>**
   ```


-- 
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 pull request #24915: Less verbose logging in ssh operator

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

   Static checks are faiing.


-- 
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] hsnprsd commented on pull request #24915: Less verbose logging in ssh operator

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

   Checks are successful now. @uranusjr 


-- 
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 pull request #24915: Less verbose logging in ssh operator

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

   Yep. if error message is already printed it makes no sense to print it again.


-- 
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] hsnprsd commented on pull request #24915: Less verbose logging in ssh operator

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

   @potiuk I will try to fix them tomorrow. btw, do you think the current change is valid?


-- 
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 pull request #24915: Less verbose logging in ssh operator

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

   Yes. Might be a good idea @morooshka - feel free to implement it.


-- 
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 pull request #24915: Less verbose logging in ssh operator

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

   **Just** in time for the next provider's wave


-- 
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 merged pull request #24915: Less verbose logging in ssh operator

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


-- 
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] morooshka commented on pull request #24915: Less verbose logging in ssh operator

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

   Hi @potiuk, @hsnprsd! We need to see stderr in exception - it is viewable via error email reporting and significantly reduces the time to analyse the problem for supports. What about return stderr to exception? I can implement it. So ideally i want to see something like this:


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