chore: remove unused S3 SignatureVersion setting#39244
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis pull request removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39244 +/- ##
===========================================
+ Coverage 70.87% 70.89% +0.01%
===========================================
Files 3196 3196
Lines 113288 113287 -1
Branches 20531 20520 -11
===========================================
+ Hits 80294 80312 +18
+ Misses 30943 30930 -13
+ Partials 2051 2045 -6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
KevLehman
left a comment
There was a problem hiding this comment.
I kinda remember that if you remove the english translation, then all the other translations would be removed by lingohub at the next update 👀 (for the future)
55f2e1b to
c84b6d3
Compare
|
After merging this one, would u mind creating a task for removing the setting with a migration? |
36f4192 to
1a77438
Compare
1a77438 to
dc39bad
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/meteor/app/file-upload/ufs/AmazonS3/server.ts (1)
23-31:⚠️ Potential issue | 🟠 MajorApply
ACLto upload parameters ingetWriteStream.The
params.ACLproperty is read from settings and defined inS3Optionsbut is never applied toPutObjectCommandInputingetWriteStream. Since ACL controls object permissions in S3, this omission prevents the configured access control from being applied to uploaded files.Fix: Add ACL to upload params
const uploadParams: PutObjectCommandInput = { Key: this.getPath(file), Body: writeStream, Bucket: classOptions.params.Bucket, + ACL: classOptions.params.ACL, };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/meteor/app/file-upload/ufs/AmazonS3/server.ts` around lines 23 - 31, The S3Options type includes params.ACL but that ACL is not being added to the PutObjectCommandInput in getWriteStream, so update the getWriteStream implementation to include params.ACL when constructing the upload parameters; specifically, when building the PutObjectCommandInput (or the object passed to PutObjectCommand) inside getWriteStream, add an "ACL: options.params.ACL" (or equivalent) field so the configured ACL value from S3Options.params is applied to the uploaded object.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/meteor/app/file-upload/ufs/AmazonS3/server.ts`:
- Around line 125-134: The delete path currently logs errors inside the
try/catch around s3.send(new DeleteObjectCommand(...)) but swallows them, so
callers never learn deletions failed; update the catch in the method that calls
s3.send (the block using DeleteObjectCommand, getPath(...) and
classOptions.params.Bucket) to rethrow the caught error after calling
SystemLogger.error (or alternatively return a clear failure status), ensuring
the caller receives the failure instead of silent success.
---
Outside diff comments:
In `@apps/meteor/app/file-upload/ufs/AmazonS3/server.ts`:
- Around line 23-31: The S3Options type includes params.ACL but that ACL is not
being added to the PutObjectCommandInput in getWriteStream, so update the
getWriteStream implementation to include params.ACL when constructing the upload
parameters; specifically, when building the PutObjectCommandInput (or the object
passed to PutObjectCommand) inside getWriteStream, add an "ACL:
options.params.ACL" (or equivalent) field so the configured ACL value from
S3Options.params is applied to the uploaded object.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 42ccd6d0-6d94-493d-8e5b-db039c815858
📒 Files selected for processing (4)
apps/meteor/app/file-upload/server/config/AmazonS3.tsapps/meteor/app/file-upload/ufs/AmazonS3/server.tsapps/meteor/package.jsonapps/meteor/server/settings/file-upload.ts
💤 Files with no reviewable changes (1)
- apps/meteor/server/settings/file-upload.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- apps/meteor/app/file-upload/server/config/AmazonS3.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: 📦 Build Packages
- GitHub Check: CodeQL-Build
- GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/app/file-upload/ufs/AmazonS3/server.ts
🧠 Learnings (3)
📓 Common learnings
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:09.561Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs for apps/meteor/app/api/server/v1 endpoints, maintainers prefer to avoid any logic changes; style-only cleanups (like removing inline comments) may be deferred to follow-ups to keep scope tight.
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.
Applied to files:
apps/meteor/app/file-upload/ufs/AmazonS3/server.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.
Applied to files:
apps/meteor/app/file-upload/ufs/AmazonS3/server.ts
🔇 Additional comments (5)
apps/meteor/app/file-upload/ufs/AmazonS3/server.ts (4)
140-161: LGTM!The
getReadStreamimplementation correctly usesGetObjectCommandwith proper range header formatting and includes appropriate null/type checks for the response body before returning it.
192-205: LGTM with minor inconsistency.The
Uploadusage from@aws-sdk/lib-storageis the correct v3 approach for streaming uploads. The promise handling correctly emits events on completion/error.Minor note: Line 203 uses
{ err: error }while Line 133 uses{ error }. Consider aligning for consistency in log parsing.
83-95: LGTM!The
getSignedUrlimplementation correctly uses the v3 presigner withGetObjectCommand, properexpiresInconfiguration, and appropriate content disposition handling.
57-62: No issue:customUserAgentis a valid configuration option for AWS SDK v3'sS3Client. The code correctly uses this property to customize the user agent string sent in requests.apps/meteor/package.json (1)
69-71: AWS SDK v3 package versions are valid and secure.All three packages (
@aws-sdk/client-s3,@aws-sdk/lib-storage,@aws-sdk/s3-request-presigner) at version 3.862.0 exist on npm, and no known security vulnerabilities are reported.
dc39bad to
cf031f4
Compare
Proposed changes (including videos or screenshots)
The AWS SDK v3 S3 client always uses Signature Version 4 and no longer accepts a configurable signature version, so this setting had become a no-op.
Issue(s)
Steps to test or reproduce
Further comments
Created the migration PR for the future: #39488.
Summary by CodeRabbit