-
-
Notifications
You must be signed in to change notification settings - Fork 281
fix: fall back to individual deletes when S3 backend returns NotImplemented for DeleteObjects #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
f7db348
cf308f1
6d4e96c
80d7e22
d736718
077adc0
bb23880
2d1e61a
50c59ad
b36e5d8
de221c1
7940539
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |||||||||||||
|
|
||||||||||||||
| import { S3Client } from '@aws-sdk/client-s3' | ||||||||||||||
| import { Readable } from 'stream' | ||||||||||||||
| import * as config from '../config' | ||||||||||||||
| import { S3Backend } from '../storage/backend/s3/adapter' | ||||||||||||||
|
|
||||||||||||||
| jest.mock('@aws-sdk/client-s3', () => { | ||||||||||||||
|
|
@@ -20,9 +21,9 @@ describe('S3Backend', () => { | |||||||||||||
| beforeEach(() => { | ||||||||||||||
| jest.clearAllMocks() | ||||||||||||||
| mockSend = jest.fn() | ||||||||||||||
| ;(S3Client as jest.Mock).mockImplementation(() => ({ | ||||||||||||||
| send: mockSend, | ||||||||||||||
| })) | ||||||||||||||
| ; (S3Client as jest.Mock).mockImplementation(() => ({ | ||||||||||||||
| send: mockSend, | ||||||||||||||
| })) | ||||||||||||||
|
Comment on lines
+24
to
+26
|
||||||||||||||
| ; (S3Client as jest.Mock).mockImplementation(() => ({ | |
| send: mockSend, | |
| })) | |
| ;(S3Client as jest.Mock).mockImplementation(() => ({ | |
| send: mockSend, | |
| })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a new env var/config flag (
STORAGE_S3_BATCH_DELETE_ENABLED). The PR description says "No new env vars, config flags" and "No configuration required"; please either update the PR/docs to reflect the new flag (and its default), or remove the flag and rely solely on runtime NotImplemented detection.