-
Notifications
You must be signed in to change notification settings - Fork 453
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
Fixing issue where deleted profiles were being sent to devices. #25095
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25095 +/- ##
==========================================
+ Coverage 54.30% 63.83% +9.52%
==========================================
Files 1615 1617 +2
Lines 153594 153709 +115
Branches 3987 3987
==========================================
+ Hits 83416 98123 +14707
+ Misses 63296 47776 -15520
- Partials 6882 7810 +928
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
LGTM, profile reconciliation is tricky logic but the guard you added make sense to me.
|
||
// BatchProcessSimple is a simple utility function to batch process a slice of payloads. | ||
// Provide a slice of payloads, a batch size, and a function to execute on each batch. | ||
func BatchProcessSimple[T any]( |
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.
🎉
@@ -260,3 +261,54 @@ WHERE | |||
) | |||
return err | |||
} | |||
|
|||
// BulkDeleteHostUserCommandsWithoutResults deletes all commands without results for the given host/user IDs. |
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.
I think this is for the given "host/ command IDs", right? I see you use hostUserID
elsewhere, so looks like this is deliberate, what is a hostUserID
? Looks like this refers to nano's device 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.
Just future-proofing. The nano ID is either a device ID or user ID. I assume we will support user enrollments in the future.
#24804 # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Added/updated tests - [x] If database migrations are included, checked table schema to confirm autoupdate - [x] Manual QA for all new/changed functionality (cherry picked from commit 7e1a808)
…) (#25177) Cherry pick. For #24804 # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Added/updated tests - [x] If database migrations are included, checked table schema to confirm autoupdate - [x] Manual QA for all new/changed functionality (cherry picked from commit 7e1a808)
#24804
Checklist for submitter
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.