You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "deepujain (via GitHub)" <gi...@apache.org> on 2026/03/20 19:18:30 UTC
[PR] Update mocking connections docs to use task SDK Connection.get (#63996) [airflow]
deepujain opened a new pull request, #64014:
URL: https://github.com/apache/airflow/pull/64014
## Summary
The "Mocking variables and connections" section in `best-practices.rst` used
the deprecated `Connection.get_connection_from_secrets()` from `airflow.models`.
Updated to use `Connection.get()` from `airflow.sdk`, which is the Airflow 3.x
standard (consistent with `Variable.get()` already shown in the same section).
## Changes
- `airflow-core/docs/best-practices.rst`: Added `from airflow.sdk import Connection`
import and replaced `Connection.get_connection_from_secrets("my_conn")` with
`Connection.get("my_conn")` in the connection mocking example.
Fixes #63996
--
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] Update mocking connections docs to use task SDK Connection.get (#63996) [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh merged PR #64014:
URL: https://github.com/apache/airflow/pull/64014
--
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