Skip to content

Common Code Version of Compute Management Library (Issue #5512) #5709

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

Merged
merged 16 commits into from
Mar 25, 2018

Conversation

vladimir-shcherbakov
Copy link
Contributor

@vladimir-shcherbakov vladimir-shcherbakov commented Mar 9, 2018

Description

Checklist

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Member

Choose a reason for hiding this comment

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

I think this should go in the profile tests project - if it does not, you will need to create a lot of test infrastructure to make this execute like the other tests.

{
protected CredentialManager() { }

private const string ServicePrincipalEnvVariableName = "AZURE_SERVICE_PRINCIPAL";
Copy link
Member

Choose a reason for hiding this comment

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

We already have a test infrastructure that does this -this will make it essentially impossible to run these tests on ci without setting up this environment variable everywhere. Let's dicuss thet best way to bring these tests inline.

}
}

public static CredentialManager FromServicePrincipalEnvVariable(string envVariableName = ServicePrincipalEnvVariableName)
Copy link
Member

Choose a reason for hiding this comment

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

We should likely remove this file.

{
public class ComputeManagementClientShould
{
private IComputeManagementClient Client {get;}
Copy link
Member

Choose a reason for hiding this comment

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

These all need to be check-in tests. Let's discuss what to do with this per the above.

@@ -40,6 +40,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Resources.Rest", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "..\Insights\Commands.Insights\Commands.Insights.csproj", "{DEA446A1-84E2-46CC-B780-EB4AFDE2460E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Compute", "..\..\Common\Commands.Common.Compute\Commands.Common.Compute.csproj", "{F6D508D1-BE2D-475D-AA0F-DFB5C615CC9D}"
Copy link
Member

Choose a reason for hiding this comment

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

You will also need to add this into each solution that builds profile (which is most ARM solutions, and the Azure solution, I believe).

@markcowl
Copy link
Member

markcowl
markcowl previously approved these changes Mar 20, 2018
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Copy link
Member

Choose a reason for hiding this comment

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

@vladimir-shcherbakov using Commands.Common.Authorization as an example, this PropertyGroup should look like the following:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE;SIGN</DefineConstants>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <CodeAnalysisLogFile>bin\Release\Management.Utilities.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <SignAssembly>true</SignAssembly>
    <AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
    <DelaySign>true</DelaySign>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

You will also need to copy the MSSharedLibKey.snk file over to this project and ensure that it gets referenced in this .csproj file.

Making these two changes will fix the build error that we are seeing during the sign job that is saying Commands.Common.Compute is not a strongly signed assembly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cormacpayne, done.

@@ -27,8 +27,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Authentication.Abstr
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ResourceManager.Authentication.Netcore", "src\ResourceManager\Common\Commands.Common.Authentication.ResourceManager\Common.ResourceManager.Authentication.Netcore.csproj", "{AF50ACE6-9A6A-4A18-8140-B6C5BDD0EFD6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Compute.Netcore", "src\ResourceManager\Compute\Commands.Compute\Commands.Compute.Netcore.csproj", "{7B61AB3B-9F62-4B96-BCED-13920B56CD3C}"
Copy link
Member

Choose a reason for hiding this comment

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

@vladimir-shcherbakov we don't want to delete this, right? This means that the Compute project won't get built

@@ -53,6 +51,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Strategies.Netcore",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Common.Tests", "src\Common\Commands.Common.Tests\Commands.Common.Tests.csproj", "{B0EF35E9-2D7A-4AAE-8A1A-728B6CC8524B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Common.Compute.Netcore", "src\Common\Commands.Common.Compute\Commands.Common.Compute.Netcore.csproj", "{5E5D1F8E-92C8-40EB-AABA-DFD12AFD6D0A}"
EndProject
Global
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cormacpayne
It's not deleted.

Copy link
Member

Choose a reason for hiding this comment

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

@vladimir-shcherbakov Commands.Common.Compute.Netcore is being added, but Commands.Compute.Netcore appears to be being removed

@cormacpayne
Copy link
Member

@vladimir-shcherbakov it looks like you need to add the Commands.Common.Compute project to the solution of the Compute Stack solution: https://github.com/Azure/azure-powershell/blob/preview/src/ResourceManager/Compute/Stack/Compute.sln

…ompute.sln;

Commands.Compute.Netcore added to Azure.PowerShell.Netcore.sln
@cormacpayne
Copy link
Member

@vladimir-shcherbakov also need to add the Commands.Common.Compute project to the stack solution for Network and Storage

…ck/Network.sln and src/ResourceManager/Storage/Stack/Storage.sln
@cormacpayne
Copy link
Member

@vladimir-shcherbakov okay, hopefully this will finally get signing to work:

src/ResourceManager/Storage/Storage.sln
src/ResourceManager/ServerManagement/ServerManagement.sln
src/Stack.sln
@vladimir-shcherbakov
Copy link
Contributor Author

@markcowl
Copy link
Member

@markcowl markcowl dismissed cormacpayne’s stale review March 25, 2018 03:02

All comments addressed

@markcowl markcowl merged commit 8278e93 into Azure:preview Mar 25, 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