aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
238 stars 79 forks source link

Get-AWSPowerShellVersion Not (Entirely) Working in AWS.Tools.Common #47

Closed tommymaynard closed 4 years ago

tommymaynard commented 5 years ago

Expected Behavior

Based on the AWSPowerShell and AWSPowerShell.NetCore modules, the Get-AWSPowerShellVersion Cmdlet in the AWS.Tools.Common module variant is only partially working. I do recognize this module is in prerelease, but the command has worked previously. The cmdlet is returning the version text:

"AWS Tools for PowerShell Version 3.3.563.1 Copyright 20...etc."

The ListServiceVersionInfo parameter, however, is failing. I strongly believe that AWS should leave it in its current state (not working [I’m serious -- hear me out]). Instead perhaps, throw a warning to indicate the parameter will be removed in future versions. There's more information as to why, included below. Please do read that.

Current Behavior

When the Get-AWSPowerShellVersion Cmdlet is used with the optional, ListServiceVersionInfo Switch parameter, the AWS Services, their "Noun Prefix," and their versions (dates) are not being returned, as they were/do in the AWSPowerShell and AWSPowerShell.NetCore modules.

Possible Solution

My recommended solution is here: Need Another AWS Change. I know, I know. I’m trying to be short and concise and I just pointed you at a blog post. It’s mostly images, however.

I'll quickly explain what my February 2019 post tried to do, so it's not required reading. Do keep in mind, however, that if we can get these changes implemented, I’ll happily write a new post at PowerShell.org to indicate the changes, and update the previously written post to point at the newest one.

Cmdlets and functions should only do one thing. Additionally, they should only return one type of object. I recommend removing the ListServiceVersionInfo parameter, except to throw a warning. The warning should indicate to use the Get-AWSService Cmdlet – the team will have to write that one. :) The new cmdlet should return the AWS Services, the Noun Prefix (please remove the space in this property name), and the API Version (please remove this space, as well). You’ll be fixing one command by mildly altering it (although it’s not working now) and adding a new one. Again, I would highly recommend you read my post from earlier this year.

Steps to Reproduce (for bugs)

Get-AWSPowerShellVersion -ListServiceVersionInfo

Context

Please see the above link and text in the Possible Solution section.

Your Environment

matteo-prosperi commented 4 years ago

Hello, thanks for your feedback. We plan to review and restore the full functionality of Get-AWSPowerShellVersion (and Get-AWSCmdletName) before AWS.Tools reaches General Availability.

matteo-prosperi commented 4 years ago

Hello, we have addressed this issue and it will be fixed in the next release.

matteo-prosperi commented 4 years ago

Hello, thanks for reporting this. The issue is addressed in version 4.0 of AWS.Tools.Common.