-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor of Allocator classes #9074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9074 +/- ##
============================================
+ Coverage 16.57% 16.61% +0.03%
- Complexity 13870 13915 +45
============================================
Files 5719 5720 +1
Lines 507200 507124 -76
Branches 61574 61522 -52
============================================
+ Hits 84093 84268 +175
+ Misses 413688 413446 -242
+ Partials 9419 9410 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
1ff8f4a
to
42d16d9
Compare
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
537c10f
to
952c273
Compare
server/src/main/java/com/cloud/agent/manager/allocator/impl/TestingAllocator.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I did some basic testing, changed the allocator to FirstFit and created some VMs, the VM allocation worked fine with and without tags. However, my tests were limited, further testing would be good.
dd1eb14
to
952c273
Compare
952c273
to
b7cc66f
Compare
@blueorangutan package |
@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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10801 |
@blueorangutan LLtest |
1e91276
to
d0e5efd
Compare
@blueorangutan package |
@BryanMLima 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12226 |
server/src/main/java/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/BaseAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/BaseAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/BaseAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/BaseAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/BaseAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/agent/manager/allocator/impl/BaseAllocator.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/RandomAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/RandomAllocatorTest.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/cloud/agent/manager/allocator/impl/RandomAllocatorTest.java
Outdated
Show resolved
Hide resolved
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
@blueorangutan package |
@winterhazel 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. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13650 |
@blueorangutan package |
@winterhazel 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. |
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13651 |
@blueorangutan package |
@winterhazel 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13653 |
Description
This PR refactors some
*Allocator
classes, improving modularity and code legibility. This PR also made some changes to logs across these classes.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
I tested the allocation process in my personal lab, using both the
RandomAllocator
andFirstFitAllocator
allocators. I tried some variation of tags and offerings, and everything looks good. Furthermore, I also added a lot of unit tests for the methods that I refactored.How did you try to break this feature and the system with this change?