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

[BUG]: SqlAzureDacpacDeployment: does not server name when it contains a dot (Azure SQL Managed Instance) #19871

Open
4 of 7 tasks
RKSelvi opened this issue May 15, 2024 · 0 comments

Comments

@RKSelvi
Copy link

RKSelvi commented May 15, 2024

New issue checklist

Task name

SqlAzureDacpacDeployment@1

Task version

No response

Issue Description

This DevOps task SqlAzureDacpacDeployment@1 is not taking into consideration for the Azure SQL Managed Instance where the host name contains a alpha numeric in its name. For e.g. host name is
azure-smi-name.1134rt4445556.database.usgovcloudapi.net

Because of this when the server name is parsed, it is only taking azure-smi-name as the SQL server name whereas it is actually azure-smi-name.1134rt4445556

Getting this error as it has split with the first dot in the provided server name.
##[debug]System.Management.Automation.RuntimeException: System.Management.Automation.RuntimeException: No resource found with serverName azure-smi-name, serverType Microsoft.Sql/servers in subscription . Specify the correct serverName/serverType and try again.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

No response

Operation system

Windows Server 2019

Relevant log output

##[debug]System.Management.Automation.RuntimeException: System.Management.Automation.RuntimeException: No resource found with serverName azure-smi-name, serverType Microsoft.Sql/servers in subscription . Specify the correct serverName/serverType and try again.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-
##[error]System.Management.Automation.RuntimeException: No resource found with serverName azure-smi-name, serverType Microsoft.Sql/servers in subscription . Specify the correct serverName/serverType and try again.Check out how to troubleshoot failures at https://aka.ms/sqlazuredeployreadme#troubleshooting-

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

- task: SqlAzureDacpacDeployment@1
      inputs:
        azureSubscription: 'DEV'
        AuthenticationType: 'servicePrincipal'
        ServerName: 'azure-smi-name.1134rt4445556.database.usgovcloudapi.net'
        DatabaseName: 'DB'
        deployType: 'DacpacTask'
        DeploymentAction: 'Publish'
        DacpacFile: 'DB.dacpac'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants