Skip to content

Conversation

@ziwa-msft
Copy link
Contributor

Description

Add DnsZonePartner Parameter for New-AzureRmSqlManagedInstance cmdlet to support AutoDr for Managed Instance. Properties of the ManagedInstance model have also been updated to reflect new members DnsZone and DnsZonePartner

Checklist

@ziwa-msft
Copy link
Contributor Author

Link to .NetSDK: Azure/azure-sdk-for-net#4801

@ziwa-msft
Copy link
Contributor Author

I added the references to new ClientRuntime packages per advice from Maddie. I was seeing local failures due to package mismatch and reached out for help. She mentioned that there is a ClientRuntime upgrade ongoing and I should add these references for now to unblock testing.

<Reference Include="Microsoft.Azure.Management.Network, Version=19.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.19.5.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should need to change Commands.Network or Commands.Profile . Were these changes intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was auto-generated due to the new package version. reverting now.

$managedInstanceLogin = "dummylogin"
$managedInstancePassword = "Un53cuRE!"
$subnetId = "/subscriptions/ee5ea899-0791-418f-9270-77cd8273794b/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL"
$subnetId = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/mi-wcus-demo-rg/providers/Microsoft.Network/virtualNetworks/mi-wcus-vnet/subnets/mi-subnet-managed-instances"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since MI is in GA now, can you please change this test to be fully automated? This includes creating the virtual network. Check out SQL virtual network firewall rules for an example.

Copy link
Member

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft a few comments for you to take a look at

<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft please revert the change made in this file

<package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.13" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.15" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.14" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft please revert the change made in this file -- we have a separate PR open to update the version of ClientRuntime used throughout PowerShell

<Reference Include="Microsoft.Azure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft please remove these references to ClientRuntime added in this file

<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.14" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft same comment about removing the references to ClientRuntime in this file

<Reference Include="Microsoft.Data.Services.Client, Version=5.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Data.Services.Client.5.8.2\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft same comment about removing the references to ClientRuntime in this file

<package id="Microsoft.Data.Edm" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.Data.OData" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.Data.Services.Client" version="5.8.2" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.14" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft same comment about removing the references to ClientRuntime in this file

<Name>Commands.Profile</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft please revert the changes in this file -- you don't need to add a reference to ClientRuntime and I was under the impression since this was a generation of the old Sql SDK that you don't need a reference to the new Sql management SDK.

<packages>
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Sql" version="1.20.1-preview" targetFramework="net452" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft same comment about reverting the changes made in this file

@ziwa-msft
Copy link
Contributor Author

@jaredmoo @cormacpayne Please review and let me know if there is any other feedback

@cormacpayne
Copy link
Member

PR to merge in the latest from preview: #7574

@cormacpayne
Copy link
Member

@ziwa-msft some build failures for you to look at:

Jenkins

The .json files associated with the tests found in ManagedInstanceCrudScenarioTests.cs are not being copied to the output directory in the .csproj file.

Travis

The version of the Microsoft.Azure.Management.Sql package was not updated in the Commands.Sql.Test.Netcore file.

@ziwa-msft
Copy link
Contributor Author

@cormacpayne Hi Cormac. Looks like the default build failed because of CredScan issue. Any suggestion on how to proceed?

@ziwa-msft
Copy link
Contributor Author

@cormacpayne Looks like all checks have passed finally ;D


## Version 4.11.5
* Fixed issue where some backup cmdlets would not recognize the current azure subscription
* Add DnsZonePartner Parameter for New-AzureRmSqlManagedInstance cmdlet to support AutoDr for Managed Instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ziwa-msft this should go under the ## Current Release header, but we can move it when we do the versioning for the next release of this preview module

@cormacpayne cormacpayne merged commit df17ae8 into Azure:AzureRM.Sql-preview Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants