-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cancel in-progress snapshot imports (#33998)
1. bring back the snapshot import ui in the `/settings/snapshots` page, which is not linked from anywhere but still works if needed 2. add a cancel button for in-progress imports 3. manually tested that the cancellation works by doing a large import against local big-brain and canceling it from the dashboard before it finishes. 4. the cli showed the error immediately because it's listening to the import status. meanwhile the import continues in the background on the server, but when it gets to the end it throws an error because SnapshotImportModel makes sure you can't transition from Failed => Completed. 5. made sure the state is checked transactionally with finalizing the import, because otherwise the worker ends up committing the import and then throwing an error. 6. added test it's somewhat inefficient to continue the import in the background even after it has been cancelled. we could potentially make it more efficient with a subscription in the worker, but this solution works for now. GitOrigin-RevId: 75fa683872bce02cda6eeccfed66ff44cb38fc42
- Loading branch information
Showing
5 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
npm-packages/dashboard/src/pages/t/[team]/[project]/[deploymentName]/settings/snapshots.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters