Skip to content

Standardize and improve KVMHostInfo class logging - #14226

Open
erikbocks wants to merge 4 commits into
apache:mainfrom
scclouds:standardize-kvmhostinfo-class-logs
Open

erikbocks wants to merge 4 commits into
apache:mainfrom
scclouds:standardize-kvmhostinfo-class-logs

Conversation

@erikbocks

Copy link
Copy Markdown
Collaborator

Description

The KVMHostInfo class used formatted strings for its logs and displayed an ERROR level log for a normal operation. This PR standardizes the class logging to use parametrized logging, and also fixes some typos in variable names

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

The code was built with Maven.

Copilot AI lite review requested due to automatic review settings September 22, 2026 19:04
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.37037% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.77%. Comparing base (2f34b0c) to head (b3655a0).

Files with missing lines Patch % Lines
...org/apache/cloudstack/utils/linux/KVMHostInfo.java 70.37% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14226      +/-   ##
============================================
- Coverage     20.77%   20.77%   -0.01%     
  Complexity    20847    20847              
============================================
  Files          6053     6053              
  Lines        548222   548230       +8     
  Branches      73236    73236              
============================================
- Hits         113896   113887       -9     
- Misses       420984   421002      +18     
+ Partials      13342    13341       -1     
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.20% <70.37%> (-0.01%) ⬇️

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.

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

This PR standardizes KVMHostInfo logging to use parameterized logging (instead of String.format) and fixes a couple of typos/inconsistent names.

Changes:

  • Replace formatted-string logs with parameterized logs across CPU/memory discovery paths
  • Fix typos/inconsistent naming (cpabilities → capabilities, cpusockets → cpuSockets)
  • Add helper methods to centralize CPU-speed command logging and failure logging
File Description
plugins/​hypervisors/​kvm/​src/​main/​java/​org/​apache/​cloudstack/​utils/​linux/​KVMHostInfo.java Refactors logging to parameterized form, fixes naming/typos, and adds helper logging methods for CPU-speed retrieval

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Copilot AI review requested due to automatic review settings September 23, 2026 11:33

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 3 Medium severity

Open (3)
Resolved since last review (1)

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants