Test-AzPostgreSqlFlexibleServerConnect kill PowerShell host with version 2 of SimplySQL Module #25499
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
PostgreSQL - Flexible
Flexible server
Service Attention
This issue is responsible by Azure service team.
Description
If we run the cmdlet
Test-AzPostgreSqlFlexibleServerConnect -ResourceGroupName $serverResourceGroupName -Name $serverName -DatabaseName $databaseName -AdministratorUserName $aadAdministratorName -AdministratorLoginPassword $secureToken -ErrorAction Stop -QueryText $script
The PowerShell host quits when the new version of needed PowerShell Module SimplySQL is installed, with version prior to 2.x the cmdlet works fine.
The issue occurs within file
src/PostgreSql/PostgreSql.Autorest/custom/Test-AzPostgreSqlFlexibleServerConnect.ps1
line 149 and 152 when Open-PostGreConnection is called. The new version of Open-PostGreConnection needs a Credential Parameter instead of Username and Password (OpenPostGreConnection.vb), therefore you get a ParameterBindingException and then the cmdlet uses exit !!!! I highly recommend to rethrow the exception instead of closing the powershell session!
Issue script & Debug output
Can't paste because the powershell host quits ...
Environment data
Module versions
Error output
Can't paste because the powershell host quits ...
The text was updated successfully, but these errors were encountered: