Repository navigation
Recover vulnerability counts after interrupted table swaps - #50898
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughThe vulnerability host-count table swap now removes a stale 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #50898 +/- ##
==========================================
- Coverage 68.53% 68.53% -0.01%
==========================================
Files 3978 3978
Lines 256274 256277 +3
Branches 13627 13627
==========================================
+ Hits 175632 175634 +2
- Misses 65006 65008 +2
+ Partials 15636 15635 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
juan-fdz-hawa
left a comment
There was a problem hiding this comment.
Thanks for the contrib!
- Adds related issue (if any), and if any of the manual QA checkboxes were selected. - Adds a -v verbose mode that also outputs who is assigned to the PR, a full link, and tags from the related issue Examples: ``` jonathan@jonathans-macbook-pro:~/repos/fleet-2$ ./tools/oncall/oncall.sh prs 51893 2026-08-25T17:29:40Z tested prateek-0490 Batch scheduled query name lookups when processing result logs 51881 2026-08-25T16:25:40Z nonpunctual Include script for printer configuration from CSV 51845 2026-08-25T04:20:44Z 49502 tested rajendrachavan Write a query and its labels in a single transaction 51731 2026-08-21T19:49:52Z tested prateek-0490 Validate software list order keys against an allowlist 51583 2026-08-19T19:34:15Z tested prateek-0490 Require a team selection when validating report run targets 51338 2026-08-17T05:23:53Z 50846 Dhvanit41 Hide the toast details panel when the payload is empty 51265 2026-08-14T17:54:28Z tested prateek-0490 Expand host script variables via the environment 51241 2026-08-14T14:32:34Z 50336 tested andymFleet 50336 apple business stale fleet names 51178 2026-08-13T20:18:48Z moojomoore Add macOS unlock user account action 51119 2026-08-13T05:28:14Z 50882 Dhvanit41 Return an error when refetching an Android host 51020 2026-08-12T00:46:05Z 40092 sjawhar Support credentialProviderPolicy in Android app configuration 50943 2026-08-11T12:31:48Z 46773 tested surajtripathy07 Add software custom targets warning to delete label modal 50898 2026-08-10T19:26:08Z 45100 tianrking Recover vulnerability counts after interrupted table swaps 50836 2026-08-08T19:23:13Z 50300 tested kitarp29 Adding the logic to make controls even when it's empty 50822 2026-08-08T01:35:19Z tested viewer12 Add Nexus Shell as a macOS Fleet-maintained app 50774 2026-08-07T15:14:11Z 50357 tested Dhvanit41 Clear stale failure detail when an Android profile becomes verified 49816 2026-07-23T13:19:19Z tested sleepy-slothh Fix Ubuntu OSV binary package matching 43774 2026-04-20T15:46:23Z BCTBB Helm - Gateway API support ``` ``` jonathan@jonathans-macbook-pro:~/repos/fleet-2$ ./tools/oncall/oncall.sh prs -v 51893 2026-08-25T17:29:40Z tested prateek-0490 #51893 Batch scheduled query name lookups when processing result logs 51881 2026-08-25T16:25:40Z nonpunctual #51881 Include script for printer configuration from CSV 51845 2026-08-25T04:20:44Z 49502 tested rajendrachavan lucasmrod #51845 Write a query and its labels in a single transaction bug, ~backend, ~released bug, #g-orchestration 51731 2026-08-21T19:49:52Z tested prateek-0490 juan-fdz-hawa #51731 Validate software list order keys against an allowlist 51583 2026-08-19T19:34:15Z tested prateek-0490 juan-fdz-hawa #51583 Require a team selection when validating report run targets 51338 2026-08-17T05:23:53Z 50846 Dhvanit41 #51338 Hide the toast details panel when the payload is empty bug, ~frontend, ~released bug, #g-auto-patching 51265 2026-08-14T17:54:28Z tested prateek-0490 georgekarrv #51265 Expand host script variables via the environment 51241 2026-08-14T14:32:34Z 50336 tested andymFleet JordanMontgomery #51241 50336 apple business stale fleet names bug, ~released bug, #g-apple-at-work 51178 2026-08-13T20:18:48Z moojomoore #51178 Add macOS unlock user account action 51119 2026-08-13T05:28:14Z 50882 Dhvanit41 #51119 Return an error when refetching an Android host bug, ~released bug, #g-byod 51020 2026-08-12T00:46:05Z 40092 sjawhar #51020 Support credentialProviderPolicy in Android app configuration ~feature fest, customer-pingali, #g-byod 50943 2026-08-11T12:31:48Z 46773 tested surajtripathy07 lucasmrod #50943 Add software custom targets warning to delete label modal bug, ~released bug, #g-orchestration, customer-susanoo 50898 2026-08-10T19:26:08Z 45100 tianrking juan-fdz-hawa #50898 Recover vulnerability counts after interrupted table swaps bug, ~released bug, ~community, #g-supply-chain, ~aging bug 50836 2026-08-08T19:23:13Z 50300 tested kitarp29 lucasmrod #50836 Adding the logic to make controls even when it's empty bug, ~gitops, #g-orchestration 50822 2026-08-08T01:35:19Z tested viewer12 AdamBaali #50822 Add Nexus Shell as a macOS Fleet-maintained app 50774 2026-08-07T15:14:11Z 50357 tested Dhvanit41 #50774 Clear stale failure detail when an Android profile becomes verified bug, ~released bug, #g-byod 49816 2026-07-23T13:19:19Z tested sleepy-slothh #49816 Fix Ubuntu OSV binary package matching 43774 2026-04-20T15:46:23Z BCTBB #43774 Helm - Gateway API support ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an optional verbose mode for pull request listings, showing assignees, URLs, linked issue labels, and manual QA status. * Improved output formatting with aligned columns. * **Bug Fixes** * Unknown command-line arguments are now rejected with clearer usage guidance. * Improved detection of linked issues in pull request descriptions. * **Documentation** * Updated command usage information to describe the verbose option. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Related issue: Resolves #45100
What changed
Remove a stale
vulnerability_host_counts_oldtable immediately before the atomic rename. If an earlier run was interrupted after the rename but before cleanup, the next vulnerability processing run can now recover instead of failing on the existing backup table.The regression coverage verifies both the SQL ordering and the recovery path against MySQL with a pre-existing stale table.
Checklist for submitter
Changes file added for user-visible changes in
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Input data is properly validated,
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.Timeouts are implemented and retries are limited to avoid infinite loops
Testing
Added/updated automated tests
QA'd all new/changed functionality manually
Manual QA was not run because a local MySQL test service was unavailable. The SQL sequencing regression passed locally, and a MySQL integration regression is included for CI.
Summary by CodeRabbit