fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.15k stars 432 forks source link

Split up apple and windows profile management cron jobs #23975

Open sgress454 opened 1 day ago

sgress454 commented 1 day ago

for #22824

This PR splits up the newMDMProfileManager function into two functions newAppleMDMProfileManager and newWindowsMDMProfileManager, the latter containing the code to start the windows-specific profile management job. This allows scheduling and scaling the Apple and Windows profile management jobs separately.

Tested locally by checking that the jobs were scheduled at startup, and then triggering the mdm_apple_profile_manager and mdm_windows_profile_manager schedules via the /trigger API; nothing blew up.

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 56.00000% with 11 lines in your changes missing coverage. Please review.

Project coverage is 63.17%. Comparing base (ee1ee95) to head (5eb40da). Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
cmd/fleet/serve.go 0.00% 11 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #23975 +/- ## ========================================== - Coverage 63.20% 63.17% -0.04% ========================================== Files 1563 1564 +1 Lines 148839 149048 +209 Branches 3736 3736 ========================================== + Hits 94074 94156 +82 - Misses 47348 47466 +118 - Partials 7417 7426 +9 ``` | [Flag](https://app.codecov.io/gh/fleetdm/fleet/pull/23975/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fleetdm) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/fleetdm/fleet/pull/23975/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fleetdm) | `64.01% <56.00%> (-0.04%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fleetdm#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: