Skip to content

config cleanup - #13884

Open
DaanHoogland wants to merge 49 commits into
mainfrom
ghi10752-configCleanup
Open

config cleanup#13884
DaanHoogland wants to merge 49 commits into
mainfrom
ghi10752-configCleanup

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Description

This PR tries to get rid of the Config enum or the old mechanism to define configuration items, which is long overdue. The change should be transparent, but is huge so good regression testing is required. And merg early in the release cycle is recommended.
Commits are being done in batches for review convenience. They could have been done in separate PRs but in the end the changes are rather trivial.

Fixes: #10752

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

This comment was marked as duplicate.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.53005% with 428 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.79%. Comparing base (44ab7dd) to head (7cfb751).

Files with missing lines Patch % Lines
...java/com/cloud/server/ConfigurationServerImpl.java 0.00% 46 Missing ⚠️
.../cloud/resourcelimit/ResourceLimitManagerImpl.java 0.00% 31 Missing ⚠️
...oud/network/lb/ElasticLoadBalancerManagerImpl.java 5.55% 17 Missing ⚠️
.../cloud/configuration/ConfigurationManagerImpl.java 42.30% 13 Missing and 2 partials ⚠️
...ork/router/VirtualNetworkApplianceManagerImpl.java 0.00% 13 Missing ⚠️
...isor/xenserver/discoverer/XcpServerDiscoverer.java 0.00% 11 Missing ⚠️
...ava/com/cloud/network/NetworkUsageManagerImpl.java 0.00% 10 Missing ⚠️
...rc/main/java/com/cloud/usage/UsageServiceImpl.java 0.00% 10 Missing ⚠️
...oud/network/ExternalFirewallDeviceManagerImpl.java 0.00% 9 Missing ⚠️
...ain/java/com/cloud/network/NetworkServiceImpl.java 0.00% 9 Missing ⚠️
... and 100 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13884      +/-   ##
============================================
+ Coverage     19.77%   19.79%   +0.01%     
- Complexity    19989    20021      +32     
============================================
  Files          6371     6387      +16     
  Lines        575899   575880      -19     
  Branches      70495    70473      -22     
============================================
+ Hits         113912   114011      +99     
+ Misses       449563   449435     -128     
- Partials      12424    12434      +10     
Flag Coverage Δ
uitests 3.53% <ø> (ø)
unittests 21.07% <41.53%> (+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.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.69%
Branch coverage 18.92%

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 comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 15:49

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 16:07

This comment was marked as duplicate.

Copilot AI review requested due to automatic review settings August 15, 2026 19:40
Daan Hoogland and others added 18 commits September 3, 2026 19:03
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 3, 2026 17:04
@DaanHoogland
DaanHoogland force-pushed the ghi10752-configCleanup branch from 7bb0ce6 to 9cd59a8 Compare September 3, 2026 17:04

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.

🟡 Changes recommended

Several newly introduced ConfigKey defaults are inconsistent with existing schema/migration defaults (e.g., router/ELB RAM sizing), risking unintended behavior changes.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 166/166 changed files
  • Comments generated: 4
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 3, 2026 18:02

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.

🔵 Needs a closer look

The refactor touches a very large surface area of configuration resolution across core services and many plugins, so it warrants careful human validation and broader regression testing beyond what can be safely inferred here.

Review details

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

server/src/test/java/com/cloud/api/response/ApiResponseSerializerTest.java:43

  • This test mutates the shared ConfigKey default via reflection but does not restore it afterwards, which can leak state into other tests depending on execution order.
    server/src/test/java/com/cloud/resource/DiscovererBaseTest.java:78
  • This test changes several global ConfigKey defaults via reflection but never resets them, which can make unrelated tests flaky due to shared static state.
  • Files reviewed: 166/166 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@apache apache deleted a comment from blueorangutan Sep 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
26.3% Coverage on New Code (required ≥ 40%)
C Reliability 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

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

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

Projects

Status: conflict/waiting

Development

Successfully merging this pull request may close these issues.

phase out enum Config

4 participants