Skip to content

Decouple S3 ObjectStorageProvider from common-sql into amazon provider - #64941

Open
cruseakshay wants to merge 7 commits into
apache:mainfrom
cruseakshay:feature/decouple-object-storage-providers
Open

Decouple S3 ObjectStorageProvider from common-sql into amazon provider#64941
cruseakshay wants to merge 7 commits into
apache:mainfrom
cruseakshay:feature/decouple-object-storage-providers

Conversation

@cruseakshay

@cruseakshaycruseakshay commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Decouples S3ObjectStorageProvider from apache-airflow-providers-common-sql into apache-airflow-providers-amazon.

Architecture:

  • common-sql defines the ObjectStorageProvider abstraction and all object storage providers (LocalStorage, S3, future GCS/Azure) are resolved at runtime via ProvidersManager.

Key changes:

  • Add object-storage-providers registration mechanism to ProvidersManager (schema, discovery, property)
  • Move S3ObjectStorageProvider to providers/amazon/aws/datafusion/object_storage.py
  • Update common-sql to dynamically resolve storage providers via the ProvidersManager registry
  • Add backward-compatible deprecation shim for old S3ObjectStorageProvider import path
  • Decouple amazon from common-sql hard imports — amazon remains as an optional extra (for pip install common-sql[amazon]), but common-sql no longer statically imports from the amazon provider at runtime

Follow-up PRs:

  • decouple LocalStorage
  • Add Azure Blob Storage (az://).
  • Add Google Cloud Storage (gs://)

Testing:

  • E2E integration test: verified with AWS S3 bucket using AnalyticsOperator

related: #62867


Was generative AI tooling used to co-author this PR?

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-providers discovery/registry to ProvidersManager (schema + discovery + access property).
  • Move S3ObjectStorageProvider into 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
FileDescription
providers/common/sql/src/airflow/providers/common/sql/datafusion/object_storage_provider.pyReplaces hardcoded S3 provider with ProvidersManager registry lookup + deprecation shim.
providers/common/sql/src/airflow/providers/common/sql/datafusion/engine.pyDelegates connection/credential resolution to the storage provider (ConnectionConfig now only carries conn_id).
airflow-core/src/airflow/providers_manager.pyAdds ObjectStorageProviderInfo + registry discovery and property for object storage providers.
airflow-core/src/airflow/provider.yaml.schema.jsonExtends provider.yaml schema to allow object-storage-providers.
airflow-core/src/airflow/provider_info.schema.jsonExtends provider-info schema to include object-storage-providers.
airflow-core/tests/unit/always/test_providers_manager.pyAdds unit tests for object storage provider discovery/override behavior.
providers/amazon/src/airflow/providers/amazon/aws/datafusion/object_storage.pyNew S3 DataFusion-backed S3ObjectStorageProvider implementation in amazon provider.
providers/amazon/provider.yamlRegisters S3 object storage provider under object-storage-providers.
providers/amazon/src/airflow/providers/amazon/get_provider_info.pyAdds generated provider-info entry for object-storage-providers.
providers/amazon/pyproject.tomlAdds a datafusion optional extra for the amazon provider.
providers/amazon/tests/unit/amazon/aws/datafusion/test_object_storage.pyAdds unit tests for the moved S3 provider implementation.
providers/amazon/tests/unit/amazon/aws/datafusion/init.pyNew test package init for amazon datafusion tests.
providers/amazon/src/airflow/providers/amazon/aws/datafusion/init.pyNew package init for amazon datafusion module.
providers/common/sql/tests/unit/common/sql/datafusion/test_object_storage_provider.pyUpdates tests to validate registry resolution and deprecation shim behavior.
providers/common/sql/tests/unit/common/sql/datafusion/test_engine.pyUpdates tests to reflect provider-resolved credentials and simplified ConnectionConfig.
providers/common/sql/docs/operators.rstDocuments that S3 support requires apache-airflow-providers-amazon[datafusion].
providers/common/sql/pyproject.tomlAdjusts optional deps ordering; still includes an amazon optional dependency.

Comment threadproviders/common/sql/pyproject.toml
@potiuk
potiuk marked this pull request as draft April 23, 2026 00:42
@potiuk

potiuk commented Apr 23, 2026

Copy link
Copy Markdown
Member

@cruseakshay This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Merge conflicts: this branch has conflicts with main and cannot be merged as-is. Rebase: git fetch upstream main && git rebase upstream/main, resolve, force-push.
  • Unresolved review comments (10 threads): please walk through each unresolved review thread. Even if a suggestion looks incorrect or irrelevant — and some of them will be, especially any comments left by automated reviewers like GitHub Copilot — it is still the author's responsibility to respond: apply the fix, reply in-thread with a brief explanation of why the suggestion does not apply, or resolve the thread if the feedback is no longer relevant. Once you believe a thread is resolved — whether by pushing a fix or by explaining why the suggestion doesn't apply — please mark it as resolved yourself by clicking the 'Resolve conversation' button at the bottom of each thread. Reviewers don't auto-close their own threads, so an addressed-but-unresolved thread reads as 'still waiting on the author' and keeps the PR from moving forward.

What to do next:

  • Address the items above.
  • Make sure static checks pass locally: prek run --from-ref main --stage pre-commit.
  • Mark the PR as "Ready for review" when you are done.

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.

@cruseakshay
cruseakshayforce-pushed the feature/decouple-object-storage-providers branch from 5da0ed3 to 8d3b520CompareApril 23, 2026 05:23
@cruseakshay
cruseakshay marked this pull request as ready for review April 23, 2026 06:46
@cruseakshay
cruseakshayforce-pushed the feature/decouple-object-storage-providers branch from 8d3b520 to 1b56f18CompareApril 27, 2026 04:52
@dabla

Copy link
Copy Markdown
Contributor

Really like this implementation, great job @cruseakshay ! Looking good to me, WDYT @potiuk?

@potiukpotiuk added the ready for maintainer review Set after triaging when all criteria pass. label May 5, 2026

@dabladabla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me except the tests in provider manager, nice work!

Comment threadairflow-core/tests/unit/always/test_providers_manager.py
@cruseakshay
cruseakshayforce-pushed the feature/decouple-object-storage-providers branch from 1b56f18 to 5ea0124CompareMay 17, 2026 09:17
@potiuk

Copy link
Copy Markdown
Member

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

@potiukpotiuk removed the ready for maintainer review Set after triaging when all criteria pass. label May 26, 2026
@cruseakshay
cruseakshayforce-pushed the feature/decouple-object-storage-providers branch 2 times, most recently from 9d5be96 to a7d1029CompareJune 2, 2026 17:07
@eladkal
eladkal requested a review from dablaJune 2, 2026 17:54
@potiukpotiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 8, 2026
@cruseakshay
cruseakshayforce-pushed the feature/decouple-object-storage-providers branch from a7d1029 to 68c313fCompareJune 25, 2026 09:53
@github-actions

Copy link
Copy Markdown
Contributor

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.

@github-actionsgithub-actionsBot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 10, 2026
@dabladabla reopened this Aug 17, 2026
@github-actionsgithub-actionsBot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Aug 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providerskind:documentationprovider:amazonAWS/Amazon - related issuesprovider:common-sqlready for maintainer reviewSet after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cruseakshay@potiuk@dabla