-
Notifications
You must be signed in to change notification settings - Fork 1.2k
server: prevent vm schedule update failure for time when not changed #11314
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
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 <[email protected]>
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. |
weizhouapache
left a comment
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.
code lgtm
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14892 |
vishesh92
left a comment
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.
clgtm
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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?