fleet/server/test
Konstantin Sykulev c6746e5967
Automatic retry of failed policy automations of scripts and software installs (#38018)
**Related issue:** Resolves #31916

# 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] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)
- [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`).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Script and software installer policy automations now automatically
retry up to three times on failure.
* Retry attempt counters automatically reset when policies transition
from failing to passing state.
* Enhanced attempt tracking for improved monitoring and troubleshooting
of policy automation executions.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-12 17:30:51 -06:00
..
httptest Moved common endpointer packages to platform dir. (#37780) 2026-01-06 14:23:07 -06:00
activities.go Automatic retry of failed policy automations of scripts and software installs (#38018) 2026-01-12 17:30:51 -06:00
comparisons.go software display names: DB changes (#35066) 2025-11-04 10:04:42 -05:00
context.go Implement API endpoint for MDM manual enrollment profile download (#9232) 2023-01-16 10:22:12 -05:00
enrollment.go Refactor EnrollOrbit/EnrollHost (#30872) 2025-07-15 17:22:02 -03:00
functions.go Updated SQL modes in tests to match production. (#31445) 2025-08-03 08:18:13 +02:00
mdm.go Feature branch for Android config profiles (#32976) 2025-09-22 11:29:57 -04:00
new_objects.go Android: add 'Android' builtin label, add new Android hosts to 'All hosts' and this label (#26585) 2025-02-25 14:44:48 -05:00
printing.go Bulk script execution backend (#28299) 2025-04-30 12:54:46 -04:00
testingt.go Format and clean code (#774) 2021-05-17 10:29:50 -07:00
users.go New gitops role (#10850) 2023-04-12 16:11:04 -03:00