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 4 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

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.

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

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins matrix job (ol8 mgmt + kvm-ol8, ubuntu24 mgmt + kvm-ubuntu24, ol8 mgmt + vmware-70u3, ol9 mgmt + xcpng82) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17252)
Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 61896 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t17252-vmware-70u3.zip
Smoke tests completed. 157 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@weizhouapache

Copy link
Copy Markdown
Member

[SF] Trillian test result (tid-17252) Environment: vmware-70u3 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 61896 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t17252-vmware-70u3.zip Smoke tests completed. 157 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

wow, nice

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17251)
Environment: kvm-ubuntu24 (x2), zone: Advanced Networking with Mgmt server u24
Total time taken: 63344 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t17251-kvm-ubuntu24.zip
Smoke tests completed. 156 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_hostha_enable_ha_when_host_disabled Error 3.78 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 303.86 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17250)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 68517 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t17250-kvm-ol8.zip
Smoke tests completed. 156 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_redundant_vpc_site2site_vpn Failure 423.60 test_vpc_vpn.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17253)
Environment: xcpng82 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 117760 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13884-t17253-xcpng82.zip
Smoke tests completed. 79 look OK, 24 have errors, 54 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestIpv4Routing>:setup Error 0.00 test_ipv4_routing.py
test_01_create_iso_with_checksum_sha1 Error 66.52 test_iso.py
test_02_create_iso_with_checksum_sha256 Error 66.51 test_iso.py
test_03_create_iso_with_checksum_md5 Error 66.55 test_iso.py
test_04_create_iso_with_no_checksum Error 66.61 test_iso.py
test_01_create_iso Failure 1515.65 test_iso.py
ContextSuite context=TestISO>:setup Error 3030.50 test_iso.py
test_04_readiness_cache_invalidated_on_out_of_band_restart Error 152.34 test_instance_boot_group.py
test_01_invalid_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.01 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 0.01 test_kubernetes_clusters.py
test_12_test_deploy_cluster_different_offerings_per_node_type Failure 0.00 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 1802.38 test_kubernetes_supported_versions.py
ContextSuite context=TestListIdsParams>:setup Error 0.00 test_list_ids_parameter.py
ContextSuite context=TestListVolumes>:setup Error 0.00 test_list_volumes.py
ContextSuite context=TestLoadBalance>:setup Error 0.00 test_loadbalance.py
ContextSuite context=TestAdapterTypeForNic>:setup Error 0.00 test_nic_adapter_type.py
ContextSuite context=TestMetrics>:setup Error 0.00 test_metrics_api.py
test_nic_secondaryip_add_remove Error 1515.43 test_multipleips_per_nic.py
test_delete_account Error 1514.59 test_network.py
test_delete_network_while_vm_on_it Error 1.17 test_network.py
test_deploy_vm_l2network Error 1.17 test_network.py
test_l2network_restart Error 2.26 test_network.py
ContextSuite context=TestPortForwarding>:setup Error 3.44 test_network.py
ContextSuite context=TestPublicIP>:setup Error 5.20 test_network.py
test_reboot_router Failure 0.06 test_network.py
test_releaseIP Error 2.66 test_network.py
test_releaseIP_using_IP Error 2.74 test_network.py
ContextSuite context=TestRouterRules>:setup Error 2.81 test_network.py
test_01_deployVMInSharedNetwork Failure 3694.40 test_network.py
test_03_destroySharedNetwork Failure 1.09 test_network.py
ContextSuite context=TestSharedNetwork>:teardown Error 2.21 test_network.py
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 1516.96 test_network.py
ContextSuite context=TestNestedVirtualization>:setup Error 0.00 test_nested_virtualization.py
test_01_nic Error 1514.67 test_nic.py
ContextSuite context=TestNetworkACL>:setup Error 0.00 test_network_acl.py
ContextSuite context=TestIpv6Network>:setup Error 0.00 test_network_ipv6.py
ContextSuite context=TestNetworkPermissions>:setup Error 0.00 test_network_permissions.py
ContextSuite context=TestNonStrictAffinityGroups>:setup Error 0.00 test_nonstrict_affinity_group.py
ContextSuite context=TestIsolatedNetworksPasswdServer>:setup Error 0.00 test_password_server.py
test_03_deploy_and_destroy_VM_and_verify_network_resources_persist Error 0.09 test_persistent_network.py
ContextSuite context=TestPortForwardingRules>:setup Error 0.00 test_portforwardingrules.py
test_01_add_primary_storage_disabled_host Error 1516.07 test_primary_storage.py
test_01_primary_storage_iscsi Error 307.41 test_primary_storage.py
test_01_primary_storage_nfs Error 0.23 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.39 test_primary_storage.py
ContextSuite context=TestPrivateGwACL>:setup Error 0.00 test_privategw_acl.py
ContextSuite context=TestProjectSuspendActivate>:setup Error 1520.96 test_projects.py
all_test_purge_expunged_vms Skipped --- test_purge_expunged_vms.py
all_test_pvlan Skipped --- test_pvlan.py
all_test_quarantined_ips Skipped --- test_quarantined_ips.py
all_test_regions Skipped --- test_regions.py
all_test_register_userdata Skipped --- test_register_userdata.py
all_test_reset_configuration_settings Skipped --- test_reset_configuration_settings.py
all_test_reset_vm_on_reboot Skipped --- test_reset_vm_on_reboot.py
all_test_resource_accounting Skipped --- test_resource_accounting.py
all_test_resource_detail Skipped --- test_resource_detail.py
all_test_resource_names Skipped --- test_resource_names.py
all_test_restore_vm Skipped --- test_restore_vm.py
all_test_router_dhcphosts Skipped --- test_router_dhcphosts.py
all_test_router_dns Skipped --- test_router_dns.py
all_test_router_dnsservice Skipped --- test_router_dnsservice.py
all_test_routers_iptables_default_policy Skipped --- test_routers_iptables_default_policy.py
all_test_routers_network_ops Skipped --- test_routers_network_ops.py
all_test_routers Skipped --- test_routers.py
all_test_scale_vm Skipped --- test_scale_vm.py
all_test_secondary_storage Skipped --- test_secondary_storage.py
all_test_service_offerings Skipped --- test_service_offerings.py
all_test_set_sourcenat Skipped --- test_set_sourcenat.py
all_test_sharedfs_lifecycle Skipped --- test_sharedfs_lifecycle.py
all_test_snapshots Skipped --- test_snapshots.py
all_test_ssl_offloading Skipped --- test_ssl_offloading.py
all_test_ssvm Skipped --- test_ssvm.py
all_test_staticroles Skipped --- test_staticroles.py
all_test_storage_policy Skipped --- test_storage_policy.py
all_test_systemvm_userdata Skipped --- test_systemvm_userdata.py
all_test_templates Skipped --- test_templates.py
all_test_update_security_group Skipped --- test_update_security_group.py
all_test_usage_events Skipped --- test_usage_events.py
all_test_usage Skipped --- test_usage.py
all_test_vm_autoscaling Skipped --- test_vm_autoscaling.py
all_test_vm_deployment_planner Skipped --- test_vm_deployment_planner.py
all_test_vm_life_cycle Skipped --- test_vm_life_cycle.py
all_test_vm_lifecycle_unmanage_import Skipped --- test_vm_lifecycle_unmanage_import.py
all_test_vm_lifecycle_unmanage_kvm_import Skipped --- test_vm_lifecycle_unmanage_kvm_import.py
all_test_vm_lifecycle_with_snapshot_or_volume Skipped --- test_vm_lifecycle_with_snapshot_or_volume.py
all_test_vm_schedule Skipped --- test_vm_schedule.py
all_test_vm_snapshot_kvm Skipped --- test_vm_snapshot_kvm.py
all_test_vm_snapshots Skipped --- test_vm_snapshots.py
all_test_vm_strict_host_tags Skipped --- test_vm_strict_host_tags.py
all_test_vnf_templates Skipped --- test_vnf_templates.py
all_test_volumes Skipped --- test_volumes.py
all_test_vpc_conserve_mode Skipped --- test_vpc_conserve_mode.py
all_test_vpc_firewall_rules Skipped --- test_vpc_firewall_rules.py
all_test_vpc_ipv6 Skipped --- test_vpc_ipv6.py
all_test_vpc_redundant Skipped --- test_vpc_redundant.py
all_test_vpc_router_nics Skipped --- test_vpc_router_nics.py
all_test_vpc_vpn Skipped --- test_vpc_vpn.py
all_test_webhook_delivery Skipped --- test_webhook_delivery.py
all_test_webhook_lifecycle Skipped --- test_webhook_lifecycle.py
all_test_host_maintenance Skipped --- test_host_maintenance.py
all_test_hostha_kvm Skipped --- test_hostha_kvm.py

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

6 participants