Skip to content

feat(s3): S3 Object Storage via boto3#415

Open
bolinocroustibat wants to merge 1 commit intomainfrom
feat/s3-ovh
Open

feat(s3): S3 Object Storage via boto3#415
bolinocroustibat wants to merge 1 commit intomainfrom
feat/s3-ovh

Conversation

@bolinocroustibat
Copy link
Copy Markdown
Contributor

@bolinocroustibat bolinocroustibat commented Apr 15, 2026

Closes datagouv/data.gouv.fr#2000

Following the move from MinIO to S3-compatible Object Storage, switching MinIO Python SDK to a boto3-based stack.

This introduces S3Client with the same upload contract and public URL shape as before, swaps analysis callers to it, replaces the minio dependency with boto3, and updates tests to mock boto3.

@bolinocroustibat bolinocroustibat self-assigned this Apr 15, 2026
@bolinocroustibat bolinocroustibat marked this pull request as ready for review April 16, 2026 13:14
@bolinocroustibat bolinocroustibat changed the title feat(s3): OVH Object Storage via boto3 feat(s3): S3 Object Storage via boto3 Apr 16, 2026
@bolinocroustibat bolinocroustibat force-pushed the feat/s3-ovh branch 2 times, most recently from c3101e5 to 8b3c069 Compare April 16, 2026 13:29
Copy link
Copy Markdown
Contributor

@Pierlou Pierlou left a comment

Choose a reason for hiding this comment

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

Thanks for the migration 🙏

Comment thread udata_hydra/__init__.py Outdated
@bolinocroustibat bolinocroustibat force-pushed the feat/s3-ovh branch 2 times, most recently from b8d92c7 to 8feab42 Compare April 22, 2026 14:35
Replace the MinIO Python SDK with boto3 and a small S3Client helper (OVH Object Storage and other S3-compatible endpoints).

- Config: MINIO_* -> S3_* (endpoint, credentials, buckets); optional S3_*_PREFIX for object key prefix (empty = bucket root).
- GeoJSON/PMTiles: parameter upload_to_s3 (formerly upload_to_minio).
- Tests mock boto3.resource; test_s3_client covers root vs prefix uploads.

Rationale for optional prefixes: briefly dropped in an intermediate iteration, then restored so one bucket can namespace Hydra files (e.g. exports/) without multiplying buckets, while an empty prefix keeps objects at the bucket root.

BREAKING CHANGE: Replace MINIO_URL, MINIO_USER, MINIO_PWD, MINIO_*_BUCKET, and MINIO_*_FOLDER with S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY, S3_*_BUCKET, and S3_*_PREFIX in config.toml / deployment.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hydra] Migration du stockage sur OVH Object Storage

2 participants