Skip to content

feat(storage): add Storage Provider contract (ADR-0001 + design spec)#26

Draft
alex-mabrouk wants to merge 4 commits into
mainfrom
feat/storage-provider-abstraction
Draft

feat(storage): add Storage Provider contract (ADR-0001 + design spec)#26
alex-mabrouk wants to merge 4 commits into
mainfrom
feat/storage-provider-abstraction

Conversation

@alex-mabrouk

@alex-mabrouk alex-mabrouk commented Jul 7, 2026

Copy link
Copy Markdown

Description

Make OKDP storage-agnostic by introducing a Storage Provider abstraction (Adapter pattern):
data services (Trino, Hive Metastore, Spark History, JupyterHub, Polaris) depend only on a stable,
backend-neutral contract (defaultStorage: provider / buckets / grants), and each backend
(SeaweedFS, RustFS, MinIO, Ceph RGW, AWS S3) implements it as an adapter that never references a
consumer context.

Today the SeaweedFS package is tightly coupled to every consumer (it reads .Context.trino,
.Context.hiveMetastore, .Context.polaris, …), so a second backend would be a full rewrite. This
PR replaces that inverted dependency with a clean contract.

**Delivered in three commits **

  1. docs: the contract — ADR-0001 (why) + design spec (how).
  2. refactor(seaweedfs): turn the SeaweedFS package into a compliant adapter consuming only
    defaultStorage.{provider,buckets,grants} (behaviour-preserving) + mirror the neutral contract
    into the catalog contexts.
  3. feat(rustfs): add RustFS as the second provider (official chart + mc-based provisioning Job).

Related Issue

Fixes #25

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / chore
  • Breaking change

How to Test

Contract review (this commit): read docs/adr/0001-storage-provider-abstraction.md and
docs/design/storage-provider-contract.md.

End-to-end (once commits 2 & 3 land), validated locally on a Kind cluster:

  1. Refactored SeaweedFS adapter deploys with no consumer-context reference; identities/buckets are
    built from grants/buckets; Polaris STS AssumeRole + real S3 write succeed.
  2. Swap SeaweedFS → RustFS by changing only defaultStorage.provider.endpoints (+ name) and the
    deployed infra Release: RustFS auto-provisions the 7 grants (users/policies) and 5 buckets, and
    Polaris STS AssumeRole + write round-trip succeed — with zero change to any consumer.

Checklist

  • I have read CONTRIBUTING.md
  • I have tested my changes
  • Documentation updated if needed
  • If breaking change: migration path described above
  • I hereby declare this contribution to be licensed under the Apache License Version 2.0.
  • I hereby agree to grant TOSIT a copyright license to use my contributions.

Introduce the Storage Provider abstraction that makes OKDP storage-agnostic:
consumers depend on a stable, backend-neutral contract (defaultStorage:
provider/buckets/grants) and each backend (SeaweedFS, RustFS, MinIO, Ceph RGW,
AWS S3) implements it as an adapter, without ever referencing consumer contexts.
@alex-mabrouk alex-mabrouk requested review from idirze and mlahouar July 7, 2026 16:07
@alex-mabrouk alex-mabrouk marked this pull request as draft July 7, 2026 16:07
@alex-mabrouk alex-mabrouk added enhancement New feature or request documentation Improvements or additions to documentation labels Jul 7, 2026
Alex added 3 commits July 7, 2026 19:08
Refactor the SeaweedFS package into a compliant adapter of the Storage Provider
contract (docs/design/storage-provider-contract.md): it now consumes ONLY
defaultStorage.{provider,buckets,grants} and no longer reaches into consumer
contexts (.Context.trino / .hiveMetastore / .jupyterHub / .sparkHistory / .polaris).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce a storage provider abstraction to make OKDP storage backend-agnostic

1 participant