Azs.TeamsIntegration.Update.psm1


$GLOBAL:UpdateInProgressTemplate = Get-Content "$PSScriptRoot\Templates\Azs-TeamsIntegration-Update-InProgress.json" -Raw
$GLOBAL:UpdateNotRunningTemplate = Get-Content "$PSScriptRoot\Templates\Azs-TeamsIntegration-Update-NotRunning.json" -Raw

function Get-UpdateSummary {
    <#
    .SYNOPSIS
        Build update PSObject.
    #>

    param ($UpdateStatus)

    # return null if there's no status
    if (-not $UpdateStatus) { return $null }

    # All Steps
    $steps = $updateStatus.SelectNodes("//Step") | Select-Object FullStepIndex, Name, Status, StartTimeUtc, EndTimeUtc

    #Steps Success
    $Success = $updateStatus.SelectNodes("//Step") | Where-Object { $_.Status -eq 'Success' } | Select-Object FullStepIndex, Name, Status, StartTimeUtc, EndTimeUtc

    #Steps in Progress
    $sbTinyTimeformat = { (Format-TimeSpan (([datetime]::Now) - [datetime]$_.StartTimeUtc)).replace(' hours ', 'h:').replace(' minutes', 'm') }
    $stepsSb = {
        if ($_.ExecutionContext.Roles.Role.Nodes.Node.Name){
            "{0} ({1})" -f $_.Name, $_.ExecutionContext.Roles.Role.Nodes.Node.Name
        }
        else { $_.Name}
    }
    $InProgress = $updateStatus.SelectNodes("//Step") | Where-Object Status -eq InProgress | Select-Object FullStepIndex, @{label='Name';Expression = $stepsSb }, Status, StartTimeUtc, EndTimeUtc, @{'label' = 'duration'; expression = $sbTinyTimeformat }

    #Steps in Error
    $InError = $updateStatus.SelectNodes("//Step") | Where-Object Status -eq Error | Select-Object FullStepIndex, Name, Status, StartTimeUtc, EndTimeUtc

    # Format Summary data
    $summary = New-Object -TypeName PSObject -Property @{
        Completed  = ($updateStatus.SelectNodes("//Step") | Where-Object Status -eq Success).count
        InProgress = ($updateStatus.SelectNodes("//Step") | Where-Object Status -eq InProgress).count
        Failed     = ($updateStatus.SelectNodes("//Step") | Where-Object Status -eq Error).count
    }

    # Scoped Repair
    $scopedRepairTask = $UpdateStatus.SelectNodes("//RemediationAction") | Select-Object @{N="ActionType";E={"{0}" -f $_.Task.ActionType}},  @{N="ActionStatus";E={"{0}" -f $_.ActionStatus}}
    if ($scopedRepairTask.ActionStatus -in 'InProgress','Error','Cancelled') {
        $ShowScopedRepair = $true
        Write-CustomLog ("[$Stamp] Showing scoped repair status {0}" -f $scopedRepairTask.ActionStatus)
    }
    else {
        $ShowScopedRepair = $false
        Write-CustomLog ("[$Stamp] Not showing scoped repair status {0}" -f $scopedRepairTask.ActionStatus)
    }

    # Format InProgress data
    # if inprogress steps might exceed message limit, trim it.
    if ($InProgress.count -gt 15) {
        $InProgress = $InProgress | Where-Object { $_.FullStepIndex.split('.').count -gt 2 } | Sort-Object [datetime]$_.StartTimeUtc | Select-Object -first 15 # teams message limit, removed top level jobs and trim to 15 oldest jobs.
    }

    $UpdateProgress = New-Object -TypeName PSObject -Property @{
        StepsInProgress = $InProgress
        steps           = $steps
        ShowScopedRepair = $ShowScopedRepair
        ScopedRepairStatus = $scopedRepairTask.ActionStatus
    }
    return (New-Object PSObject -Property @{summary = $summary; UpdateProgress = $UpdateProgress })
}

