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

[#2108] do not download the same file again #2212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christophvw
Copy link

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

@christophvw christophvw requested a review from a team as a code owner October 25, 2024 08:19
@christophvw
Copy link
Author

@microsoft-github-policy-service agree company="AOK-Bundesverband eGbR"

@lusassl-msft lusassl-msft added Enhancement New feature or request Security Ready for review Pull Request is ready to be reviewed Test Team Need to get the test involved and aware of this. labels Oct 25, 2024
@@ -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)) {
Copy link
Member

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

image

Copy link
Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready for review Pull Request is ready to be reviewed Security Test Team Need to get the test involved and aware of this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants