Skip to content

Conversation

jbampton
Copy link
Member

Description

This PR cleans up the code base and standardizes some terms for casing.

Fixes in exception messages, log messages, code comments and more.

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

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?

Copy link

codecov bot commented May 28, 2024

Codecov Report

❌ Patch coverage is 6.25000% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.39%. Comparing base (0108ffd) to head (a4368eb).

Files with missing lines Patch % Lines
...stack/engine/orchestration/VolumeOrchestrator.java 0.00% 2 Missing ⚠️
...command/admin/internallb/StartInternalLBVMCmd.java 0.00% 1 Missing ⚠️
.../command/admin/internallb/StopInternalLBVMCmd.java 0.00% 1 Missing ⚠️
...api/command/admin/systemvm/DestroySystemVmCmd.java 0.00% 1 Missing ⚠️
.../api/command/admin/systemvm/RebootSystemVmCmd.java 0.00% 1 Missing ⚠️
...k/api/command/admin/systemvm/ScaleSystemVMCmd.java 0.00% 1 Missing ⚠️
...k/api/command/admin/systemvm/StartSystemVMCmd.java 0.00% 1 Missing ⚠️
...ck/api/command/admin/systemvm/StopSystemVmCmd.java 0.00% 1 Missing ⚠️
...api/command/admin/systemvm/UpgradeSystemVMCmd.java 0.00% 1 Missing ⚠️
.../cloudstack/api/command/admin/vm/ExpungeVMCmd.java 0.00% 1 Missing ⚠️
... and 19 more
Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9132   +/-   ##
=========================================
  Coverage     17.39%   17.39%           
- Complexity    15283    15285    +2     
=========================================
  Files          5889     5889           
  Lines        526183   526183           
  Branches      64242    64242           
=========================================
+ Hits          91541    91542    +1     
+ Misses       424298   424297    -1     
  Partials      10344    10344           
Flag Coverage Δ
uitests 3.62% <ø> (ø)
unittests 18.44% <6.25%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I immagine I missed a few, and in dutch (intended mistake) these would be considered shouting, but for consistency some sugestions...

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

jbampton and others added 7 commits July 10, 2024 21:05
…ployVMCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
…ployVMCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
…ache/cloudstack/network/contrail/management/ServiceManagerImpl.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
…/commands/StopNetScalerVMCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
@@ -134,7 +134,7 @@ private ServiceVirtualMachine createServiceVM(DataCenter zone, Account owner, Vi
} catch (InsufficientCapacityException ex) {
throw new CloudRuntimeException("Insufficient capacity", ex);
}
CallContext.current().setEventDetails("Vm Id: " + svm.getId());
CallContext.current().setEventDetails("VM ID: " + svm.getId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CallContext.current().setEventDetails("VM ID: " + svm.getId());
CallContext.current().setEventDetails("VM Id: " + svm.getId());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FelipeM525 , 'ID' is an acronym for 'identification' according to english rules it should be capatalised. Am I correct @jbampton ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland

I agree with capitalizing both letters, but, regardless of what convention we use (both capitalized or not), there should be a convention. Currently, this PR, that has a focus on fixing word casing inconsistencies, is doing the opposite, by changing some instances of Id to ID and leaving others as they are. Either all instances of the word in this PR should be ID or all should be Id.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, agree to disagree. I am happy to conform to conventions, but these are completely unnecessary and gratuit. I am leaving this with the embedded English speaker(s) ;)

@jbampton jbampton marked this pull request as draft October 14, 2024 12:46
@jbampton
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11340

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 11418

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

…rnallb/StartInternalLBVMCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan LLtest

@blueorangutan
Copy link

@DaanHoogland a [LL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@jbampton
Copy link
Member Author

@blueorangutan package

@blueorangutan
Copy link

@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@jbampton jbampton marked this pull request as ready for review September 18, 2025 11:39
@@ -8927,7 +8924,7 @@ public Pair<UserVmVO, Volume> doInTransaction(final TransactionStatus status) th
}
} catch (Exception e) {
logger.debug("Unable to start VM " + vm.getUuid(), e);
CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM with specified id" + e.getMessage());
CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM with specified ID" + e.getMessage());
Copy link
Contributor

@daviftorres daviftorres Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM with specified ID" + e.getMessage());
CloudRuntimeException ex = new CloudRuntimeException("Unable to start VM with specified ID." + e.getMessage());

How about that?

@@ -3838,7 +3838,7 @@ public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, Service
if (networkIdList == null || networkIdList.isEmpty()) {
Network networkWithSecurityGroup = _networkModel.getNetworkWithSGWithFreeIPs(owner, zone.getId());
if (networkWithSecurityGroup == null) {
throw new InvalidParameterValueException("No network with security enabled is found in zone id=" + zone.getUuid());
throw new InvalidParameterValueException("No network with security enabled is found in zone ID=" + zone.getUuid());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("No network with security enabled is found in zone ID=" + zone.getUuid());
throw new InvalidParameterValueException("No network with security enabled is found in zone ID = " + zone.getUuid());

How about that?

@@ -4713,7 +4713,7 @@ private void checkIfHostNameUniqueInNtwkDomain(String hostName, List<? extends N
List<String> hostNames = _vmInstanceDao.listDistinctHostNames(ntwkId);
// * verify that there are no duplicates
if (hostNames.contains(hostName)) {
throw new InvalidParameterValueException("The vm with hostName " + hostName + " already exists in the network domain: " + ntwkDomain.getKey() + "; network="
throw new InvalidParameterValueException("The VM with hostName " + hostName + " already exists in the network domain: " + ntwkDomain.getKey() + "; network="
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("The VM with hostName " + hostName + " already exists in the network domain: " + ntwkDomain.getKey() + "; network="
throw new InvalidParameterValueException("The VM with hostName " + hostName + " already exists in the network domain: " + ntwkDomain.getKey() + "; network = "

How about that?

@@ -5838,7 +5838,7 @@ private Pod getDestinationPod(Long podId, boolean isRootAdmin) {
}
destinationPod = _podDao.findById(podId);
if (destinationPod == null) {
throw new InvalidParameterValueException("Unable to find the pod to deploy the VM, pod id=" + podId);
throw new InvalidParameterValueException("Unable to find the pod to deploy the VM, pod ID=" + podId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("Unable to find the pod to deploy the VM, pod ID=" + podId);
throw new InvalidParameterValueException("Unable to find the pod to deploy the VM, pod ID = " + podId);

@@ -5853,7 +5853,7 @@ private Cluster getDestinationCluster(Long clusterId, boolean isRootAdmin) {
}
destinationCluster = _clusterDao.findById(clusterId);
if (destinationCluster == null) {
throw new InvalidParameterValueException("Unable to find the cluster to deploy the VM, cluster id=" + clusterId);
throw new InvalidParameterValueException("Unable to find the cluster to deploy the VM, cluster ID=" + clusterId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("Unable to find the cluster to deploy the VM, cluster ID=" + clusterId);
throw new InvalidParameterValueException("Unable to find the cluster to deploy the VM, cluster ID = " + clusterId);

@@ -5868,7 +5868,7 @@ private HostVO getDestinationHost(Long hostId, boolean isRootAdmin, boolean isEx
}
destinationHost = _hostDao.findById(hostId);
if (destinationHost == null) {
throw new InvalidParameterValueException("Unable to find the host to deploy the VM, host id=" + hostId);
throw new InvalidParameterValueException("Unable to find the host to deploy the VM, host ID=" + hostId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("Unable to find the host to deploy the VM, host ID=" + hostId);
throw new InvalidParameterValueException("Unable to find the host to deploy the VM, host ID = " + hostId);

@@ -6935,11 +6935,11 @@ private VMInstanceVO preVmStorageMigrationCheck(Long vmId) {

VMInstanceVO vm = _vmInstanceDao.findById(vmId);
if (vm == null) {
throw new InvalidParameterValueException("Unable to find the VM by id=" + vmId);
throw new InvalidParameterValueException("Unable to find the VM by ID=" + vmId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("Unable to find the VM by ID=" + vmId);
throw new InvalidParameterValueException("Unable to find the VM by ID = " + vmId);

@@ -7077,14 +7077,14 @@ public VirtualMachine migrateVirtualMachine(Long vmId, Host destinationHost) thr

VMInstanceVO vm = _vmInstanceDao.findById(vmId);
if (vm == null) {
throw new InvalidParameterValueException("Unable to find the VM by id=" + vmId);
throw new InvalidParameterValueException("Unable to find the VM by ID=" + vmId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new InvalidParameterValueException("Unable to find the VM by ID=" + vmId);
throw new InvalidParameterValueException("Unable to find the VM by ID = " + vmId);

@@ -2049,7 +2049,7 @@ private boolean upgradeRunningVirtualMachine(Long vmId, Long newServiceOfferingI

_accountMgr.checkAccess(caller, null, true, vmInstance);

//Check if its a scale "up"
//Check if it's a scale "up"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//Check if it's a scale "up"
// Check if it's a scale "up"

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.17 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 35.05 test_kubernetes_clusters.py

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

Successfully merging this pull request may close these issues.

8 participants