Skip to content

Code style cleanups split out of #12500 - #14556

Open
DaanHoogland wants to merge 1 commit into
removeOvmLeftoversfrom
deprecatedHypervisorCleanups
Open

DaanHoogland wants to merge 1 commit into
removeOvmLeftoversfrom
deprecatedHypervisorCleanups

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Depends on #14555

Description

Third PR of the stack: the code-style cleanups that were mixed into an earlier version of #12500, split out so they can be reviewed (or declined) on their own. Based on the Ovm/Ovm3 PR; review only the last commit.

Files: ApiResponseHelper, Upgrade410to420, AffinityGroupServiceImpl, SystemVmTemplateRegistration.

Mostly mechanical: diamond operators, logger placeholders, redundant try-with-resources semicolons, isEmpty(), multi-catch. Changes that go beyond that:

  • ApiResponseHelper: several capability/service response blocks are extracted into private static helpers. Two commented-out createUserVmResponse overloads are deleted.
  • Upgrade410to420: the string if/else chains become switch statements (same null behaviour as the .equals() calls they replace). The unused dropUploadTable() and the supportsRollingUpgrade() override are removed (the interface default also returns false). Repeated messages become constants.

Note: Upgrade410to420 is a historic upgrade path, so the changes there buy little and some reviewers may prefer to leave it alone.

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)

🤖 Generated with Claude Code

…oupServiceImpl, SystemVmTemplateRegistration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DaanHoogland
DaanHoogland added this pull request to stack #14557 November 2, 2026 12:55
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 4.95050% with 192 lines in your changes missing coverage. Please review.
✅ Project coverage is 20.85%. Comparing base (ae1fb44) to head (9fc6df3).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/api/ApiResponseHelper.java 2.12% 184 Missing ⚠️
...om/cloud/upgrade/SystemVmTemplateRegistration.java 20.00% 4 Missing ⚠️
.../cloudstack/affinity/AffinityGroupServiceImpl.java 55.55% 4 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             removeOvmLeftovers   #14556   +/-   ##
=====================================================
  Coverage                 20.85%   20.85%           
  Complexity                21906    21906           
=====================================================
  Files                      6470     6470           
  Lines                    589045   588988   -57     
  Branches                  72214    72205    -9     
=====================================================
  Hits                     122827   122827           
+ Misses                   452883   452826   -57     
  Partials                  13335    13335           
Flag Coverage Δ
uitests 3.88% <ø> (ø)
unittests 22.17% <4.95%> (+<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.

@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1.4% Coverage on New Code (required ≥ 40%)
C Maintainability Rating on New Code (required ≥ B)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 26.02%
Branch coverage 20.31%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant