fleet/server/datastore
Scott Gress e23fa23a49
Fix software panic (#28674)
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.
2025-04-30 17:00:28 -05:00
..
cached_mysql Enable staticcheck Go linter. (#23487) 2024-11-05 11:16:24 -06:00
filesystem Added signed URLs (#25197) 2025-01-09 12:56:54 -06:00
mysql Fix software panic (#28674) 2025-04-30 17:00:28 -05:00
mysqlredis Update to Go 1.24.1 (#27506) 2025-03-31 11:14:09 -05:00
redis Update to Go 1.24.1 (#27506) 2025-03-31 11:14:09 -05:00
s3 Remove unused code (from Fleet's sandbox implementation) (#26645) 2025-02-27 17:37:56 -03:00