fleet
fleet copied to clipboard
`/api/v1/fleet/mdm/profiles/batch` should not generate activity when nothing changed
Fleet version: Fleet 4.54.0 Web browser and operating system: current browser/OS
💥 Actual behavior
Audit log is always showing 3 profiles messages
🧑💻 Steps to reproduce
- Apply empty configuration profiles via
/api/v1/fleet/mdm/profiles/batch - Apply empty configuration profiles via
/api/v1/fleet/mdm/profiles/batchagain - Notice activity log has 3 profiles messages even though nothing has changed
🕯️ More info (optional)
Other entries might come up in the feed that do not apply to the Fleet environment.
Demo video
https://www.loom.com/share/8b75cbd8e7394c12ac6b56746b72c244
Timebox 2 points to look at the code and delete logs if easy.
The fix should be:
If the configuration profiles are not changed, there should be no log that it is changed.
The estimation is not clear as this might be difficult as we would need to compare current profiles. Or, as @getvictor was saying, it might end up being simplier but can’t tell unless we dig into the code.
There is a bigger story to improve gitops activity logging: https://github.com/fleetdm/fleet/issues/16678
This is a known issue. The code comment reads:
// TODO(roberto): should we generate activities only of any profiles were
// changed? this is the existing behavior for macOS profiles so I'm
// leaving it as-is for now.
@georgekarrv this looks like an MDM thingy. Can you pull it into your board?
Unneeded noise quelled, Fleet's activity log pruned, Clarity prevails.