Skip to content

Additional changes for Zorin OS support#48779

Open
lucasmrod wants to merge 3 commits into
mainfrom
additional-changes-for-zorin-os-support
Open

Additional changes for Zorin OS support#48779
lucasmrod wants to merge 3 commits into
mainfrom
additional-changes-for-zorin-os-support

Conversation

@lucasmrod

@lucasmrod lucasmrod commented Jul 6, 2026

Copy link
Copy Markdown
Member

Follow up PR for community PR: #45712.

  • QA'd all new/changed functionality manually
Screenshot 2026-07-06 at 1 54 44 PM Screenshot 2026-07-06 at 1 54 01 PM

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added support for Zorin in OS settings views and status checks, treating it like other Linux-based platforms.
    • Expanded OS settings and disk-encryption status filtering to include Zorin alongside existing Linux variants.
  • Bug Fixes

    • Improved reliability of log delivery by ensuring buffered log payloads remain unchanged while being sent.
  • Tests

    • Updated host listing and OS/disk-encryption filter test expectations to cover a new Zorin host scenario.

Copilot AI review requested due to automatic review settings July 6, 2026 16:56
@lucasmrod lucasmrod requested review from a team as code owners July 6, 2026 16:56

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 359d2f32-259b-4434-a9ff-af354f611c8f

📥 Commits

Reviewing files that changed from the base of the PR and between 16e042c and 0497210.

📒 Files selected for processing (1)
  • server/datastore/mysql/hosts_test.go

Walkthrough

This 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.

Changes

Related 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:
Zorin joins the Linux row,
SQL checks now let it flow.
Splunk sends copies, safe and sound,
While test counts shift to match the ground.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required template sections like Related issue, Testing details, and the checklist is largely unfilled. Fill in the required template sections, add the related issue number, and complete the relevant checklist and testing items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change: additional Zorin OS support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch additional-changes-for-zorin-os-support

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 zorin in 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.

Comment on lines 1769 to 1771
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')"
Comment on lines 1904 to 1906
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
)`
Comment on lines 1766 to 1771
// 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

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.07%. Comparing base (158a3d0) to head (0497210).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...ngsModal/OSSettingsTable/OSSettingsTableConfig.tsx 0.00% 2 Missing ⚠️
server/logging/splunk.go 0.00% 0 Missing and 1 partial ⚠️
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     
Flag Coverage Δ
backend 69.71% <75.00%> (+0.03%) ⬆️
frontend 59.06% <0.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants