Skip to content

Commit

Permalink
issue #3525 (#3540)
Browse files Browse the repository at this point in the history
Bump version number
Fixes #3525
Dumps free disk space on container exceptions
Increase download timeout on insider or no CDN

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
  • Loading branch information
freddydk and freddydk authored May 16, 2024
1 parent db40110 commit b68af9f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions BC.HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function Get-ContainerHelperConfig {
"useWinRmSession" = "allow" # allow, always, never
"addTryCatchToScriptBlock" = $true
"killPsSessionProcess" = $false
"usePrereleaseAlTool" = $true
"useVolumes" = $false
"useVolumeForMyFolder" = $false
"use7zipIfAvailable" = $true
Expand Down
1 change: 1 addition & 0 deletions Common/Download-File.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function Download-File {
if ($bcContainerHelperConfig.DoNotUseCdnForArtifacts -or $sourceUrl -like 'https://bcinsider*.net/*') {
# Do not use CDN when configured or bcinsider
$sourceUrl = ReplaceCDN -sourceUrl $sourceUrl -useBlobUrl
$timeout += $timeout
}
try {
DownloadFileLow -sourceUrl (ReplaceCDN -sourceUrl $sourceUrl) -destinationFile $destinationFile -dontOverwrite:$dontOverwrite -timeout $timeout -headers $headers
Expand Down
2 changes: 2 additions & 0 deletions ContainerHandling/Invoke-ScriptInNavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function Invoke-ScriptInBcContainer {
$isOutOfMemory = Invoke-Command -Session $session -ScriptBlock { Param($containerName, $startTime)
$cimInstance = Get-CIMInstance Win32_OperatingSystem
Write-Host "`nContainer Free Physical Memory: $(($cimInstance.FreePhysicalMemory/1024/1024).ToString('F1',[CultureInfo]::InvariantCulture))Gb"
Get-PSDrive C | ForEach-Object { Write-Host "Disk C: Free $([Math]::Round($_.Free / 1GB))Gb from $([Math]::Round(($_.Free+$_.Used) / 1GB))Gb" }
$any = $false
Write-Host "`nServices in container $($containerName):"
Get-Service |
Expand Down Expand Up @@ -235,6 +236,7 @@ if ($exception) {
$isOutOfMemory = Invoke-Command -ScriptBlock { Param($containerName, $startTime)
$cimInstance = Get-CIMInstance Win32_OperatingSystem
Write-Host "Container Free Physical Memory: $(($cimInstance.FreePhysicalMemory/1024/1024).ToString('F1',[CultureInfo]::InvariantCulture))Gb"
Get-PSDrive C | ForEach-Object { Write-Host "Disk C: Free $([Math]::Round($_.Free / 1GB))Gb from $([Math]::Round(($_.Free+$_.Used) / 1GB))Gb" }
$any = $false
Write-Host "`nServices in container $($containerName):"
Get-Service |
Expand Down
5 changes: 3 additions & 2 deletions HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1228,9 +1228,10 @@ function DownloadLatestAlLanguageExtension {

function RunAlTool {
Param(
[string[]] $arguments
[string[]] $arguments,
[switch] $usePrereleaseAlTool = ($bccontainerHelperConfig.usePrereleaseAlTool)
)
$path = DownloadLatestAlLanguageExtension
$path = DownloadLatestAlLanguageExtension -allowPrerelease:$usePrereleaseAlTool
if ($isLinux) {
$alToolExe = Join-Path $path 'extension/bin/linux/altool'
Write-Host "Setting execute permissions on altool"
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
6.0.18
Use altool from prerelease AL Language extension
Display disk free inside container on error

6.0.17
Issue 3518 If WinRm is not running on the host, a container couldn't be created
Issue 3519 New-BcContainer fails due to password complexity on some computers
Expand Down
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.17-dev
6.0.18-dev

0 comments on commit b68af9f

Please sign in to comment.