Skip to content

Adding cmdlets for managing MachineLearning CommitmentPlans ARM resources #2993

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 10 commits into from
Oct 21, 2016

Conversation

ericwill-msft
Copy link
Member

Comments


This checklist is used to make sure that common issues in a pull request are covered by the creator. You can find a more complete discussion of PowerShell cmdlet best practices here.

Below in Overall Changes, check off the boxes that apply to your PR. For the categories that you did not check off, you can remove them from this body. Within each of the categories that you did select, make sure that you can check off all of the boxes.

For information on cleaning up the commits in your pull request, click here.

Overall Changes

General

  • Title of the PR is clear and informative
  • There are a small number of commits that each have an informative message
  • [N/A] If it applies, references the bug/issue that the PR fixes
  • All files have the Microsoft copyright header
  • Cmdlets refer to management libraries through nuget references - no dlls are checked in
  • The PR does not introduce breaking changes (unless a major version change occurs in the assembly and module)

Tests

  • PR includes test coverage for the included changes
  • Tests must use xunit, and should either use Moq to mock management client calls, or use the scenario test framework
  • PowerShell scripts used in tests must not use hard-coded values for location
  • 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 existing resources
  • Tests should not use App.config files for settings
  • Tests should use the built-in PowerShell functions for generating random names when unique names are necessary - this will store names in the test recording
  • [N/A] Tests should use Start-Sleep to pause rather than Thread.Sleep

Cmdlet Signature

  • Cmdlet name uses an approved PowerShell verb - use the enums for VerbsCommon, VerbsCommunication, VerbsLifecycle, VerbsOther whenever possible
  • Cmdlet noun name uses the AzureRm prefix for management cmdlets, and the Azure prefix for data plane cmdlets
  • Cmdlet specifies the OutputType attribute if any output is produced; if the cmdlet produces no output, it should implement a PassThrough parameter
  • If the cmdlet makes changes or has side effects, it should implement ShouldProcess and have SupportShouldProcess = true specified in the cmdlet attribute. See a discussion about correct ShouldProcess implementation here
  • Cmdlets should derive from AzureRmCmdlet for management cmdlets, and AzureDataCmdlet for data cmdlets
  • [N/A] If multiple parameter sets are implemented, the cmdlet should specify a DefaultParameterSetName in its cmdlet attribute

@azurecla
Copy link

Hi @ericwill-msft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (ericwill). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@azuresdkci
Copy link

Can one of the admins verify this patch?


try
{
$resourceGroupName = Get-ResourceGroupName
Copy link
Member

Choose a reason for hiding this comment

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

@ericwill-msft it looks like there are some indentation issues with this file

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like we're mixing tabs and spaces. Normalizing to all spaces.


namespace Microsoft.Azure.Commands.MachineLearning
{
[Cmdlet(VerbsCommon.Move, CommitmentPlansCmdletBase.CommitmentAssociationCommandletSuffix)]
Copy link
Member

@cormacpayne cormacpayne Sep 22, 2016

Choose a reason for hiding this comment

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

@ericwill-msft does this cmdlet make changes or have side effects? Consider implementing ShouldProcess like you do in the cmdlets below

Copy link
Member Author

Choose a reason for hiding this comment

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

It does have side effects. Adding ShouldProcess.

protected override void RunCmdlet()
{
this.ConfirmAction(
this.Force.IsPresent,
Copy link
Member

Choose a reason for hiding this comment

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

@ericwill-msft can this cmdlet override an existing CommitmentPlan? If not, I do not believe that Force is necessary

Copy link
Member Author

Choose a reason for hiding this comment

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

This cmdlet does indeed have the ability to overwrite, if used in that way. Will leave Force in for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, assuming no change required here.

@cormacpayne
Copy link
Member

@azuresdkci add to whitelist

@markcowl
Copy link
Member

@ericwill-msft This PR is too late for the Ignite release. We will consider it for the next release in November

@shahabhijeet
Copy link
Contributor

@ericwill-msft can you please address the issues raised as well as CI build failures. No activity in last 6 days. We will close this PR if not address early next week.

@cormacpayne
Copy link
Member

@ericwill-msft Hey Eric, the build is failing because you are missing help for the cmdlets that you added

@markcowl
Copy link
Member

@ericwill-msft PR is failing due to missing help. We will have to close thsi week if you cannot correct.

@shahabhijeet
Copy link
Contributor

@ericwill-msft please open your PR after you fix the issue or submit a new PR.

@ericwill-msft ericwill-msft reopened this Oct 18, 2016
@azurecla
Copy link

Hi @ericwill-msft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (ericwill). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@cormacpayne
Copy link
Member

cormacpayne commented Oct 20, 2016

@ericwill-msft Hey Eric, only one comment: the app.config file, and the reference to it in the Commands.MachineLearning.Test.csproj file, should be removed.

LGTM once that is fixed

@cormacpayne cormacpayne merged commit 4c9e0a9 into Azure:dev Oct 21, 2016
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.

7 participants