-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Update Batch preview module to support data plane API version 2019-08-01.10.0 and mgmt API version 2019-08-01 #10001
Conversation
- This fixes Azure#9938.
- Target Microsoft.Azure.Batch 12.0. - Target Microsoft.Azure.Management.Batch 9.0. - Update tests.
This does include breaking changes (on purpose). The cmdlet review was done here: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/371 |
@matthchr Looks like you need to update the online help version header in your new markdown files |
6ea177b
to
f150e79
Compare
Thanks @markcowl - I've fixed that. I believe there may also be some breaking change detections I need to fix up, I will look |
f150e79
to
521e91a
Compare
Failures: This one you will need to fix:
This one you will need to suppress
|
@@ -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))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BatchSupportedImage
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because cmdlet names should be singular, even when they act on multiple items, see: https://docs.microsoft.com/en-us/powershell/developer/cmdlet/strongly-encouraged-development-guidelines#use-a-specific-noun-for-a-cmdlet-name-sd01
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
8ec30c6
to
2878145
Compare
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.
2878145
to
f173f25
Compare
@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? |
Looks like the PR gates got sorted out |
@markcowl - Can we merge this now? |
Description
Update Batch preview module to support data plane API version 2019-08-01.10.0 and mgmt API version 2019-08-01
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added