function Get-AzsUpdateWithRetries {
    <#
    .SYNOPSIS
        Attempt to get update status from ARM with retries
    #>

    [CmdletBinding()]
    param ($stamp, $retrySeconds)

    try {
        Write-CustomLog "[$Stamp] Connecting to Admin ARM"
        Connect-AzsArmEndpoint -Stamp $stamp
    }
    catch {
        Write-Warning -Message ("Connecting to Azure Stack failed. Ensure Connect-AzsArmEndpoint $Stamp works. Error: {0}" -f $_.Exception.message)
    }

    Clear-Variable retry, updatesFromURP -ErrorAction SilentlyContinue
    while ($retry -lt 3 -and !$updatesFromURP) {
        $retry++
        Write-CustomLog "[$Stamp] Getting Update from URP. Attempt $retry/3"
        try {
            $versionSb = {if ($null -eq $_.version -and $null -ne $_.OemVersion) {$_.OemVersion}else{$_.version}}
            $updatesFromURP = Get-AzsUpdate | `
                            Sort-Object @{Expression = { [System.Version]$_.Version } } -Descending | `
                            Select-object *,@{label='VersionNumber';expression=$versionSb }
            $updatesFromURP | Foreach-Object { Write-CustomLog ("[$Stamp] {0} {1} {2} {3}" -f $_.DisplayName, $_.State, $_.VersionNumber, $_.InstalledDate) }
            return $updatesFromURP
        }
        catch {
            Write-CustomLog ("[$Stamp] Failed getting Update from URP. This can be transient during updates. Error: {0}" -f $_.exception.message)
            Start-Sleep -seconds $retrySeconds
        }
    }
}

function Get-AzsUpdateRunWithRetries {
    <#
    .SYNOPSIS
        Attempt to get update status from ARM with retries
    #>

    param ($stamp, $retrySeconds, $updateName)

    try {
        Write-CustomLog "[$Stamp] Connecting to Admin ARM"
        Connect-AzsArmEndpoint -Stamp $stamp
    }
    catch {
        Write-Warning -Message ("Connecting to Azure Stack failed. Ensure Connect-AzsArmEndpoint $Stamp works. Error: {0}" -f $_.Exception.message)
    }

    Clear-Variable retry, updatesFromURP -ErrorAction SilentlyContinue
    while ($retry -lt 3 -and !$updateRun) {
        $retry++
        Write-CustomLog "[$Stamp] Getting Update from URP. Attempt $retry/3"
        try {
            # If there's an update we only need to return 1 update.
            $updateRun = Get-AzsUpdateRun -UpdateName $UpdateName | Sort-Object ProgressStartTimeUtc -Descending | Select-Object -First 1
            return $updateRun
        }
        catch {
            Write-CustomLog ("[$Stamp] Failed getting Update from URP. This can be transient during updates. Error: {0}" -f $_.exception.message)
            $retrySeconds = $retrySeconds * $retry
            Write-CustomLog ("[$Stamp] Retry in {0} seconds" -f $retrySeconds)
            Start-Sleep -seconds $retrySeconds
        }
    }
}

function Get-OperatorUpdate {
    <#
    .SYNOPSIS
        Build operator text
    #>

    param ($UpdateData)
    $operatorMessage = @()
    $operatorMessage += "<strong>{0}</strong>" -f $UpdateData.Banner
    if ($UpdateData.ShowScopedRepair) { $operatorMessage += "Scoped Repair: {0}" -f $UpdateData.Update.UpdateProgress.ScopedRepairStatus }
    if ($UpdateData.ShowDuration) { $operatorMessage += "Update Duration: {0}" -f $UpdateData.totalDuration }
    if ($UpdateData.ShowProgress) { $operatorMessage += "Steps Completed: {0}" -f $UpdateData.Update.Summary.Completed }
    if ($UpdateData.ShowProgress) { $operatorMessage += "Steps Failed: {0}" -f $UpdateData.Update.Summary.Failed }
    if ($UpdateData.ShowProgress) { $operatorMessage += "Steps InProgress: {0}" -f $UpdateData.Update.Summary.InProgress }
    if ($UpdateData.ShowProgress) { $operatorMessage += "Current steps:" }
    if ($UpdateData.ShowProgress) { "{0}" -f ($UpdateData.Update.UpdateProgress.StepsInProgress | Foreach-Object {$operatorMessage += "{0} ({1})" -f $_.Name, $_.Duration})}
    if ($UpdateData.showPrepProgress) { $operatorMessage += "Current steps:" }
    if ($updateData.showPrepProgress) { "{0}" -f ($UpdateData.Update.Prep | Foreach-Object {$operatorMessage += "{0} ({1})" -f $_.Name, $_.Status})}
    $operatorMessage += "{0} ({1}) \ {2} (Brevity: {3})" -f $UpdateData.ModuleName, $UpdateData.ModuleVersion, $UpdateData.CommandletName, $UpdateData.Brief
    return $operatorMessage
}
# SIG # Begin signature block
# MIIjnAYJKoZIhvcNAQcCoIIjjTCCI4kCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDCbW0FbtHYQMia
# 3BnwB9I/Ns3hAYNsLloKBOr8Xj9ZRqCCDYEwggX/MIID56ADAgECAhMzAAAB32vw
# LpKnSrTQAAAAAAHfMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjAxMjE1MjEzMTQ1WhcNMjExMjAyMjEzMTQ1WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2F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