Skip to content

Commit

Permalink
fix: use flag to prevent vcpkg lock timeout
Browse files Browse the repository at this point in the history
Fixes googleapis#4487

The flag was implemented by Microsoft in
microsoft/vcpkg#12227, thanks to @strega-nil!

I believe we were seeing this flake not because of multiple installs
happening at once, but rather because the machines that run our docker
tests were sometimes overloaded and running very slow and thus it
sometimes took more than 1.5 sec to acquire the lock. This is just a
hypothesis.

But regardless, we're now passing `--x-wait-for-lock` to all of our
`vcpkg install` invocations to avoid these flakes.
  • Loading branch information
devjgm committed Jul 10, 2020
1 parent 395000a commit 7ca85d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/kokoro/docker/build-in-docker-quickstart-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi
cd "${vcpkg_dir}"
./bootstrap-vcpkg.sh
./vcpkg remove --outdated --recurse
./vcpkg install google-cloud-cpp
./vcpkg install --x-wait-for-lock google-cloud-cpp
)
# Use the new installed/ directory to create the cache.
rm -fr "${HOME}/vcpkg-quickstart-cache"
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/macos/build-quickstart-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fi
cd "${vcpkg_dir}"
./bootstrap-vcpkg.sh
./vcpkg remove --outdated --recurse
./vcpkg install google-cloud-cpp
./vcpkg install --x-wait-for-lock google-cloud-cpp
)
# Use the new installed/ directory to create the cache.
rm -fr "cmake-out/vcpkg-quickstart-cache"
Expand Down
2 changes: 1 addition & 1 deletion ci/kokoro/windows/build-cmake-dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ if ($LastExitCode) {

Write-Host -ForegroundColor Yellow "`n$(Get-Date -Format o) Building vcpkg package versions."
foreach ($pkg in $packages) {
.\vcpkg.exe install ${vcpkg_flags} "${pkg}"
.\vcpkg.exe install --x-wait-for-lock ${vcpkg_flags} "${pkg}"
if ($LastExitCode) {
Write-Host -ForegroundColor Red "vcpkg install $pkg failed with exit code $LastExitCode"
Exit ${LastExitCode}
Expand Down

0 comments on commit 7ca85d6

Please sign in to comment.