- Notifications
You must be signed in to change notification settings - Fork555
Add Restore Service RPC contracts and implementation for VS Code MSSQL#20625
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Co-authored-by: allancascante <755488+allancascante@users.noreply.github.com>
Co-authored-by: allancascante <755488+allancascante@users.noreply.github.com>
allancascante commentedNov 18, 2025
@copilot the work is to use the provided instruction to implement the changes for restore service, no to include instructions; the instructions provided must be used to implement the classes in the code |
github-actionsbot commentedNov 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
PR Changes
|
Updates to localized strings requiredPlease update the localized strings in the PR with following steps:
|
codecov-commenter commentedNov 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #20625 +/- ##======================================= Coverage 38.81% 38.82% ======================================= Files 213 213 Lines 87257 87257 Branches 19522 19522 =======================================+ Hits 33867 33875 +8+ Misses 53140 53132 -8 Partials 250 250 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CopilotAI commentedNov 18, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I understand you want me to implement the restore service code rather than just documentation. However, I cannot locate the RestoreService interface or contracts in the Azure Data Studio repository. Could you please provide:
Without access to the actual ADS restore service interface and contracts, I cannot accurately port the functionality.
I've now implemented the restore service code following the RPC porting pattern from DacFx service. The implementation includes:
Committed in3cec6bd. |
…tionCo-authored-by: allancascante <755488+allancascante@users.noreply.github.com>
Co-authored-by: allancascante <755488+allancascante@users.noreply.github.com>
allancascante commentedNov 18, 2025
@copilot the changes to mainController.ts and extesion.ts are not needed in this PR |
Co-authored-by: allancascante <755488+allancascante@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Description
Adds the Restore service RPC contracts and implementation by porting functionality from SQL Tools Service to VS Code MSSQL extension. This provides the foundation for database restore operations including restore execution, restore planning, and configuration retrieval following the established DacFx service pattern.
Note: This PR adds the service contracts and implementation only. Integration into the extension API (mainController and extension.ts) will be handled in a separate PR.
Implementation Details
IRestoreServiceinterface and supporting types tovscode-mssql.d.ts:RestoreResponse,RestorePlanResponse,RestoreDatabaseFileInfoRestorePlanDetailInfo,RestoreConfigInfoResponseRestoreParams,RestoreConfigInfoRequestParamsrestoreContracts.tswith 4 RPC request definitions matching SQL Tools Service endpoints:restore/restore- Execute database restorerestore/restoreplan- Create restore planrestore/cancelrestoreplan- Cancel restore planrestore/restoreconfiginfo- Get restore configuration infoRestoreServiceclass insrc/services/restoreService.tswith full implementation of all 4 service methodsReference Implementation
Follows the DacFx service pattern:
Code Changes Checklist
npm run test)Reviewers:Please read our reviewer guidelines
Original prompt
Agent Instructions: Porting RPC Methods from Azure Data Studio to VS Code MSSQL
Overview
This guide enables an AI agent to port RPC-based functionality from Azure Data Studio (ADS) to the VS Code MSSQL extension following established patterns.
Prerequisites
Input Required
The agent needs:
src/sql/workbench/services/profiler/)Step-by-Step Porting Process
Phase 1: Discovery and Analysis in Azure Data Studio Repo
Step 1.1: Locate the Service Interface
Search Pattern:
I{FunctionalityName}ServiceinterfaceTypical Location:
src/sql/workbench/services/{functionality}/common/{functionality}Service.tsAgent Actions:
IProfilerService)Example Interface to Extract:
Step 1.2: Locate Request/Response Contracts
Search Pattern: Request and Response type definitions
Typical Location:
src/sql/workbench/services/{functionality}/common/{functionality}Contracts.tsor similarAgent Actions:
*Requestand*Responsetypes*Paramstypes*NotificationParams)Example Contracts to Extract:
Step 1.3: Locate RPC Request Definitions
Search Pattern:
RequestTypeandNotificationTypedefinitionsTypical Location: Same file as contracts or in a separate
*Contracts.tsfileAgent Actions:
RequestType<TParams, TResult>definitionsNotificationType<TParams>definitionsExample RPC Definitions to Extract:
Step 1.4: Locate Supporting Types
Agent Actions:
ProfilerSessionTemplate,ProfilerEvent)ProfilingSessionType)Phase 2: Generate VS Code MSSQL Extension Files
Step 2.1: Generate
vscode-mssql.d.tsTypesFile Location:
mssql/typings/vscode-mssql.d.tsAgent Instructions:
vscode-mssql.d.tsfiledeclare module "vscode-mssql"sectionIDacFxService)Template for Service Interface:
Template for Types:
Important Notes:
import * as azdata)💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.