mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
For #28626 This PR updates the logic that decides when to update host software records. Previously, records were never updated if the incoming software item had no "last opened" time. This is now amended to still perform an update in that case IFF the current software item _also_ has no "last opened" time, _and_ the software item has been marked as having a name change. Otherwise, updates are only performed if the new item has been opened much more recently than the current one. I was unable to reproduce a real-world scenario that would have led to the panic, but by setting a software item to always be marked as having no "last opened" time in the code, I was able to force the condition on the main branch. On this branch, the code executes without error even with that hacked software item in place. My suspicion is that this could be caused by having multiple copies of a software item in different locations on a system (e.g. in Applications and Downloads), but I wasn't able to get the conditions quite right to prove it. |
||
|---|---|---|
| .. | ||
| cached_mysql | ||
| filesystem | ||
| mysql | ||
| mysqlredis | ||
| redis | ||
| s3 | ||