Skip to content
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

Feature/s3 multi delete #16847

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

Inqnuam
Copy link
Contributor

@Inqnuam Inqnuam commented Jan 28, 2025

What does this PR do?

Closes #16520

This PR adds full support for AWS DeleteObjects operations, with the same Input/Output as @aws-sdk/s3-client

const client = new S3Client();

try {
  const response = await client.deleteObjects(["pictures/file_1.png", "pictures/file_3.png"]);
} catch (err: any) {
  //:(
}

try {
  const response = await client.deleteObjects(["styles/main.css", "js/footer.js", { Key: "slow.js", VersionId: "8" }]);
} catch (err: any) {
  //:(
}
  • Documentation or TypeScript types
  • Code changes

How did you verify your code works?

  • I included a test for the new code, or existing tests cover it
  • I ran my tests locally and they pass (bun-debug test test/js/bun/s3/s3-multi-delete.test.ts)
  • I ran my tests on AWS and they pass

If Zig files changed:

  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I included a test for the new code, or an existing test covers it
  • JSValue used outside outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
  • I wrote TypeScript/JavaScript tests and they pass locally (bun-debug test test/js/bun/s3/s3-multi-delete.test.ts)

If new methods, getters, or setters were added to a publicly exposed class:

  • I added TypeScript types for the new methods, getters, or setters

@Inqnuam
Copy link
Contributor Author

Inqnuam commented Jan 28, 2025

The custom-made XML parser deserves a benchmark; it should be very fast!

// @ts-expect-error not allowed
{
VersionId: "ok",
// key: "wrong prop name" // NOTE Bun issue ? When uncommented 'key' must not be returned with getTruthyComptime("Key")
Copy link
Contributor Author

@Inqnuam Inqnuam Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jarred-Sumner is this a bug or its how getTruthyComptime works ?

@Jarred-Sumner
Copy link
Collaborator

@cirospaciari can you review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S3 option to delete multiple objects with single request
2 participants