BUG: S3 proxy client export breaks when s3Client is rebuilt #61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed — the
s3Clientexport is now aProxythat dispatches every method call through the live_client, so callers continue to work afterrebuildS3Client()swaps the underlying instance. Method binds preservethis. Seeservices/mam-api/src/s3/client.js:35-45.Fix Plan — #61 S3 proxy client export breaks on rebuild
Root cause: s3/client.js exports s3Client as a Proxy (correct) BUT S3_BUCKET is a plain let export. Code that does
import { S3_BUCKET }captures value at import time and won't see updates after rebuildS3Client().Fix: Audit all imports of S3_BUCKET, replace with getter function:
Files: s3/client.js, all files importing S3_BUCKET
Effort: ~1h
**Priority: P2 — subtle bug