Skip to content

config cleanup - #13884

Draft
DaanHoogland wants to merge 52 commits into
mainfrom
ghi10752-configCleanup
Draft

DaanHoogland wants to merge 52 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

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.70%. Comparing base (c76c01e) to head (e107d8c).
⚠️ Report is 1 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (c76c01e) and HEAD (e107d8c). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c76c01e) HEAD (e107d8c)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #13884       +/-   ##
=============================================
- Coverage     20.45%    3.70%   -16.75%     
=============================================
  Files          6487      493     -5994     
  Lines        589329    42558   -546771     
  Branches      72246     8063    -64183     
=============================================
- Hits         120554     1578   -118976     
+ Misses       455642    40751   -414891     
+ Partials      13133      229    -12904     
Flag Coverage Δ
uitests 3.70% <ø> (ø)
unittests ?

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 25.51%
Branch coverage 19.83%

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

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.

Comment on lines 75 to 76
Comment on lines +39 to +43
"network.securitygroups.work.cleanup.interval", "120",
"Time interval (seconds) in which finished work is cleaned up from the work table", true);

ConfigKey<Integer> SecurityGroupWorkerThreads = new ConfigKey<>("Network", Integer.class,
"network.securitygroups.workers.pool.size", "50",
// Registered/owned by com.cloud.server.ManagementServer#PublishResourceStateEvent; declared here too so this
// module can read it without a reverse dependency on the server module.
private static final ConfigKey<Boolean> PublishResourceStateEvent = new ConfigKey<>("Advanced", Boolean.class, "publish.resource.state.events", "true",
"enable or disable publishing of alert events on the event bus", true);

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

14 open issues

Review effort: Lite

Comment on lines 51 to +52
@Mock
ConfigurationDao _configDao;
ConfigDepotImpl configDepot;
Comment on lines 73 to +76
@Before
public void setup() {
when(_configDao.getValue(batchSizeConfigurationKey)).thenReturn(batchSizeValue);
ConfigKey.init(configDepot);
when(configDepot.getConfigStringValue(batchSizeConfigurationKey, ConfigKey.Scope.Global, null)).thenReturn(batchSizeValue);
// Registered/owned by com.cloud.server.ManagementServer#PublishResourceStateEvent; declared here too so this
// module can read it without a reverse dependency on the server module.
private static final ConfigKey<Boolean> PublishResourceStateEvent = new ConfigKey<>("Advanced", Boolean.class, "publish.resource.state.events", "true",
"enable or disable publishing of alert events on the event bus", true);
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@nvazquez , as discussed I am busy splitting this PR with the help of AI. I will close this one as soon as I am satisfied the cascade of PRs, that I'll be creating cover everything. I will keep this open and mark as draft for testing purposes.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
23.9% 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

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19670

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

This PR has been split into smaller PRs:

Foundation (merge first)

Parallel (based on the foundation; can be reviewed and merged in any order)

Stacked (merge in this order, starting after the foundation)

Last: removing the dead Config enum entries will be opened once all of the above are merged.

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

Status: Ready

Development

Successfully merging this pull request may close these issues.

phase out enum Config

5 participants