**Related issue:** Resolves #49475 Makes a non-zero install-script exit code a terminal failure so an install that failed but whose post-install script exited 0 is no longer reported as installed, in both the Go status computation and the `host_software_installs` `status`/`execution_status` generated columns. # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## 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. Redefining the `status`/`execution_status` generated columns rebuilds the table, but `ON UPDATE CURRENT_TIMESTAMP` is not triggered by `ALTER TABLE`, so `updated_at` is preserved. - [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 * **Bug Fixes** * Installations that fail during the install script are now correctly reported as failed, even if the post-install script succeeds. * Install and execution status reporting is now consistent about which script exit code takes precedence. * Pending, successful, failed, canceled, and uninstall outcomes continue to be reported correctly. * **Tests** * Added regression/unit test coverage for install-status and execution-status precedence across mixed install/post-install exit code scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 lines
177 B
Plaintext
2 lines
177 B
Plaintext
- Fixed a bug where a failed software install was reported as successfully installed when the install script exited with an error but a post-install script exited successfully.
|