-
Notifications
You must be signed in to change notification settings - Fork 6.9k
fix: s3 configs #6050
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
fix: s3 configs #6050
Conversation
TestGru AssignmentSummary
Tip You can |
Preview mcp_server Image: |
Preview sandbox Image: |
Docs Preview:🚀 FastGPT Document Preview Ready! |
Preview fastgpt Image: |
| return config; // bytes | ||
| }; | ||
|
|
||
| export const S3_KEY_PATH_INVALID_CHARS = ['/', '\\', '|']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 MAP,o1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 12
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| error instanceof S3Error && | ||
| error.message.includes('Object name contains unsupported characters.') | ||
| ) { | ||
| await MongoS3TTL.deleteOne({ _id: file._id }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unhandled MongoDB error stops file cleanup loop
The await MongoS3TTL.deleteOne() call inside the catch block isn't wrapped in its own try-catch. If this MongoDB operation throws (due to connection issues, timeouts, etc.), the error propagates to the outer catch handler, terminating the entire cleanup loop. This means all remaining files in the batch won't be processed until the next cron run, potentially leaving expired files uncleaned for an extended period.
* fix: s3 configs * s3 --------- Co-authored-by: archer <545436317@qq.com>
* fix: s3 configs * s3 --------- Co-authored-by: archer <545436317@qq.com>
* perf: faq * index * delete dataset * delete dataset * perf: delete dataset * init * fix: outLink UID (#6048) * perf: query extension * fix: s3 configs (#6050) * fix: s3 configs * s3 --------- Co-authored-by: archer <545436317@qq.com> * s3 valid string check * perf: completion api * fix: model test * perf: init * fix: init * fix: init shell * fix: faq --------- Co-authored-by: Roy <whoeverimf5@gmail.com>
Note
Pass
pathStyleto the external S3 client, handle invalid object-name errors during TTL cleanup, add a key invalid-char map, and update docs to forbid|,/,\inuid.pathStyleto external S3 client inpackages/service/common/s3/buckets/base.ts.S3_KEY_PATH_INVALID_CHARS_MAPinpackages/service/common/s3/constants.ts.packages/service/common/s3/controller.tsto catchS3Errorfor unsupported characters and remove stale DB entries.document/content/docs/introduction/development/openapi/share.mdxto clarifyuidmust not contain|,/, or\.Written by Cursor Bugbot for commit 05eb753. This will update automatically on new commits. Configure here.