Repository navigation
Decouple S3 ObjectStorageProvider from common-sql into amazon provider - #64941
Conversation
ad3d3c8 to
dbfbfb9
Compare
There was a problem hiding this comment.
Pull request overview
Decouples DataFusion S3 object storage support from apache-airflow-providers-common-sql by moving the S3 ObjectStorageProvider implementation into apache-airflow-providers-amazon, and adding a new ProvidersManager registry for resolving object storage providers at runtime.
Changes:
- Add
object-storage-providersdiscovery/registry toProvidersManager(schema + discovery + access property). - Move
S3ObjectStorageProviderinto the Amazon provider and register it via provider metadata. - Update common-sql to resolve non-local storage providers via the registry and add a deprecation shim for the old import path.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.py | Replaces hardcoded S3 provider with ProvidersManager registry lookup + deprecation shim. |
| providers/common/sql/src/airflow/providers/common/sql/datafusion/engine.py | Delegates connection/credential resolution to the storage provider (ConnectionConfig now only carries conn_id). |
| airflow-core/src/airflow/providers_manager.py | Adds ObjectStorageProviderInfo + registry discovery and property for object storage providers. |
| airflow-core/src/airflow/provider.yaml.schema.json | Extends provider.yaml schema to allow object-storage-providers. |
| airflow-core/src/airflow/provider_info.schema.json | Extends provider-info schema to include object-storage-providers. |
| airflow-core/tests/unit/always/test_providers_manager.py | Adds unit tests for object storage provider discovery/override behavior. |
| providers/amazon/src/airflow/providers/amazon/aws/datafusion/object_storage.py | New S3 DataFusion-backed S3ObjectStorageProvider implementation in amazon provider. |
| providers/amazon/provider.yaml | Registers S3 object storage provider under object-storage-providers. |
| providers/amazon/src/airflow/providers/amazon/get_provider_info.py | Adds generated provider-info entry for object-storage-providers. |
| providers/amazon/pyproject.toml | Adds a datafusion optional extra for the amazon provider. |
| providers/amazon/tests/unit/amazon/aws/datafusion/test_object_storage.py | Adds unit tests for the moved S3 provider implementation. |
| providers/amazon/tests/unit/amazon/aws/datafusion/init.py | New test package init for amazon datafusion tests. |
| providers/amazon/src/airflow/providers/amazon/aws/datafusion/init.py | New package init for amazon datafusion module. |
| providers/common/sql/tests/unit/common/sql/datafusion/test_object_storage_provider.py | Updates tests to validate registry resolution and deprecation shim behavior. |
| providers/common/sql/tests/unit/common/sql/datafusion/test_engine.py | Updates tests to reflect provider-resolved credentials and simplified ConnectionConfig. |
| providers/common/sql/docs/operators.rst | Documents that S3 support requires apache-airflow-providers-amazon[datafusion]. |
| providers/common/sql/pyproject.toml | Adjusts optional deps ordering; still includes an amazon optional dependency. |
|
@cruseakshay This PR has been converted to draft because it does not yet meet our Pull Request quality criteria. Issues found:
What to do next:
Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
5da0ed3 to
8d3b520
Compare
8d3b520 to
1b56f18
Compare
|
Really like this implementation, great job @cruseakshay ! Looking good to me, WDYT @potiuk? |
dabla
left a comment
There was a problem hiding this comment.
Looking good to me except the tests in provider manager, nice work!
1b56f18 to
5ea0124
Compare
|
@cruseakshay — There are 1 unresolved review thread on this PR from @dabla. Could you either push a fix or reply in each thread explaining why the feedback doesn't apply? Once you believe the feedback is addressed, mark the thread as resolved so the reviewer isn't re-pinged needlessly. Thanks! Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
9d5be96 to
a7d1029
Compare
a7d1029 to
68c313f
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
18035b3 to
7fdabce
Compare
dabla
left a comment
There was a problem hiding this comment.
Addressed
- A non-
awsconnection on ans3://source raisesValueError("Unknown connection type ...")again, as onmain, before any hook or store is built (18035b3d49;test_s3_provider_rejects_non_aws_connectionasserts neither is called). .valueis back in the "connection_config must be provided" message.- The engine returns a bare
ConnectionConfigfor provider-owned storage types without fetching the connection first. test_object_storage_providers_propertyis gone; the remaining core tests cover the property and the discovery.- The conflicts with
maininproviders/amazon/docs/index.rstanduv.lockare gone with the rebase of 2026-11-23. common-sql[amazon]carries# use next version;amazon[datafusion]pinscommon-sql>=1.33.0and is in the amazon dev group.
Open
- [1]
object-storage-providersis missing fromProviderInfoResponse, which failstest_provider_info_response_declares_every_schema_keyin four core jobs. - [2] a string storage type works for embedded providers and raises
AttributeErrorfor registry ones. - [3] the deprecation-shim tests do not name
AirflowProviderDeprecationWarning.
Diff-based pass over 18035b3d49, then the same change rebased on main e2a2fd4ef2 in a separate worktree: amazon and common-sql DataFusion tests 159 passed, the four core object-storage discovery tests passed. On the rebased head 7fdabceb9b I checked the CI results and the files these comments anchor on, which are unchanged; I did not rerun the tests there. The comparison with the dialects registration (schemas, ProvidersManager, discovery, cleanup, property, lazy core import from common-sql) shows one gap, [1]. No test of the base is removed without a replacement except the string case of [2].
…void redundant connection fetch
…ge type, pin shim warning category
dadb2cd to
a87ea09
Compare
The three points of this review (the create_object_store contract, the version floor on the extra, the unguarded import_string) are fixed in the current head and their threads are resolved; CI is green.
|
Congrats @cruseakshay , we finally have it merged, it took a while but your efforts finally paid off. Thank you for your patience and hard work. |
Thank you! |
Summary
Decouples
S3ObjectStorageProviderfromapache-airflow-providers-common-sqlintoapache-airflow-providers-amazon.Architecture:
common-sqldefines theObjectStorageProviderabstraction and all object storage providers (LocalStorage, S3, future GCS/Azure) are resolved at runtime viaProvidersManager.Key changes:
object-storage-providersregistration mechanism toProvidersManager(schema, discovery, property)S3ObjectStorageProvidertoproviders/amazon/aws/datafusion/object_storage.pycommon-sqlto dynamically resolve storage providers via theProvidersManagerregistryS3ObjectStorageProviderimport pathamazonfromcommon-sqlhard imports —amazonremains as an optional extra (forpip install common-sql[amazon]), butcommon-sqlno longer statically imports from the amazon provider at runtimeFollow-up PRs:
Testing:
AnalyticsOperatorrelated: #62867
Was generative AI tooling used to co-author this PR?