mirror of
https://github.com/fleetdm/fleet
synced 2026-05-18 14:38:53 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #33922 # Details This PR addresses issues discovered with our on-the-fly calculations of host `last_restarted_at` date, where it would drift slightly between refreshes. Some users are relying on this value not changing between restarts, so this PR moves to a strategy where we persist the date and, when host details are refreshed, compare the new calculated date to the persisted one and ignore changes < 30 seconds. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [X] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) ## Testing - [X] Added/updated automated tests - [X] QA'd all new/changed functionality manually ## Database migrations - [X] Checked schema for all modified table for columns that will auto-update timestamps during migration. - [X] Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects. - [X] Ensured the correct collation is explicitly set for character columns (`COLLATE utf8mb4_unicode_ci`). |
||
|---|---|---|
| .. | ||
| gen_queries_doc.go | ||
| queries.go | ||
| queries_test.go | ||
| utils.go | ||