fix(sfs): pass file_id instead of s3 key to mark_uploaded#2738
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 0 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe S3 create event handler now extracts a Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rust/cloud-storage/static_file_service/src/api/event/s3_create.rs`:
- Around line 7-9: The current fallback of using the raw S3 key when
StaticFileKey::from_s3_key fails will reintroduce the ghost-row bug; change the
logic in s3_create.rs so that StaticFileKey::from_s3_key(errors) are not
silently ignored but cause the handler to fail loudly: replace the
unwrap_or_else fallback on StaticFileKey::from_s3_key(&event.s3.object.key) with
explicit error handling that logs the parse failure (including the problematic
event.s3.object.key and the parse error) and returns an Err/early failure from
the handler so mark_uploaded is never called with an invalid file_id; reference
the StaticFileKey::from_s3_key call and the subsequent use of
file_id/mark_uploaded when making this change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9b5bac3f-4b77-4f8b-889f-8459879a9b17
📒 Files selected for processing (1)
rust/cloud-storage/static_file_service/src/api/event/s3_create.rs
e695aab to
147a9cb
Compare
147a9cb to
bb738ab
Compare
No description provided.