Skip to content

Netcore fixes. #5063

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 8 commits into from
Dec 15, 2017
Merged

Netcore fixes. #5063

merged 8 commits into from
Dec 15, 2017

Conversation

twitchax
Copy link
Contributor

@twitchax twitchax commented Dec 1, 2017

This change will cause the build to fail when a cmdlet name cannot be mapped to a documentation group.

In addition, there are some fixes to the Netcore build.


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@maddieclayton
Copy link
Contributor

@twitchax
Copy link
Contributor Author

twitchax commented Dec 3, 2017

@cormacpayne, can you take a look at this? A while back, I added a property to the build.proj to stop on errors, but the script was not actually throwing and error. This fixes that.

@twitchax twitchax force-pushed the preview branch 2 times, most recently from 4bcd3c5 to e35a62d Compare December 4, 2017 07:51
@twitchax twitchax changed the title Fail the build if a cmdlet does not have doc mapping. Doc mapping and Netcore fixes. Dec 4, 2017
@markcowl markcowl assigned maddieclayton and unassigned cormacpayne Dec 4, 2017
@maddieclayton
Copy link
Contributor

@twitchax ping me when you're ready for me to review it

@twitchax twitchax changed the title Doc mapping and Netcore fixes. Netcore fixes. Dec 5, 2017
@twitchax
Copy link
Contributor Author

twitchax commented Dec 5, 2017

@maddieclayton, probably good to go after build.

@twitchax
Copy link
Contributor Author

twitchax commented Dec 6, 2017

@maddieclayton, ok! I manually fixed for the psm1: no reason not to, in my opinion. The rest of the psd1 has stuff that depends on the build placing the files in the right places.

@@ -9,7 +9,7 @@
@{

# Script module or binary module file associated with this manifest.
# RootModule = ''
RootModule = '.\AzureRM.Websites.Netcore.psm1'
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 this is the way we want to do it - when I asked Mark he said this would make debugging more difficult. I'll try to figure out a better way to do this in the build.proj file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maddieclayton and @markcowl, what are the debug issues? Maybe it's Netcore, but I can debug just fine the way it is. What problems does this cause on desktop?

Also, this makes dynamic completers work without having to do a bunch of changes/fixes to UpdateModules and PublishModules.

Copy link
Contributor

Choose a reason for hiding this comment

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

@twitchax see my new PR - this should fix the issue (I also added you as a reviewer)

@markcowl markcowl changed the base branch from preview to release-5.1.0 December 6, 2017 02:28
build.proj Outdated
<Artifacts Include="@(GetAllFiles->'%(RootDir)%(Directory)'->Distinct())" />
</ItemGroup>

<RemoveDir Directories="%(Artifacts.Identity)" ContinueOnError="true" />

<!-- How did these even get here? -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave this comment in?

@@ -9,7 +9,7 @@
@{

# Script module or binary module file associated with this manifest.
# RootModule = ''
RootModule = '.\AzureRM.Compute.Netcore.psm1'
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm going to make this happen in the UpdateModule.ps1 script. I'll add you as a reviewer and if it looks good to you we can delete it from here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kept this for now based on discussion today.

@@ -182,4 +183,8 @@
<Folder Include="VhdManagement\Model\Persistance\" />
</ItemGroup>

<ItemGroup>
<Content Include="help\**\*" CopyToPublishDirectory="PreserveNewest" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Why CopyToPublishDirectory and not CopyToOutputDirectory? Just curious. Also, is there a reason you don't implement it exactly as it is done in the non-netcore csproj files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Genius! My bad.

@@ -9,7 +9,7 @@
@{

# Script module or binary module file associated with this manifest.
# RootModule = ''
RootModule = '.\AzureRM.Websites.Netcore.psm1'
Copy link
Contributor

Choose a reason for hiding this comment

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

@twitchax see my new PR - this should fix the issue (I also added you as a reviewer)

@@ -265,31 +265,34 @@ if ($Profile -eq "Stack")
}

$resourceManagerRootFolder = "$packageFolder\$buildConfig\ResourceManager\AzureResourceManager"
$publishToLocal = test-path $repositoryLocation
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you delete this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No action based on discussion today.

@twitchax twitchax requested a review from markcowl December 7, 2017 10:38
@twitchax twitchax assigned cormacpayne and unassigned twitchax Dec 7, 2017
@twitchax twitchax requested a review from hovsepm December 7, 2017 10:38
@maddieclayton maddieclayton changed the base branch from release-5.1.0 to preview December 9, 2017 01:32
@cormacpayne
Copy link
Member

@azuresdkci test this please

'netcoreapp2.0\Microsoft.WindowsAzure.Storage.dll',
'netcoreapp2.0\System.Spatial.dll'
RequiredAssemblies = '.\Microsoft.Azure.Management.Storage.dll',
'.\Microsoft.Data.Edm.dll',
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, "." paths were not working in Linux in one of the beta builds. Please make sure this will note break Linux modules.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was fixed, and it works perfectly fine in linux. :)

@twitchax
Copy link
Contributor Author

@cormacpayne, this should be ready. :)

@twitchax
Copy link
Contributor Author

@cormacpayne, ping. :)

@cormacpayne cormacpayne merged commit 56d3da4 into Azure:preview Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants