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?

@codecov
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.46%. Comparing base (f417c6b) to head (25603ee).
⚠️ Report is 44 commits behind head on main.

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.46%   17.46%           
  Complexity    15516    15516           
=========================================
  Files          5913     5913           
  Lines        529385   529385           
  Branches      64679    64679           
=========================================
+ Hits          92448    92450    +2     
+ Misses       426518   426517    -1     
+ Partials      10419    10418    -1     
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.52% <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...

@github-actions
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>
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

@github-actions
Copy link

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

@jbampton jbampton marked this pull request as ready for review September 18, 2025 11:39
@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

@DaanHoogland
Copy link
Contributor

@daviftorres , you are right, but I think we should merge and create new PRs for any remaining issues. This has been suffering scope creep a lot so far and isn’t functionally crippled.
cc @JoaoJandre @harikrishna-patnala

@github-actions
Copy link

github-actions bot commented Oct 7, 2025

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

@DaanHoogland
Copy link
Contributor

@FelipeM525 @JoaoJandre please have another look

@DaanHoogland
Copy link
Contributor

I think we can go through with this now, further improvements can be done in separate PRs

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
CallContext.current().setEventDetails("Internal lb vm Id: " + getId());
CallContext.current().setEventDetails("Internal lb VM Id: " + 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("Internal lb VM Id: " + getId());
CallContext.current().setEventDetails("Internal lb VM ID: " + getId());

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

@Override
public void execute() {
CallContext.current().setEventDetails("SystemVm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("SystemVM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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("SystemVM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("SystemVM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

UserVm result;

CallContext.current().setEventDetails("Vm Id: " + getEntityUuid());
CallContext.current().setEventDetails("VM Id: " + getEntityUuid());
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: " + getEntityUuid());
CallContext.current().setEventDetails("VM ID: " + getEntityUuid());

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));
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: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + getVirtualMachineId() + " ISO ID: " + getId());
CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " ISO ID: " + 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: " + getVirtualMachineId() + " ISO ID: " + getId());
CallContext.current().setEventDetails("VM ID: " + getVirtualMachineId() + " ISO ID: " + getId());

@Override
public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, 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: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM ID: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

@jbampton
Copy link
Member Author

@JoaoJandre shall we keep building for another 1.5 years and keep fixing conflicts and adding more commits and doing more reviews with further nits ? We already have 500 open issues and 200 open PRs that are not merged.

Constantly adding more is scope creep. Big PRs are harder to review and test.

@JoaoJandre
Copy link
Contributor

@jbampton, the PR description states that: "This PR cleans up the code base and standardizes some terms for casing."

On line 106 of api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java, you changed "Vm Id" to "VM ID". However, on the rest of the changes, you changed "Vm Id" to "VM Id". This inconsistency was brough up over a year ago and still was not changed. I am not scope creeping the PR, I have only asked for a single change, one that keeps the PR consistent.

Furthermore, this PR could have been merged over a year ago, but you waited more than year to comment. The change I am asking is simple, and has been the same from the very start. You have no right to complain about the delay on the PR.

@github-actions
Copy link

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

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