Add hash_sha256 field to host installer result and install software activity - #49085
Conversation
Include the SHA256 hash of the installer package in the GetSoftwareInstallResults output. The hash is read from the linked software installer and is null when the installer has been deleted.
Snapshot the SHA256 hash of the installer package into the installed_software activity when the install completes, so the hash survives later deletion of the installer. Covers Fleet-maintained apps and custom packages; in-house iOS/iPadOS apps are unaffected. Also add datastore coverage for the hash on the install results, which reads it live from the installer and reports null once the installer is deleted.
Relocate the check that the installed_software activity retains its hash_sha256 after the installer is deleted from TestPolicyAutomationsSoftwareInstallers into TestSoftwareInstallerUploadDownloadAndDelete, which already uploads, installs, and deletes a package without policy automation. This drops the policy-disable workaround and puts the check with the deletion flow it exercises.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/28108-multiple-custom-packages #49085 +/- ##
=======================================================================
+ Coverage 68.01% 68.09% +0.07%
=======================================================================
Files 3679 3680 +1
Lines 233804 234442 +638
Branches 12454 12454
=======================================================================
+ Hits 159033 159645 +612
+ Misses 60456 60442 -14
- Partials 14315 14355 +40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughSoftware install results now include the installer storage ID as nullable Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)server/service/integration_enterprise_test.goast-grep timed out on this file Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
307f9b3
into
feat/28108-multiple-custom-packages
**Related issue:** Resolves #28108 Adds support for uploading multiple custom packages (up to 10) for the same software title on a team — so IT admins can deploy different versions or architectures (for example, Arm vs. Intel builds or staged rollouts) to label-scoped hosts instead of splitting them across teams. The software title keeps a single first-added `software_package` for backwards compatibility, and first-added-wins resolves overlaps consistently across self-service, manual install, policy automation, and setup experience. Feature branch combining the sub-PRs: migration (#48596), packages[] API and add/edit/delete-package endpoints (#48607), install-time precedence and setup experience (#48708), GitOps (#48710), Library and Add/Edit/Delete modals (#48520), secondary UI — policy automation, setup experience, and install-details hash (#49079), and the host install-result `hash_sha256` field (#49085). # Checklist for submitter - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. ## 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`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Support up to 10 custom packages per software title, with package-scoped deploy/install settings and package-specific edit/delete. * Policy automation can pin “Install software” to a specific package. * GitOps generation now outputs repeatable multi-package YAML per title. * Software install details now display the package SHA-256 hash (when available) with a copy-to-clipboard action. * **Bug Fixes** * Improved deterministic “first-added” precedence for installs, listings, setup experience, and policy dispatch when multiple packages match. * Fixed installer targeting and per-package metadata persistence (including installer-specific activity details). * **Accessibility/UX** * Added optional `aria-label` support for dropdowns. * Info banners can now render a leading icon with configurable color. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Related issue: Resolves #
Checklist for submitter
Testing
Added/updated automated tests
Where appropriate, automated tests simulate multiple hosts and test for host isolation (updates to one hosts's records do not affect another)
QA'd all new/changed functionality manually
Summary by CodeRabbit
New Features
hash_sha256value.Bug Fixes