Release pipeline: route vcpkg through Terrapin asset cache#1990
Merged
Conversation
The official release pipeline has been failing since libgit2 was
statically linked via vcpkg, because the pool's build agents do not have
direct public-internet access. vcpkg was reaching out to sourceforge.net
(and other origins) for libgit2 transitive dependencies (pcre, zlib,
http_parser, ...) which the network layer blocked, causing
WinHttpSendRequest 12029 errors.
Route vcpkg asset downloads through the internal Terrapin cache (the
canonical CI asset-caching service).
This is opt-in. External contributors and the public GitHub Actions
PR-validation workflow (.github/workflows/build.yaml) continue to use
the standard vcpkg flow with direct downloads from public origins. No
internal feed authentication is required to build VFS for Git from a
fresh clone, and the repo source code intentionally contains no msbuild
SDK references that would pull internal packages into a default restore.
Changes:
Directory.Build.props
Add IsLocalBuild and UseTerrapinAssetCache properties, both
defaulted to false. IsLocalBuild controls Terrapin upload-on-fetch
(allowed on dev boxes only); UseTerrapinAssetCache opts the build
into the Terrapin asset-cache machinery (release pipeline only).
Directory.Build.targets
Build a --x-asset-sources string that combines the Terrapin
retrieval script with x-block-origin, gated on
UseTerrapinAssetCache=true, and append it to both vcpkg install
invocations. Add a guard <Error> that requires the pipeline to
supply TerrapinRetrievalToolPath up front when asset caching is
enabled. Also validate static git2.lib (was only checking dynamic
git2.dll).
.azure-pipelines/official-release-nuget.config (new)
Pipeline-only NuGet config that points at an internal feed. Used
solely by a one-off `nuget install` of Microsoft.Build.Vcpkg, not by
any csproj restore. Not consulted by external contributors or by
GitHub Actions.
.azure-pipelines/release.yml
Add NuGetAuthenticate@1 task. Add a NuGetCommand@2 task that
out-of-band installs the internal Microsoft.Build.Vcpkg package
(which ships TerrapinRetrievalTool.exe) into $(Agent.TempDirectory).
Add an explicit "Restore vcpkg native libraries (Terrapin cache)"
step that invokes _RestoreVcpkgDependencies on GVFS.Common.csproj
with -p:UseTerrapinAssetCache=true and TerrapinRetrievalToolPath
pointing at the extracted tool. Build.bat's own vcpkg install step
then skips because the libs are already present.
Assisted-by: Claude Opus 4.7
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
5014157 to
452e2fb
Compare
dscho
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The official release pipeline has been failing since libgit2 was
statically linked via vcpkg, because the pool's build agents do not have
direct public-internet access. vcpkg was reaching out to sourceforge.net
for libgit2 transitive dependencies (pcre, zlib, http_parser, ...) which
the network layer blocked, causing WinHttpSendRequest 12029 errors.
Solution
Route vcpkg asset downloads through the internal Terrapin cache (the
canonical CI asset-caching service). This is opt-in — external
contributors and the public GitHub Actions PR-validation workflow
(
.github/workflows/build.yaml) continue to use the standard vcpkg flowwith direct downloads from public origins. No internal feed
authentication is required to build VFS for Git from a fresh clone, and
the repo source code intentionally contains no msbuild SDK references
that would pull internal packages into a default restore.
Changes
Directory.Build.props: addIsLocalBuildandUseTerrapinAssetCacheproperties, both defaulted to false.IsLocalBuildcontrols Terrapin upload-on-fetch (allowed on dev boxesonly);
UseTerrapinAssetCacheopts the build into the Terrapinasset-cache machinery (release pipeline only).
Directory.Build.targets: build a--x-asset-sourcesstring thatcombines the Terrapin retrieval script with
x-block-origin, gated onUseTerrapinAssetCache=true, and append it to both vcpkg installinvocations. Add a guard
<Error>that requires the pipeline tosupply
TerrapinRetrievalToolPathup front when asset caching isenabled. Also validate static
git2.lib(was only checking dynamicgit2.dll)..azure-pipelines/official-release-nuget.config(new):pipeline-only NuGet config that points at an internal feed. Used
solely by a one-off
nuget installofMicrosoft.Build.Vcpkg, not byany csproj restore. Not consulted by external contributors or by
GitHub Actions.
.azure-pipelines/release.yml:NuGetAuthenticate@1task.NuGetCommand@2task that out-of-band installs the internalMicrosoft.Build.Vcpkgpackage (which shipsTerrapinRetrievalTool.exe) into$(Agent.TempDirectory).step that invokes
_RestoreVcpkgDependenciesonGVFS.Common.csprojwith-p:UseTerrapinAssetCache=trueandTerrapinRetrievalToolPathpointing at the extracted tool. Theexisting
Build.batinvocation downstream then skips the vcpkginstall because the libs are already present.
Verification
Verified with a successful run of the build stage in the official
release pipeline. End-to-end green: Restore vcpkg native libraries,
Build (Release), unit tests, installer build, and all 4 pipeline
artifacts (Installer, FastFetch, Symbols, FunctionalTests). The
Terrapin cache had every libgit2 transitive dep already seeded, so no
follow-up cache-seeding request is needed.