Skip to content

Commit

Permalink
Address some timeout issues in the Windows CI
Browse files Browse the repository at this point in the history
This change disables Windows Defender real-time monitoring on the test
workers, and increases the test timeout to 20 minutes (default is 10).

The Windows Defender real time monitoring feature scans any newly
created files for malitious contents. This takes up a lot of CPU when
expanding image archives, which contain lots of files. The CI has been
timing out due to the fact that tests take longer than 10 minutes. This
change should address that issue.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
(cherry picked from commit c7bdcdf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
gabriel-samfira authored and thaJeztah committed Mar 7, 2023
1 parent 977ce8e commit 10357ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/windows-periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ jobs:
- name: RunIntegrationTests
run: |
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "sh.exe -c 'cd /c/containerd && (make integration | tee /c/Logs/integration.log)'"
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "sh.exe -s" << EOF
cd /c/containerd
export EXTRA_TESTFLAGS="-timeout=20m"
make integration | tee /c/Logs/integration.log
EOF
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "sh.exe -c 'cat /c/Logs/integration.log | go-junit-report.exe > /c/Logs/junit_00.xml'"
- name: PrepareRepoList
Expand Down
5 changes: 5 additions & 0 deletions script/setup/prepare_env_windows.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Prepare windows environment for building and running containerd tests

# Disable Windows Defender real time monitoring. Real time monitoring consumes a lot of
# CPU and slows down tests as images are unarchived, and is not really needed in a short
# lived test environment.
Set-MpPreference -DisableRealtimeMonitoring:$true

$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.19.6"; make = ""; nssm = "" }

Write-Host "Downloading chocolatey package"
Expand Down

0 comments on commit 10357ea

Please sign in to comment.