From 2a622c8af48b80f17dcb64d0ebc3fd59a8129586 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 13 Oct 2022 16:55:04 -0400 Subject: [PATCH] Cirrus: Fix windows clone race Ref: #16167 According to Cirrus-support, defining and using `$CIRRUS_DEFAULT_WORK` is responsible for causing a strange race condition on windows. This is impacting the agent's ability to clone with errors like: ``` Using built-in Git... Cloning refs/heads/main... Failed to clone: read ${CIRRUS_DEFAULT_WORK}\.git\HEAD: The process cannot access the file because another process has locked a portion of the file.! ``` Fix this by hard-coding a work directory for this windows task. Co-authored-by: Jason T. Greene Signed-off-by: Chris Evich --- .cirrus.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 68eca4ef56..0b61d979d7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,8 +14,6 @@ env: GOPATH: &gopath "/var/tmp/go" GOCACHE: "${GOPATH}/cache" GOSRC: &gosrc "/var/tmp/go/src/github.com/containers/podman" - # Store the unaltered default location, for tasks that need it - CIRRUS_DEFAULT_WORK: ${CIRRUS_WORKING_DIR} CIRRUS_WORKING_DIR: *gosrc # The default is 'sh' if unspecified CIRRUS_SHELL: "/bin/bash" @@ -1053,7 +1051,7 @@ win_installer_task: CIRRUS_SHELL: powershell # Fake version, we are only testing the installer functions, so version doesn't matter WIN_INST_VER: 9.9.9 - CIRRUS_WORKING_DIR: "${CIRRUS_DEFAULT_WORK}" + CIRRUS_WORKING_DIR: "${LOCALAPPDATA}\\Temp\\cirrus-ci-build" install_script: '.\contrib\cirrus\win-installer-install.ps1' main_script: '.\contrib\cirrus\win-installer-main.ps1'