Skip to content

Update Batch preview module to support data plane API version 2019-08-01.10.0 and mgmt API version 2019-08-01 #10001

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 7 commits into from
Sep 20, 2019

Conversation

matthchr
Copy link
Member

Description

Update Batch preview module to support data plane API version 2019-08-01.10.0 and mgmt API version 2019-08-01

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

  - Target Microsoft.Azure.Batch 12.0.
  - Target Microsoft.Azure.Management.Batch 9.0.
  - Update tests.
@matthchr matthchr changed the base branch from master to Az.Batch-preview September 10, 2019 15:21
@matthchr
Copy link
Member Author

This does include breaking changes (on purpose).

The cmdlet review was done here: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/371

@markcowl markcowl self-assigned this Sep 11, 2019
@markcowl
Copy link
Member

@matthchr Looks like you need to update the online help version header in your new markdown files

@markcowl markcowl assigned matthchr and unassigned markcowl Sep 11, 2019
@matthchr matthchr force-pushed the feature/more-preview-stuff branch from 6ea177b to f150e79 Compare September 11, 2019 16:34
@matthchr
Copy link
Member Author

Thanks @markcowl - I've fixed that. I believe there may also be some breaking change detections I need to fix up, I will look

@matthchr matthchr force-pushed the feature/more-preview-stuff branch from f150e79 to 521e91a Compare September 11, 2019 21:04
@markcowl
Copy link
Member

markcowl commented Sep 12, 2019

Failures:

This one you will need to fix:

Get-AzBatchSupportedImages   uses the noun 'AzBatchSupportedImages', which does not follow the enforced   naming convention of using a singular noun for a cmdlet name.

This one you will need to suppress


The cmdlet   'Get-AzBatchNodeAgentSku' has been removed and no alias was found for the   original cmdlet name.
--


@@ -19,8 +19,8 @@

namespace Microsoft.Azure.Commands.Batch
{
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchNodeAgentSku"),OutputType(typeof(PSNodeAgentSku))]
public class GetBatchAccountNodeAgentSkuCommand : BatchObjectModelCmdletBase
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzurePrefix + "BatchSupportedImages"),OutputType(typeof(PSImageInformation))]
Copy link
Member

Choose a reason for hiding this comment

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

BatchSupportedImage

Copy link
Member Author

@matthchr matthchr Sep 12, 2019

Choose a reason for hiding this comment

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

Hey Mark, why should we change this commandlet to be singular? It always returns a collection with more than one item in it.

Copy link
Member

Choose a reason for hiding this comment

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

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 is best to follow this rule for all cmdlet names, even when a cmdlet is likely to act upon more than one item.

It is not likely to return more than one item, it is guaranteed to return more than one item. It is not possible to get a single item back from this API call, it's always a collection with multiple values.

https://docs.microsoft.com/en-us/powershell/developer/cmdlet/strongly-encouraged-development-guidelines#use-singular-parameter-names has an allowance for cases where the input is always multi-value

Plural parameter names should be used only in those cases where the value of the parameter is always a multiple-element value.

is there no equivalent for cmdlet names?

Copy link
Member

Choose a reason for hiding this comment

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

No, there is not. This PR will not be accepted without this change.

Copy link
Member Author

@matthchr matthchr Sep 16, 2019

Choose a reason for hiding this comment

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

I believe I've made the required change now, please check

"Microsoft.Azure.PowerShell.Cmdlets.Batch.dll","Microsoft.Azure.Commands.Batch.NewBatchResourceFileCommand","New-AzBatchResourceFile","1","8100","New-AzBatchResourceFile Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
"D:\a\1\s\artifacts\Debug\Az.Batch\Microsoft.Azure.PowerShell.Cmdlets.Batch.dll","Microsoft.Azure.Commands.Batch.GetBatchAccountSupportedImagesCommand","Get-AzBatchSupportedImages","1","8400","Get-AzBatchSupportedImages uses the noun 'AzBatchSupportedImages', which does not follow the enforced naming convention of using a singular noun for a cmdlet name.","Consider using a singular noun for the cmdlet name."
Copy link
Member

Choose a reason for hiding this comment

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

This is not allowed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed

@matthchr matthchr force-pushed the feature/more-preview-stuff branch from 8ec30c6 to 2878145 Compare September 16, 2019 18:26
@matthchr
Copy link
Member Author

It seems like the test-linux job is failing but it looks to be some internal build error to me...?

And the other 3 seem stuck?

  - Includes renaming Get-AzBatchSupportedImages
    to Get-AzBatchSupportedImage.
@matthchr matthchr force-pushed the feature/more-preview-stuff branch from 2878145 to f173f25 Compare September 17, 2019 15:07
@matthchr
Copy link
Member Author

@markcowl - Hey Mark, I think this should be good to merge now based on your comments, but for some reason some of the PR gates seem stuck?

@matthchr
Copy link
Member Author

Looks like the PR gates got sorted out

@matthchr
Copy link
Member Author

@markcowl - Can we merge this now?

@markcowl markcowl merged commit 07f9d34 into Azure:Az.Batch-preview Sep 20, 2019
@matthchr matthchr deleted the feature/more-preview-stuff branch September 20, 2019 15:25
@matthchr matthchr mentioned this pull request Oct 15, 2019
8 tasks
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.

3 participants