-
Notifications
You must be signed in to change notification settings - Fork 929
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
Set target platform for database project from the server metadata #20558
Conversation
Pull Request Test Coverage Report for Build 3011414857
💛 - Coveralls |
extensions/sql-database-projects/src/controllers/projectController.ts
Outdated
Show resolved
Hide resolved
let targetPlatform; | ||
if (isCloud) { | ||
const engineEdition = serverInfo.engineEditionId; | ||
targetPlatform = engineEdition === azdataType.DatabaseEngineEdition.SqlDataWarehouse ? SqlTargetPlatform.sqlDW : (engineEdition === azdataType.DatabaseEngineEdition.SqlDatabase ? SqlTargetPlatform.sqlAzure : undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it isn't DW, can we just assume it's sqlAzure and skip the check if the engineEditoin is SqlDatabase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Projects support Sql Edge as well (
sqlEdge = 'Azure SQL Edge' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be ok to set the target platform to sqlAzure if it's cloud and not DW. @Benjin any concerns with this? I don't think there are that many people creating projects from edge dbs, and the new edge project template creates projects with the target platform 150.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it for now, waiting on Benjin for confirmation.
Created #20576 to track VS code version. |
This PR fixes #20363.
Currently, all the database projects created from the databases are assigned DSP (target platform) as "Sql Server 2019". instead of its current version. The changes in PR reads the server metadata to determine its version and maps & assigns it appropriately to the target platform for the database project.
Steps to repro:
-- The project should now be created with appropriate target platform.
This PR doesn't handle the VSCode version of Projects.