Loading
feat(storage): adjust S3 driver to S06 narrowed interface (Step 16)
Adjusts the Container Registry S3 v2 driver to S06's narrowed StorageDriver interface and wires it to the Step 15 conformance suite (S06 Step 16).
Scope
- Promote
internal/storage/_imported/driver/s3-aws/v2→internal/storage/driver/s3/, and remove the promoted/superseded source from_imported/. - Adapt to the narrowed interface (offset-based
Writer,Exists, non-recursiveDelete, metadata onPutContent/Move) and AR observability/lint conventions. - The driver is config-agnostic:
New(params DriverParameters, logger)takes a driver-owned params struct with already-resolved credentials (and an optionalTransporttest seam) and does no secret or config I/O. The composition root mapsconfig.S3Config(+ secret-provider-resolved credentials) ontoDriverParametersin a later wiring step; tests build it from env. FileWriterbuffer-flush failures surface as*storage.PartialFlushError(terminal G1a/G1b), exercised via aflushFailgofail seam in thetest:storage-failpointsjob.New()rejects a non-positivemax_requests_per_second(a zero-rate throttler would stall every request).configbounds-checksstorage.s3.chunk_sizeagainst the driver's owns3.MinChunkSize/s3.MaxChunkSize(single source of truth).
Tests / CI
- Conformance suite via an S3 factory + AC#7/#9/#11 tests (
//go:build integration), configured fromARTIFACT_REGISTRY_TEST_S3_*env (creds via theAWS_*default chain). test:integration:s3-seaweedfsandtest:integration:s3-seaweedfsrun conformance + AC suites against a SeaweedFS+GarageFS service container on every MR touching the driver.
Follow-ups (later steps)
- Real-AWS auth-mode matrix on the default branch; local
misetask for the SeaweedFS conformance run. - Composition-root credential wiring (
config.S3Config→DriverParametersvia the LabKit v2 secret provider).
Related to #161 (closed)
Edited by Pawel Rozlach