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 #
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