Skip to content

Conversation

erikbocks
Copy link
Contributor

Description

Currently, the createCondition command belongs to a class named as CreateConditionCmd. This class has a very abstract name and does not define what is the purpose of the condition. Thus, this PR renames CreateConditionCmd class to CreateConditionForVmAutoScalingCmd, helping developers to understand the class purpose without having to access it.

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

Screenshots (if appropriate):

How Has This Been Tested?

I built the packages with the changes, applied them in my local environment and called the API createCondition via CloudMonkey and validated that everything works as intended. Unitary tests were also executed and they passed successfully.

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

@DaanHoogland
Copy link
Contributor

@erikbocks , sensible change but I would leave out the “Vm” bit from the new name. “CreateConditionForAutoScalingCmd” seems more appropriate as the VM is not scaled itself but the service is scaled by adding more (or less) VMs.What do you think? cc @weizhouapache @shwstppr .

Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 17.56%. Comparing base (b0c7719) to head (a8645f3).
⚠️ Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
...in/java/com/cloud/server/ManagementServerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11819      +/-   ##
============================================
+ Coverage     17.38%   17.56%   +0.17%     
- Complexity    15282    15498     +216     
============================================
  Files          5891     5898       +7     
  Lines        526356   527778    +1422     
  Branches      64270    64473     +203     
============================================
+ Hits          91526    92702    +1176     
- Misses       424488   424652     +164     
- Partials      10342    10424      +82     
Flag Coverage Δ
uitests 3.59% <ø> (-0.02%) ⬇️
unittests 18.62% <66.66%> (+0.19%) ⬆️

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.

@weizhouapache
Copy link
Member

@erikbocks , sensible change but I would leave out the “Vm” bit from the new name. “CreateConditionForAutoScalingCmd” seems more appropriate as the VM is not scaled itself but the service is scaled by adding more (or less) VMs.What do you think? cc @weizhouapache @shwstppr .

maybe use CreateAutoScaleCondition which consistent with other files:

createAutoScalePolicy
createAutoScaleVmProfile
createAutoScaleVmGroup

@shwstppr
Copy link
Contributor

@DaanHoogland I don't have a strong preference either way. I don't even mind class remain CreateCondition as personally I find it easier during troubleshooting to search the class with API name.
@weizhouapache suggestion also makes sense as it keeps naming concise.

@DaanHoogland
Copy link
Contributor

I like @weizhouapache ’s name best, CreateAutoScaleCondition. @erikbocks , what do you think? cc @shwstppr

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.

4 participants