Skip to content

Commit

Permalink
Remove support for LifecycleDeletion action (#5348)
Browse files Browse the repository at this point in the history
Support for emitting notifications based around this type of action will be supported eventually, but not until throughput improvements to supporting infrastructure are completed.
  • Loading branch information
mattdeboard authored Mar 21, 2024
1 parent 67fc01c commit 11e2ff5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/wrangler/src/__tests__/r2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ describe("r2", () => {
).resolves.toBe(undefined);
expect(std.out).toMatchInlineSnapshot(`
"Sending this configuration to \\"my-bucket\\":
{\\"rules\\":[{\\"prefix\\":\\"\\",\\"suffix\\":\\"\\",\\"actions\\":[\\"PutObject\\",\\"CompleteMultipartUpload\\",\\"CopyObject\\",\\"DeleteObject\\",\\"LifecycleDeletion\\"]}]}
{\\"rules\\":[{\\"prefix\\":\\"\\",\\"suffix\\":\\"\\",\\"actions\\":[\\"PutObject\\",\\"CompleteMultipartUpload\\",\\"CopyObject\\",\\"DeleteObject\\"]}]}
Configuration created successfully!"
`);
});
Expand Down
3 changes: 1 addition & 2 deletions packages/wrangler/src/r2/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ export const R2EventableOperations = [
"CompleteMultipartUpload",
"AbortMultipartUpload",
"CopyObject",
"LifecycleDeletion",
] as const;
export type R2EventableOperation = typeof R2EventableOperations[number];

Expand All @@ -335,7 +334,7 @@ export const actionsForEventCategories: Record<
R2EventableOperation[]
> = {
object_create: ["PutObject", "CompleteMultipartUpload", "CopyObject"],
object_delete: ["DeleteObject", "LifecycleDeletion"],
object_delete: ["DeleteObject"],
};

export type R2EventType = keyof typeof actionsForEventCategories;
Expand Down

0 comments on commit 11e2ff5

Please sign in to comment.