fleet icon indicating copy to clipboard operation
fleet copied to clipboard

`/api/v1/fleet/mdm/profiles/batch` should not generate activity when nothing changed

Open pacamaster opened this issue 1 year ago • 6 comments

Fleet version: Fleet 4.54.0 Web browser and operating system: current browser/OS


💥  Actual behavior

Audit log is always showing 3 profiles messages image

🧑‍💻  Steps to reproduce

  1. Apply empty configuration profiles via /api/v1/fleet/mdm/profiles/batch
  2. Apply empty configuration profiles via /api/v1/fleet/mdm/profiles/batch again
  3. 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

pacamaster avatar Jul 25 '24 17:07 pacamaster

Timebox 2 points to look at the code and delete logs if easy.

sharon-fdm avatar Aug 01 '24 17:08 sharon-fdm

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.

RachelElysia avatar Aug 01 '24 17:08 RachelElysia

There is a bigger story to improve gitops activity logging: https://github.com/fleetdm/fleet/issues/16678

getvictor avatar Aug 04 '24 05:08 getvictor

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.

getvictor avatar Aug 09 '24 10:08 getvictor

@georgekarrv this looks like an MDM thingy. Can you pull it into your board?

sharon-fdm avatar Aug 09 '24 17:08 sharon-fdm

Unneeded noise quelled, Fleet's activity log pruned, Clarity prevails.

fleet-release avatar Sep 24 '24 00:09 fleet-release