You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "arorasachin9 (via GitHub)" <gi...@apache.org> on 2025/11/30 15:49:40 UTC

[PR] Changed the imports to the new sdk for the connection class in base secret manager [airflow]

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

   In AWS Secret Manager provider we are inheriting from the BaseSecretManager class which is still using older import leading to 
   WARNING Using Connection.from_json from `airflow.models` is deprecated.Please use `from_json` on Connection from sdk(airflow.sdk.Connection) instead
   So moved the import from the new sdk which will remove the WARNING message of deprecated import. I have added try catch to keep the backward compatibility which can be removed once we deprecate the older classes.
   SS for previous output:
   <img width="1047" height="232" alt="Screenshot 2025-11-30 at 8 41 00 PM" src="https://github.com/user-attachments/assets/0c6e8be7-e650-4654-986e-675ed65d84ec" />
   SS for new output:
   <img width="1048" height="321" alt="Screenshot 2025-11-30 at 8 41 09 PM" src="https://github.com/user-attachments/assets/24ddb70b-9e9d-4c1f-8f9d-e5abda6aac96" />
   


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


Re: [PR] Changed the imports to the new sdk for the connection class in base secret manager [airflow]

Posted by "arorasachin9 (via GitHub)" <gi...@apache.org>.
arorasachin9 closed pull request #58870: Changed the imports to the new sdk for the connection class in base secret manager
URL: https://github.com/apache/airflow/pull/58870


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


Re: [PR] Changed the imports to the new sdk for the connection class in base secret manager [airflow]

Posted by "arorasachin9 (via GitHub)" <gi...@apache.org>.
arorasachin9 commented on PR #58870:
URL: https://github.com/apache/airflow/pull/58870#issuecomment-3592778120

   Are we not supposed to import the sdk imports in the core folder
   The static check is failing
   
   Check for SDK imports in core files..............................................Failed
   - hook id: check-sdk-imports
   - exit code: 1
   
     src/airflow/secrets/base_secrets.py:
       Line 25: from airflow.sdk import Connection
       Line 67: from airflow.sdk import Connection
   
     Found 2 SDK import(s) in core files
   
   If we are not supposed to do so any suggested workaround for this warning or we have to move this class also in airflow sdk.
   If we can update in core only then I'll fix the other failing test cases.
   
   @dstandish @ashb 


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


Re: [PR] Changed the imports to the new sdk for the connection class in base secret manager [airflow]

Posted by "arorasachin9 (via GitHub)" <gi...@apache.org>.
arorasachin9 commented on PR #58870:
URL: https://github.com/apache/airflow/pull/58870#issuecomment-3597420493

   NA


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


Re: [PR] Changed the imports to the new sdk for the connection class in base secret manager [airflow]

Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on PR #58870:
URL: https://github.com/apache/airflow/pull/58870#issuecomment-3593079368

   It seems that it's not straight forward :(


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