Skip to content
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

Skip starting a separate task for backup and restore operations #25285

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

corivera
Copy link
Member

@corivera corivera commented Feb 1, 2024

When performing backup & restore operations from the new admin dialogs, two tasks were being started in the tasks pane. This is because STS starts its own task in the background when doing the restore operation, in addition to the one that always gets started when clicking OK in an admin dialog. This change skips starting a background task on OK if the dialog is a backup or restore one. I refactored the submit logic for the dialogs so that they start a background task in the Dialog onClosed callback, rather than registering a background task up front in initialize that then gets started after closing. Subclass dialogs then extend the handleDialogClosed callback method registered for onClosed to add more functionality.

Fixes #25105

@coveralls
Copy link

coveralls commented Feb 1, 2024

Pull Request Test Coverage Report for Build 7749594168

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.001%) to 41.758%

Files with Coverage Reduction New Missed Lines %
src/sql/workbench/services/connection/browser/connectionDialogWidget.ts 1 73.44%
Totals Coverage Status
Change from base Build 7674923107: -0.001%
Covered Lines: 30827
Relevant Lines: 69082

💛 - Coveralls

@corivera corivera merged commit 4269fe0 into main Feb 2, 2024
14 checks passed
@corivera corivera deleted the corivera/backupRestoreTasks branch February 2, 2024 19:06
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.

Backup and Restore operations displays two messages on tasks panel
3 participants