Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14226 +/- ##
============================================
- Coverage 19.91% 19.91% -0.01%
+ Complexity 20200 20198 -2
============================================
Files 6373 6373
Lines 577230 577238 +8
Branches 70696 70696
============================================
- Hits 114974 114949 -25
- Misses 449690 449725 +35
+ Partials 12566 12564 -2
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:
|
There was a problem hiding this comment.
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
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.
| LOGGER.debug("Unable to retrieve the CPU speed from command [{}]. Trying another way to retrieve the CPU speed.", command); | ||
| LOGGER.trace(e); |
|
|
||
| private static void logFailureToGetCpuSpeedAndException(String command, Exception e) { | ||
| LOGGER.debug("Unable to retrieve the CPU speed from command [{}]. Trying another way to retrieve the CPU speed.", command); | ||
| LOGGER.trace(e); |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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
Open (3)
Resolved since last review (1)
|
|
||
| private static void logFailureToGetCpuSpeedAndException(String command, Exception e) { | ||
| LOGGER.debug("Unable to retrieve the CPU speed from command [{}]. Trying another way to retrieve the CPU speed.", command); | ||
| LOGGER.trace(e); |


Description
The
KVMHostInfoclass used formatted strings for its logs and displayed anERRORlevel log for a normal operation. This PR standardizes the class logging to use parametrized logging, and also fixes some typos in variable namesTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
The code was built with Maven.