-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat(graph): enhance migration state management and introduce migration stopping functionality. #31626
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit 6ac7d83.
☁️ Nx Cloud last updated this comment at |
…on stopping functionality. - Refactor guards to improve migration state checks and add conditions for running and completing migrations. - Update the state machine to handle new states for running, stopped, and evaluating migrations. - Implement logic to track running migrations and allow for stopping them gracefully. - Introduce a new process for running migrations in a separate child process to support cancellation. - Enhance metadata management to include stopped migrations and update UI accordingly. - Add tests to cover new migration states and behaviors, ensuring robust migration handling.
12278c6
to
f77e1a1
Compare
486b256
to
6ac7d83
Compare
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.
some small stuff but I'm okay if it goes in like this
); | ||
|
||
const currentMigrationFailed = useSelector(props.actor, (state) => | ||
currentMigrationHasFailed(state.context) | ||
const isCurrentMigrationStopped = useSelector( |
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.
nit but why does this one start with is...
when the others don't?
// Check if this migration is in the completed migrations | ||
const completedMigration = | ||
nxConsoleMetadata.completedMigrations?.[migration.id]; | ||
const isSkipped = useSelector( |
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.
again, maybe we can find a way to reuse these selectors somehow?
Overview
This PR enhances the Migrate UI by adding a "Stop" button that allows users to halt in-progress migrations at any point during execution.
It works in tandem with nrwl/nx-console#2567
Currently
When a migration is running and needs to be stopped for any reason:
Users must wait for the migration to complete before using the available "Undo" or "Skip" options.
Expected
Users should be able to stop a currently running migration at any time before it completes, providing immediate control over the migration process.
Key Features: