Skip to content

feat(migrate): add stop migration functionality and update commands #2567

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

Merged
merged 3 commits into from
Jun 25, 2025

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jun 17, 2025

Overview

This PR works in tandem with nrwl/nx#31626 to enable the new Stop CTA inside of the Migrate UI.

Key Features

  • When we run a migration via the migrate UI it runs as a separate process.
  • Ensure that the webview is updated after changes have been made via run migration.
  • Add stop command to kill a currently running migration.

MISC

- When we run a migration via the migrate UI it runs as a separate process
- Ensure that the webview is updated after changes have been made via run migration
- Add stop command to kill a currently running migration
@ndcunningham ndcunningham self-assigned this Jun 17, 2025
@ndcunningham ndcunningham requested a review from MaxKless as a code owner June 17, 2025 20:37
Copy link

nx-cloud bot commented Jun 17, 2025

View your CI Pipeline Execution ↗ for commit 2f93a86.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e-ci,ty... ✅ Succeeded 9m 52s View ↗
nx-cloud record -- yarn nx sync:check ✅ Succeeded 3s View ↗
nx-cloud record -- ./gradlew :intellij:ktfmtCheck ✅ Succeeded 4s View ↗
nx-cloud record -- ./gradlew projectReportAll ✅ Succeeded 25s View ↗
nx affected --targets=build,test,e2e-ci --confi... ✅ Succeeded 16m 50s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-25 17:45:46 UTC

Copy link
Member

@jaysoo jaysoo left a comment

Choose a reason for hiding this comment

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

nx and the deep imports must be bundled into Console. Why did we remove it?

@ndcunningham ndcunningham requested a review from jaysoo June 18, 2025 16:18
ndcunningham added a commit to nrwl/nx that referenced this pull request Jun 25, 2025
…on stopping functionality. (#31626)

## 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:
- User accidentally triggered the migration
- Migration is taking longer than expected
- Changes are needed before completion

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:

- 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. (The UI is completely driven by the backend now aka Nx
Console)
- Add tests to cover new migration states and behaviours.
@ndcunningham ndcunningham merged commit 18de342 into master Jun 25, 2025
4 checks passed
@ndcunningham ndcunningham deleted the feat/migrate-ui-stop-action branch June 25, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants