Fix spurious "Select a resource group" step in Azure SQL connection wizard#5006
Draft
Fix spurious "Select a resource group" step in Azure SQL connection wizard#5006
Conversation
- Remove ResourceGroupListStep from SqlConnectionListStep.getSubWizard() - it was dead UX since SqlServerListStep lists servers subscription-wide and ignores the selected resource group - Move ResourceGroupListStep to SqlServerListStep.getSubWizard() so it only appears when creating a NEW SQL server (where it is actually needed by SqlServerCreateStep) - After selecting an existing SQL server in SqlServerListStep.prompt(), extract and assign the resource group name to context.resourceGroup from the server's resource ID (only if not already set) Agent-Logs-Url: https://github.com/microsoft/vscode-azurefunctions/sessions/fd595c8e-96ce-4e32-bcdd-17ba6418b11d Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix extra 'Select a resource group' step during Azure SQL connection
Fix spurious "Select a resource group" step in Azure SQL connection wizard
May 6, 2026
Member
|
@copilot Fix the build. You should get the location from the sql resource as well. |
…up context ResourceGroup type requires location property. Populate it from the selected server's location, which also satisfies the comment to get the location from the SQL resource. Agent-Logs-Url: https://github.com/microsoft/vscode-azurefunctions/sessions/b28bc730-2bf0-4c4b-b3a3-1e0ed5c98934 Co-authored-by: nturinski <5290572+nturinski@users.noreply.github.com>
Contributor
Author
MicroFish91
reviewed
May 8, 2026
|
|
||
| if (context.sqlServer && !context.resourceGroup) { | ||
| const rgName: string = getResourceGroupFromId(nonNullProp(context.sqlServer, 'id')); | ||
| context.resourceGroup = { name: rgName, location: nonNullProp(context.sqlServer, 'location') }; |
Contributor
There was a problem hiding this comment.
Might it be worth pulling the actual resource and setting it here? I think that would be safer in case we ever nonNull one of the other resource properties somewhere else in the step chain as many of the "optional" properties are usually provided by the service
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.
ResourceGroupListStepfromSqlConnectionListStep.getSubWizard()(it was dead UX since server listing is subscription-wide)ResourceGroupListSteptoSqlServerListStep.getSubWizard()- only add it when creating a NEW SQL server (!context.sqlServer)SqlServerListStep.prompt(), extract and assign both the resource group name and location tocontext.resourceGroupfrom the server's resource ID andlocationproperty (only if not already set)ResourceGrouptype requireslocation- now populated fromcontext.sqlServer.location