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/28 14:50:10 UTC
[I] Deprecated import warning when using AWS secret manager as secret backend [airflow]
arorasachin9 opened a new issue, #58817:
URL: https://github.com/apache/airflow/issues/58817
### Apache Airflow version
3.1.3
### If "Other Airflow 2/3 version" selected, which one?
_No response_
### What happened?
We are using airflow 3.1.3 with AWS secret manager as the secret backend. We are getting warning when importing secrets from the AWS secret manager
`WARNING - Using Connection.from_json from airflow.models is deprecated.Please use from_json on Connection from sdk(airflow.sdk.Connection) instead`
When I debugged found the issue. The base secret file which aws secret manager backend is importing is using still using the conenction from the airflow models.
### What you think should happen instead?
The base secret should import connection class from airflow.sdk
### How to reproduce
Spin up airlfow with 3.1.3 version with AWS secret manager as secret backend
### Operating System
AmazonLinux
### Versions of Apache Airflow Providers
apache-airflow-providers-amazon 9.16.0
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
Deployed on EKS using the helm chart
### Anything else?
Let me know if it is left voluntarily like this or it can be changed. If it can be changed to the airflow.sdk path then I will submit the PR for the changes
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend` [airflow]
Posted by "berglh (via GitHub)" <gi...@apache.org>.
berglh commented on issue #58817:
URL: https://github.com/apache/airflow/issues/58817#issuecomment-4196526028
@MaluNoPeleke I believe the issue is if you define an Airflow connection via environment variables, say for instance via Helm chart configuration, this error is thrown as a warning in the logs. In our case we defined Spark 3 configuration via environment variable that is used by the Spark Submit Operator, and this is the cause of the warning in our case. Theoretically, any environment variable set connection used by an Airflow provider that is defined in this way would have the same warning. My guess, is this code issue is within the Airflow connection resolution, rather than any specific import in a DAG.
--
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: [I] Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend` [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 closed issue #58817: Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend`
URL: https://github.com/apache/airflow/issues/58817
--
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: [I] Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend` [airflow]
Posted by "arorasachin9 (via GitHub)" <gi...@apache.org>.
arorasachin9 commented on issue #58817:
URL: https://github.com/apache/airflow/issues/58817#issuecomment-3592730698
@shahar1 @amoghrajesh , Please review the PR. I have tested locally with older and newer code. Added the SS for the same in the PR description
PR Link: 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: [I] Deprecated import warning when using AWS secret manager as secret backend [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on issue #58817:
URL: https://github.com/apache/airflow/issues/58817#issuecomment-3591811682
@amoghrajesh should it be safe at this point to update [this import](https://github.com/apache/airflow/blob/7ddc52a3e5a7f1935e9c7684a4d561ae138c0922/airflow-core/src/airflow/secrets/base_secrets.py#L61), or are there further adjustments to be made?
--
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: [I] Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend` [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #58817:
URL: https://github.com/apache/airflow/issues/58817#issuecomment-3598580389
#58621 is merged.
--
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: [I] Deprecated import warning when using a secret manager that inherits from `BaseSecretsBackend` [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on issue #58817:
URL: https://github.com/apache/airflow/issues/58817#issuecomment-3594616290
@shahar1 secrets backend is being reworked in the sense that it is being moved to shared library at the moment: https://github.com/apache/airflow/pull/58621/, the advantage of that is, it will dynamically detect the context it is run in - server (scheduler, api server) and client (worker, dag processor, triggerer) and grok the class automatically.
--
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