Add RefactorLog STS endpoints: get/add/delete handlers and contracts#2737
Draft
ssreerama wants to merge 2 commits into
Draft
Add RefactorLog STS endpoints: get/add/delete handlers and contracts#2737ssreerama wants to merge 2 commits into
ssreerama wants to merge 2 commits into
Conversation
- Add GetRefactorLogItems, AddRefactorLogItem, DeleteRefactorLogItem contract files - Register handlers in SqlProjectsService for sqlProjects/getRefactorLogItems, sqlProjects/addRefactorLogItem, sqlProjects/deleteRefactorLogItem - Add TestRefactorLogItemOperations integration test - Bump Microsoft.SqlServer.DacFx.Projects to 0.6.15-local to pick up RefactorLogCollection
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new SQL Tools Service (STS) SqlProjects endpoints to list, add, and delete RefactorLog items for a SQL project, aligning RefactorLog item management with existing script/none-item operations in the service.
Changes:
- Registered three new request handlers: get/add/delete RefactorLog items.
- Implemented corresponding handlers in
SqlProjectsServiceusing the project’sRefactorLogItemscollection. - Added an integration test covering add → get → delete flow for RefactorLog items.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/Microsoft.SqlTools.ServiceLayer.IntegrationTests/SqlProjects/SqlProjectsServiceTests.cs | Adds integration test validating add/get/delete RefactorLog item behavior. |
| src/Microsoft.SqlTools.ServiceLayer/SqlProjects/SqlProjectsService.cs | Registers and implements RefactorLog item handlers using RefactorLogItems. |
| src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/RefactorLog/GetRefactorLogItems.cs | Adds request contract for listing RefactorLog items. |
| src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/RefactorLog/AddRefactorLogItem.cs | Adds request contract for adding a RefactorLog item. |
| src/Microsoft.SqlTools.ServiceLayer/SqlProjects/Contracts/RefactorLog/DeleteRefactorLogItem.cs | Adds request contract for deleting a RefactorLog item. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds SQL Tools Service endpoints for reading, adding, and deleting
<RefactorLog>entries in SQL projects. These endpoints expose theRefactorLogCollectionfrom the SqlProjects library (see dependent PR in SqlProjects repo).New endpoints
sqlProjects/getRefactorLogItemsSqlProjectParams → GetScriptsResultsqlProjects/addRefactorLogItemSqlProjectScriptParams → ResultStatussqlProjects/deleteRefactorLogItemSqlProjectScriptParams → ResultStatusChanges
New contract files
Contracts/RefactorLog/GetRefactorLogItems.csContracts/RefactorLog/AddRefactorLogItem.csContracts/RefactorLog/DeleteRefactorLogItem.csModified
SqlProjectsService.cs— handler registrations and implementations in a#region RefactorLog item functionsblockTests
SqlProjectsServiceTests.cs—TestRefactorLogItemOperationsintegration test: add → get (verify 1 result) → delete (verify count 0)Note
Packages.propsis intentionally left at0.6.14-preview. It will be updated in a follow-up commit once the SqlProjects NuGet package is published withRefactorLogCollection.