Fix S3 carve cleanup never running and panic on empty carves (#43045) - #46462
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #46462 +/- ##
==========================================
+ Coverage 66.82% 66.85% +0.02%
==========================================
Files 2808 2808
Lines 223582 223603 +21
Branches 11347 11347
==========================================
+ Hits 149413 149487 +74
+ Misses 60615 60544 -71
- Partials 13554 13572 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
5c26d4a to
af7dd98
Compare
af7dd98 to
026ec8a
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR fixes two bugs in S3 carve cleanup. It routes the cleanup cron job to invoke the S3-aware 🚥 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. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Fixed a bug where the carve cleanup cron job called the MySQL implementation instead of the S3-aware implementation on S3-configured deployments, meaning expired carves were never marked as expired in S3. Also fixed a panic in S3 carve cleanup that occurred when there were no non-expired carves.
026ec8a to
b4309d3
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
| carve.Expired = true | ||
| err = c.UpdateCarve(ctx, carve) | ||
| if uerr := c.UpdateCarve(ctx, carve); uerr != nil { | ||
| retErr = errors.Join(retErr, ctxerr.Wrap(ctx, uerr, "marking carve expired")) |
There was a problem hiding this comment.
nit: is it worth adding extra information to the error string? maybe the carve's ID?
Related issue: Resolves #43045
Fixed a bug where the carve cleanup cron job called the MySQL implementation instead of the S3-aware implementation on S3-configured deployments, meaning expired carves were never marked as expired in S3. Also fixed a panic in S3 carve cleanup that occurred when there were no non-expired carves.
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Testing
Summary by CodeRabbit
Bug Fixes
Tests