jscheffl commented on issue #52020:
URL: https://github.com/apache/airflow/issues/52020#issuecomment-2998042231

   > > > I attempted in ssh and failed miserably applying the new fixture... 
But SMTP was partly cleaned now...
   > > 
   > > 
   > > Oh, what issue did you run into?
   > 
   > Try it :) you will see - I think the problem was that sshHook tries to do 
"too much"
   
   @amoghrajesh problem is:
   ```
   tests/unit/ssh/hooks/test_ssh.py:479: in test_ssh_connection
       hook = SSHHook(ssh_conn_id="ssh_default")
   src/airflow/providers/ssh/hooks/ssh.py:152: in __init__
       conn = self.get_connection(self.ssh_conn_id)
   ../../airflow-core/src/airflow/hooks/base.py:64: in get_connection
       conn = Connection.get_connection_from_secrets(conn_id)
   ../../airflow-core/src/airflow/models/connection.py:504: in 
get_connection_from_secrets
       conn = secrets_backend.get_connection(conn_id=conn_id)
   ../../airflow-core/src/airflow/utils/session.py:100: in wrapper
       with create_session() as session:
   /usr/local/lib/python3.9/contextlib.py:119: in __enter__
       return next(self.gen)
   ../../airflow-core/src/airflow/utils/session.py:41: in create_session
       session = Session()
   ```
   --> in the call of the SSH hook itself the call to 
`get_connection_from_secrets()` is still relying on DB even if the connection 
is defined as ENV.
   Probably this needs to be mocked as well?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to