-
Notifications
You must be signed in to change notification settings - Fork 23
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
Avoid running more than one migration concurrently #1454
base: main
Are you sure you want to change the base?
Conversation
Reference: https://issues.redhat.com/browse/MTV-1901 Avoid running a migration (start/restart) if a migraiton is already running by disabling/hiding buttons and avoiding adding the migration CR. This will cover cases in which rendering takes few seconds when you use the start/restart action item and then the start/restart button at once. Signed-off-by: Sharon Gratch <sgratch@redhat.com>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1454 +/- ##
==========================================
- Coverage 36.81% 36.32% -0.50%
==========================================
Files 158 156 -2
Lines 2548 2522 -26
Branches 599 592 -7
==========================================
- Hits 938 916 -22
- Misses 1428 1604 +176
+ Partials 182 2 -180 ☔ View full report in Codecov by Sentry. |
const buttonStartLabel = canReStart ? t('Restart migration') : t('Start migration'); | ||
|
||
const [isStartItemEnabled, setIStartItemEnabled] = useState(canStart); |
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.
setIsStartItemEnabled
<DropdownItem | ||
value={1} | ||
key="start" | ||
isDisabled={!canStart || !isStartItemEnabled} |
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.
why also !canStart? u check it on the effect
Reference: https://issues.redhat.com/browse/MTV-1901
📝 Description
Avoid running a migration (start/restart) if a migration is already running by disabling/hiding relevant buttons (in page header, actions menu and plan details status page).
Also avoid adding the migration CR to cover cases in which rendering takes few seconds when you use the start/restart action item and then the start/restart button at once.
🎥 Demo
Before
Screencast.from.2025-02-05.12-10-40.webm
After
Screencast.from.2025-02-05.12-06-55.webm