Skip to content
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

Issues with Az module 9.1.0 #20006

Closed
hckenmiller opened this issue Nov 2, 2022 · 7 comments
Closed

Issues with Az module 9.1.0 #20006

hckenmiller opened this issue Nov 2, 2022 · 7 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported DataProtection needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.

Comments

@hckenmiller
Copy link

Description

Issues with Az 9.1.0 running Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force -AllowClobber

Issue script & Debug output

Error message 
was At C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules\Az.DataProtection\1.0.0\custom\Cmdlets\Platform\Va
ult\Set-AzDataProtectionMSIPermission.ps1:156 char:19
+                   | Where-Object { ($_.Scope -eq $KeyVaultId -or $_.S ...
+                   ~
An empty pipe element is not allowed.
At C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules\Az.DataProtection\1.0.0\custom\Cmdlets\Platform\Vault\
Set-AzDataProtectionMSIPermission.ps1:180 char:15
+               | Where-Object { ($_.Scope -eq $DataSourceId -or $_.Sco ...
+               ~
An empty pipe element is not allowed.
At C:\Users\VssAdministrator\Documents\WindowsPowerShell\Modules\Az.DataProtection\1.0.0\custom\Cmdlets\Platform\Vault\
Set-AzDataProtectionMSIPermission.ps1:204 char:15
+               | Where-Object { ($_.Scope -eq $SnapshotResourceGroupId ...
+               ~
An empty pipe element is not allowed.
At D:\a\_temp\22cf96b1-bbff-4894-844e-d9336ba06ba4.ps1:4 char:1
+ . 'D:\a\1\s\deployment\scripts\Deploy-Databricks-Workspace.ps1' -clie ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Deploy-Databricks-Workspace.ps1

Environment data

Its running in a pipeline using Powershell@2 task version 2.210.0

Module versions

Its running in a pipeline using Powershell@2 task version 2.210.0

Error output

Its running in a pipeline using Powershell@2 task version 2.210.0
@hckenmiller hckenmiller added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 2, 2022
@ghost ghost added customer-reported and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 2, 2022
@dingmeng-xue
Copy link
Member

@hckenmiller , thanks for reporting. Could you share exact script you are using on PowerShell@2 task and parameters of that task?

@dingmeng-xue dingmeng-xue added needs-author-feedback More information is needed from author to address the issue. ADO Issue is documented on MSFT ADO for internal tracking labels Nov 3, 2022
@hckenmiller
Copy link
Author

hckenmiller commented Nov 4, 2022

It doesn't matter which powershell task, they all fail the same way. Here is one of the powershell tasks:

  • task: PowerShell@2
    displayName: Deploy Databricks Workspace
    inputs:
    #verbosePreference: 'default' # Optional. Options: default, stop, continue, silentlyContinue
    #verbosePreference: 'continue'
    filepath: "$(System.DefaultWorkingDirectory)/deployment/scripts/Deploy-Databricks-Workspace.ps1"
    arguments: "-clientTenantId ${{variables.TenantID}} -resourceGroupName ${{variables.ResourceGroupName}} -
    databricksWorkSpaceName ${{variables.Workspace}} -dosDataClientId $(dos-fhir-service-client) -dosDataClientSecret $(dos-
    fhir-service-client-secret) -secretNames ${{variables.SecretNames}} -client ${{parameters.ClientCode}} -location
    ${{variables.Region}} -managedResourceGroupName ${{variables.ManagedResourceGroupName}} -skuType
    ${{variables.SkuType}}"

The script that is getting called Deploy-Databricks-Workspace.ps1 starts out like this:

param(
[Parameter(Mandatory = $false)][string] $clientTenantId,
[Parameter(Mandatory = $false)][string] $resourceGroupName,
[Parameter(Mandatory = $false)][string] $databricksWorkSpaceName,
[Parameter(Mandatory = $false)][string] $dosDataClientId,
[Parameter(Mandatory = $false)][string] $dosDataClientSecret,
[Parameter(Mandatory = $false)][string[]] $secretNames,
[Parameter(Mandatory = $false)][string] $client,
[Parameter(Mandatory = $false)][string] $location,
[Parameter(Mandatory = $false)][string] $managedResourceGroupName,
[Parameter(Mandatory = $false)][string] $skuType = "standard"
)

Write-Verbose "Inside Deploy-Databricks-Workspace"

Write-Host "Installing the Databricks Workspace"

try {
Import-Module -Name $PSScriptRoot\FHIR-Utilities.psm1 -Force

The FHIR-Utilities.psm1 powershell module contains this:

param(
[Parameter(Mandatory=$false)][bool] $InstallModules = $true
)

function Import-Function{
param(
[string] $folderPath
)

$functionFiles = Get-ChildItem -Path $folderPath -Filter *.ps1 -Exclude *.Tests.ps1 -Recurse

Write-Verbose "Loading scripts in $folderPath"
foreach($file in $functionFiles){
    Write-Verbose "Sourcing $($file.FullName)"
    . $file.FullName
}

}

if($InstallModules)
{
try{
Get-InstalledModule -Name Az -ErrorAction Stop
}catch{
Write-Host "Installing Az Module from Powershell Gallery"
# Errors using the latest Az module 9.1 had to go back to a previous version
Install-Module -Name Az -RequiredVersion 8.3.0 -Scope CurrentUser -Repository PSGallery -Force -AllowClobber
}
Import-Module Az

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Nov 4, 2022
@dingmeng-xue
Copy link
Member

@hckenmiller , It seems Deploy-Databricks-Workspace.ps1 contains API call to Set-AzDataProtectionMSIPermission.ps1. If yes, please share snippet of your script.

@dingmeng-xue dingmeng-xue added needs-author-feedback More information is needed from author to address the issue. DataProtection and removed needs-team-attention This issue needs attention from Azure service team or SDK team ADO Issue is documented on MSFT ADO for internal tracking labels Nov 6, 2022
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Nov 13, 2022
@ghost
Copy link

ghost commented Nov 13, 2022

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@hckenmiller
Copy link
Author

hckenmiller commented Nov 17, 2022

I'm not calling it in my code. I don't know what it is for. There are other posts where others using the Az module are having the same issue. Here is one. #19997

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Nov 17, 2022
@dingmeng-xue
Copy link
Member

@hckenmiller , please check whether Az.DataProtection v1.0.1 has addressed your issue.

@dingmeng-xue dingmeng-xue added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Jan 12, 2023
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Jan 19, 2023
@ghost
Copy link

ghost commented Jan 19, 2023

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Feb 3, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported DataProtection needs-author-feedback More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue.
Projects
None yet
Development

No branches or pull requests

2 participants