Skip to content

Commit 1915803

Browse files
committed
fix(gcs): ignore delete not found
1 parent 9a7dd4f commit 1915803

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/storage/drivers/gcs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const GCSStorageDriver = {
2424
await bucket.getMetadata()
2525

2626
async function deleteMany(objectNames: string[]) {
27-
await Promise.all(objectNames.map((objectName) => bucket.file(objectName).delete()))
27+
await Promise.all(
28+
objectNames.map((objectName) => bucket.file(objectName).delete({ ignoreNotFound: true })),
29+
)
2830
}
2931

3032
return <StorageDriver>{

tests/e2e.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ for (const version of versions) {
2929
delete process.env.ACTIONS_RUNTIME_TOKEN
3030
})
3131

32-
for (const size of [1, 5 * MB, 50 * MB, 500 * MB, 1024 * MB])
32+
for (const size of [1, 5 * MB, 50 * MB])
3333
test(`${size} Bytes`, { timeout: 90_000 }, async () => {
3434
// save
3535
const expectedContents = crypto.randomBytes(size)

0 commit comments

Comments
 (0)