Skip to content

Update conf imports in providers to use airflow.sdk.configuration #60000

@sunank200

Description

@sunank200

Goal

Update providers to stop importing conf from airflow.configuration and instead use the shared compat import
from airflow.providers.common.compat.sdk import conf.

The migration spans 29 providers across ~183 files.

Context: #59966 adds conf to the common compat module and establishes the recommended change.

Background

Many provider files currently do:

from airflow.configuration import conf

In Airflow 3.x, conf access should be done with SDK. Providers should instead use:

from airflow.providers.common.compat.sdk import conf

Step 1:

Update pyproject.toml (if needed)

If the provider already depends on apache-airflow-providers-common-compat, add a comment to use the next version:
"apache-airflow-providers-common-compat>=1.10.1", # use next version

Step 2: Update All Provider Files

For each provider file, replace:

from airflow.configuration import conf

With:

from airflow.providers.common.compat.sdk import conf

Note: Importing via the compat module guarantees backward compatibility across Airflow 2.11+ and 3.0+.

Step 3: Run Provider Tests

Step 4: If you added a new entry to sdk.py

If you added a new import to sdk.py that a provider uses, update that provider's pyproject.toml: and add a # use next version comment in-line for it's dependency on apache-airflow-providers-common-compat. This tells the Release Manager to release both packages together with updated version constraints.

Note: Use the exact comment # use next version — CI automation depends on it.

Example:

Providers and File Counts

Provider Files to Update Status Issue / PR
amazon 48 ✅ Completed by @sunank200 #59979
google 31 ✅ Completed by @sunank200 #59986
fab 19 💁 Assigned to @sunank200
celery 10 💁 Assigned to @ftakelait
apache 9 ✅ Completed by @sunank200 #59966
standard 8 ✅ Completed by @justinpakzad #60030
edge3 8 💁 Assigned to @Divyaselva14
cncf 8 💁 Assigned to to @neronsoda
microsoft 7 ✅ Completed by @justinpakzad #60030
keycloak 6 ✅ Completed by Srabasti #60092
openlineage 2 💁 Assigned to @sarth-akvaish
opensearch 2 ✅ Completed by @justinpakzd #60030
snowflake 2 ✅ Completed by @justinpakzad #60002
http 2 ✅ Completed by @jroachgolf84 #60090
jdbc 2 💁 Assigned to @Aditi102005
elasticsearch 2 ✅ Completed by @justinpakzad #60030
databricks 2 💁 Assigned to @henry3260
dbt 2 ✅ Completed by @sunank200 #59988
common 2 ✅ Completed by @sunank200 #59989
airbyte 2 ✅ Completed by @sunank200 #59991
yandex 2 ✅ Completed by @sunank200 #59992
alibaba 1 ✅ Completed by @sunank200 #59993
imap 1 ✅ Completed by @sunank200 #59994
odbc 1 ✅ Completed by @sunank200 #59995
openai 1 ✅ Completed by @sunank200 #59996
postgres 1 ✅ Completed by @sunank200 #59984
presto 1 ✅ Completed by @sunank200 #59985
redis 1 ✅ Completed by @sunank200 #59983
sftp 1 ✅ Completed by @sunank200 #59970
ssh 1 ✅ Completed by @sunank200 #59981
trino 1 ✅ Completed by @sunank200 #59968

Please feel free to comment on this issue to grab a provider

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions