Skip to content

Conversation

@shwstppr
Copy link
Contributor

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

  • 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

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?

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]>
@shwstppr shwstppr linked an issue Jul 29, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.17%. Comparing base (ca6d2dc) to head (8462c6d).
⚠️ Report is 24 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../cloudstack/vm/schedule/VMScheduleManagerImpl.java 50.00% 1 Missing and 3 partials ⚠️
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     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.90% <50.00%> (+<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.

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14428

@shwstppr shwstppr marked this pull request as ready for review August 5, 2025 10:54
@weizhouapache weizhouapache added this to the 4.20.2 milestone Sep 3, 2025
@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@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.

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 14892

@vishesh92 vishesh92 requested a review from Copilot September 8, 2025 11:22
Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

Copy link
Contributor

Copilot AI left a 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.

@vishesh92
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 14897

Copy link
Member

@vishesh92 vishesh92 left a 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.

@weizhouapache
Copy link
Member

thanks for the testing @vishesh92

Merging

@weizhouapache weizhouapache merged commit fe120b6 into apache:4.19 Sep 9, 2025
25 checks passed
@DaanHoogland DaanHoogland deleted the fix-vmscheduleenabledisable branch September 9, 2025 09:51
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 15, 2025
…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]>
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.

schedule action - enable/disable fails

4 participants