Title: fix(account-deletion): list storage keys through the S3 client so Trigger runs can sweep by waleedlatif1 · Pull Request #9193 · simstudioai/sim · GitHub
Open Graph Title: fix(account-deletion): list storage keys through the S3 client so Trigger runs can sweep by waleedlatif1 · Pull Request #9193 · simstudioai/sim
X Title: fix(account-deletion): list storage keys through the S3 client so Trigger runs can sweep by waleedlatif1 · Pull Request #9193 · simstudioai/sim
Description: Summary Since v0.9.26 reached production, every account-deletion.storage.workspace-sweep and project-file.storage.prefix-cleanup outbox event fails in Trigger.dev with ListObjectsV2Command is not a constructor and dead-letters after 10 attempts. No objects are deleted, so nothing live is at risk, but a deleted account's storage and a deleted Project's files are left behind. Cause: listStorageKeyPage loaded the command with await import('@aws-sdk/client-s3'). The Trigger bundle resolves that package to its CommonJS build, and the dynamically imported namespace does not carry ListObjectsV2Command; static named imports of the same package (the rest of providers/s3/client.ts) are unaffected. Next.js resolves the package differently, so the app and the unit tests never hit it. Fix: the listing moves into listS3ObjectKeyPage in lib/uploads/providers/s3/client.ts, beside the other S3 commands it imports statically, and listStorageKeyPage calls it the way the Blob and GCS branches call their client modules. It now also fails clearly when the bucket is unset rather than sending Bucket: undefined. Verification I bundled the real listStorageKeyPage → S3 client path with esbuild (Node platform, code splitting, default main-first resolution) and pointed it at a local ListObjectsV2 mock that returns two pages: origin/staging: {"status":"fail","error":"TypeError: ListObjectsV2Command is not a constructor"}. This is the exact production error. this branch: {"status":"pass","pages":[{"keys":["ws/u1/a.txt","ws/u1/b.txt"],"done":false,"nextPageToken":"tok-2"},{"keys":["ws/u1/c.txt"],"done":true}]} Follow-up after deploy Dead-lettered events of both types need a requeue (POST /api/v1/admin/outbox/{id}/requeue). Both handlers are idempotent and re-check every reference before deleting. 🤖 Generated with Claude Code
Open Graph Description: Summary Since v0.9.26 reached production, every account-deletion.storage.workspace-sweep and project-file.storage.prefix-cleanup outbox event fails in Trigger.dev with ListObjectsV2Command is not ...
X Description: Summary Since v0.9.26 reached production, every account-deletion.storage.workspace-sweep and project-file.storage.prefix-cleanup outbox event fails in Trigger.dev with ListObjectsV2Command is not ...
Opengraph URL: https://github.com/simstudioai/sim/pull/9193
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:66f2b16f-fac3-b9de-ad78-8b55811f32ea |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C908:2550AC:ABA444:F1D712:6AFB78EB |
| html-safe-nonce | 4d1a661ef256cadcd2d4f973f2601ef8bfef36eb19e5c9840dead5b307e3f685 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTA4OjI1NTBBQzpBQkE0NDQ6RjFENzEyOjZBRkI3OEVCIiwidmlzaXRvcl9pZCI6IjYzNzYyMTEwNTU3MzE5ODA1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0e655c6e3ae9646568bb1f7a6c126cf54a58909c7d6a577083ecee104f1b1852 |
| hovercard-subject-tag | pull_request:4912662777 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/9193/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Since v0.9.26 reached production, every account-deletion.storage.workspace-sweep and project-file.storage.prefix-cleanup outbox event fails in Trigger.dev with ListObjectsV2Command is not ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0e29e7974fdda2feeaf5c891efd4b23b0734b23480232b62c7bdef13f40b5b48 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2e8872b770cc4d5d0cc1f2026afab747a268e2ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width