Additional changes for Zorin OS support#48779
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
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 (1)
WalkthroughThis change adds Zorin as a Linux-like platform in frontend OS settings rendering and backend SQL filtering. The related MySQL tests add a Zorin host and update host-count expectations for OS settings and disk-encryption filters. Separately, the Splunk log writer now clones batch payload bytes before sending them to avoid buffer aliasing during HTTP request handling. ChangesRelated Issues: Not specified in provided context. Related PRs: Not specified in provided context. Suggested labels: frontend, backend, tests, bugfix Suggested reviewers: Not specified in provided context. Sequence Diagram(s)Not applicable. Poem: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Follow-up adjustments to support Zorin OS end-to-end by including it in OS settings/disk-encryption host filtering and host-details rendering, plus a small fix to Splunk log batching to avoid reusing an aliased buffer when flushing batches.
Changes:
- Include
zorinin MySQL host list OS settings and disk-encryption filter conditions. - Render OS settings table rows for
platform="zorin"using existing Linux row logic. - Clone Splunk batch payload before flushing to avoid reusing the same buffer backing array across resets.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| server/logging/splunk.go | Clones batch bytes before flushing so the buffer can be safely reused after Reset(). |
| server/datastore/mysql/hosts.go | Adds Zorin to OS settings/disk-encryption host list filtering logic. |
| frontend/pages/hosts/details/OSSettingsModal/OSSettingsTable/OSSettingsTableConfig.tsx | Treats Zorin like other Linux platforms when generating OS settings table rows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if diskEncryptionConfig.Enabled { | ||
| includeLinuxCond = `(h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%')` | ||
| includeLinuxCond = `(h.platform = 'ubuntu' OR h.platform = 'zorin' OR h.os_version LIKE 'Fedora%%')` | ||
| } |
| } | ||
|
|
||
| sqlFmt := " AND h.platform IN('windows', 'darwin', 'ubuntu', 'rhel')" | ||
| sqlFmt := " AND h.platform IN('windows', 'darwin', 'ubuntu', 'zorin', 'rhel')" |
| OR (h.platform = 'darwin' AND ne.id IS NOT NULL AND hmdm.enrolled = 1 AND %s) -- apple | ||
| OR ((h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%') AND %s) -- linux | ||
| OR ((h.platform = 'ubuntu' OR h.platform = 'zorin' OR h.os_version LIKE 'Fedora%%') AND %s) -- linux | ||
| )` |
| // Linux has only disk encryption to report as OS setting, so only include the | ||
| // supported linux platforms if disk encryption is enabled. | ||
| includeLinuxCond := "FALSE" | ||
| if diskEncryptionConfig.Enabled { | ||
| includeLinuxCond = `(h.platform = 'ubuntu' OR h.os_version LIKE 'Fedora%%')` | ||
| includeLinuxCond = `(h.platform = 'ubuntu' OR h.platform = 'zorin' OR h.os_version LIKE 'Fedora%%')` | ||
| } |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #48779 +/- ##
==========================================
+ Coverage 68.02% 68.07% +0.04%
==========================================
Files 3681 3684 +3
Lines 233960 234064 +104
Branches 12457 12315 -142
==========================================
+ Hits 159145 159328 +183
+ Misses 60496 60431 -65
+ Partials 14319 14305 -14
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:
|
Follow up PR for community PR: #45712.
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Tests