server: prevent vm schedule update failure for time when not changed#11314
Conversation
Fixes apache#11175 Behaviour introduced in apache#7397 always validates start-end times during update even when they are not changed which leads to failure to enable/disable schedule if the start time has passed. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #11314 +/- ##
=========================================
Coverage 15.17% 15.17%
- Complexity 11362 11364 +2
=========================================
Files 5415 5415
Lines 476030 476037 +7
Branches 58115 58119 +4
=========================================
+ Hits 72246 72254 +8
+ Misses 395701 395696 -5
- Partials 8083 8087 +4
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:
|
|
@blueorangutan package |
|
@shwstppr 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 14428 |
|
@blueorangutan package |
|
@weizhouapache 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 14892 |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where VM schedule updates would fail due to time validation even when start/end times weren't changed. The fix prevents unnecessary validation when time parameters remain unchanged during schedule enable/disable operations.
Key Changes
- Added validation condition to only check start/end times when they are actually being modified
- Added import for ObjectUtils to support the new validation logic
- Reorganized imports for better structure
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
server/src/main/java/org/apache/cloudstack/vm/schedule/VMScheduleManagerImpl.java
Show resolved
Hide resolved
|
@blueorangutan package |
|
@vishesh92 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14897 |
vishesh92
left a comment
There was a problem hiding this comment.
lgtm. tested and works as expected.
|
thanks for the testing @vishesh92 Merging |
…pache#11314) Fixes apache#11175 Behaviour introduced in apache#7397 always validates start-end times during update even when they are not changed which leads to failure to enable/disable schedule if the start time has passed. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Description
Fixes #11175
Behaviour introduced in #7397 always validates start-end times during update even when they are not changed which leads to failure to enable/disable schedule if the start time has passed.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?