-
Notifications
You must be signed in to change notification settings - Fork 342
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
Improve Update-Engines.ps1 to not download the same file again #2212
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree company="AOK-Bundesverband eGbR" |
@@ -241,22 +241,27 @@ foreach ($p in $Platforms) { | |||
$fullPkgUrl = $engineUrl + $manifest.ManifestFile.Package.version + "/" + $manifest.ManifestFile.Package.FullPackage.name | |||
$fullPkgPath = ($fullPkgDir + $manifest.ManifestFile.Package.FullPackage.name) | |||
|
|||
$wc.DownloadFile($fullPkgUrl, $fullPkgPath) | |||
if (((Test-Path $fullPkgPath) -ne $true) -or ((Get-Item $fullPkgPath).Length -ne $manifest.ManifestFile.Package.FullPackage.Size)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the $fullPkgPath
always going to be different for each version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: add some cleanup logic to the script...
Pending test team to confirm we can merge this one. |
Issue:
Download of a new signature file takes >15minutes so Exchange isn't able to download the files in our network. -> timeout
When Update-Engines.ps1 is run by a scheduled task every 15min it will re-download the current file and overwrite the existing. While the download is in progress the file cannot be used by Exchange and signature Update will fail.
Fix:
do not download the file again when it already exists and has the correct size
Resolved #2108