Closed mhunsber closed 2 years ago
Reason for dropping trailing .0 from 4 part versions: https://github.com/PowerShell/PowerShellGallery/issues/217
Looking into Install-AWSToolsModule
for this issue.
I don't think the title and description express the magnitude of the issue -- I'd advocate for pulling 4.1.31 from PSGallery until the issue can be resolved.
I have this bit of code that makes sure the AWS tools I rely on are installed. This code runs both at the start of sessions on my local dev machine, also as part of a docker container build.
#!/usr/bin/env pwsh
$ErrorActionPreference='Stop'
$AWSToolModules = @{
'AutoScaling' = 'Get-ASAutoScalingGroup'
'CertificateManager' = 'Get-ACMCertificate'
'CloudWatch' = 'Get-CWMetricStatistic'
'Common' = 'Get-DefaultAWSRegion'
'DynamoDBv2' = 'Get-DDBTable'
'EC2' = 'Get-EC2Instance'
'ECS' = 'Get-ECSCluster'
'ElasticLoadBalancingV2' = 'Get-ELBV2LoadBalancer'
'Elasticsearch' = 'Get-ESDomain'
'IdentityManagement' = 'Get-IAMRole'
'Route53' = 'Get-R53ResourceRecordSet'
'RDS' = 'Get-RDSDBInstance'
'SecurityToken' = 'Use-STSRoleWithSAML'
'StorageGateway' = 'Get-SGGateway'
}
function Install-AWSTools {
foreach($Key in $AWSToolModules.Keys) {
$Command = Get-Command -Name $AWSToolModules[$Key] -ErrorAction SilentlyContinue
if(-not $Command) {
Install-AWSToolsModule -Force -Cleanup "AWS.Tools.$($Key)"
}
}
}
Install-Package -Force 'AWS.Tools.Installer' | Out-Null
Install-AWSTools
To my surprise, after this code is executed, there are no tools modules installed. i.e. the only module left behind is AWS.Tools.Installer
!
As a workaround, I've added -MaximumVersion '4.1.30'
We are treating this as a highly important issue and are working on the fix now. Rolling back the 300+ modules of 4.1.31 would take significant time away from getting the fix out for AWS.Tools.Installer.
great -- thanks for the update @normj ! best of luck with the fix forward solution 🙏
Version 1.0.2.3
of the AWS.Tools.Installer
has been released that fixes the issue. Thank you for reporting the issue and sorry for the inconvenience. The PS Gallery's sudden refusal to accept packages that have a 0
in the 4th position in the version through us off in yesterday's build.
Thank you for the quick fix!
I removed my earlier workaround and verified that everything installs correctly:
docker run pwsh-toolbox:local pwsh -c 'Get-Module -ListAvailable' | grep 'AWS'
Binary 4.1.32 AWS.Tools.AutoScaling Core,Desk
Binary 4.1.32 AWS.Tools.CertificateManager Core,Desk
Binary 4.1.32 AWS.Tools.CloudWatch Core,Desk
Binary 4.1.32 AWS.Tools.Common Core,Desk
Binary 4.1.32 AWS.Tools.DynamoDBv2 Core,Desk
Binary 4.1.32 AWS.Tools.EC2 Core,Desk
Binary 4.1.32 AWS.Tools.ECR Core,Desk
Binary 4.1.32 AWS.Tools.ECS Core,Desk
Binary 4.1.32 AWS.Tools.ElasticLoadBalancingV2 Core,Desk
Binary 4.1.32 AWS.Tools.Elasticsearch Core,Desk
Binary 4.1.32 AWS.Tools.IdentityManagement Core,Desk
Script 1.0.2.3 AWS.Tools.Installer Core,Desk
Binary 4.1.32 AWS.Tools.RDS Core,Desk
Binary 4.1.32 AWS.Tools.Route53 Core,Desk
Binary 4.1.32 AWS.Tools.SecurityToken Core,Desk
Binary 4.1.32 AWS.Tools.StorageGateway Core,Desk
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Description
The most recent release doesn't have all 4 version parts, so if you run
Install-AWSToolsModule -Name 'somename' -Cleanup
, the installer will uninstall 4.1.31 because the uninstall command converts 4.1.31 to a "CleanVersion" of 4.1.31.0, but the module version is "4.1.31.(-1)".Reproduction Steps
Logs
Environment
Resolution
This is a :bug: bug-report