Override fetchFilter to null for AutoManagedVHD#5571
Open
semihokur wants to merge 1 commit into
Open
Conversation
When an AutoManagedVHD is detected, we already force clean = false and fetchDepth = 0 to preserve the VHD's full clone. However, fetchFilter is still passed through, and setting fetchFilter: blob:none on top of a VHD full clone causes a ~5 minute regression (vs ~30s without it) for AzureDevOps repo. The --filter=blob:none flag triggers an expensive post-fetch connectivity check — git walks the entire object store to verify that blobs referenced by new trees exist locally or are promised by a promisor remote. Since the repo isn't configured as a partial clone, this verification is O(full object database) and dominates the sync time. This change forces fetchFilter = null when .autoManagedVhd is detected, consistent with the existing fetchDepth override.
tarunramsinghani
approved these changes
May 20, 2026
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
@sanjuyadav24, can we please merge this? |
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.
Context
When an AutoManagedVHD is detected, the agent already forces
clean = falseandfetchDepth = 0to preserve the VHD's full clone. However,fetchFilteris still passed through togit fetch. SettingfetchFilter: blob:noneon a VHD-backed full clone causes a ~5 minute sync regression (vs ~30s without the filter) on the AzureDevOps repo. The--filter=blob:noneflag triggers an expensive post-fetch connectivity check where git walks the entire object store to verify that blobs referenced by new trees exist locally or are promised by a promisor remote. Since the VHD repo is not configured as a partial clone, this verification is O(full object database) and dominates the sync time.Description
When
.autoManagedVhdmarker is detected, forcefetchFilter = nullalongside the existingfetchDepth = 0andclean = falseoverrides. This prevents the agent from passing--filter=blob:nonetogit fetchon a repo that already has a full object store, avoiding the costly connectivity check that causes a ~10x slowdown.Risk Assessment (Low)
The change is scoped exclusively to the AutoManagedVHD code path (
.autoManagedVhdmarker detected). It follows the same override pattern already established forfetchDepthandclean. No behavior change for non-VHD pipelines.Documentation Changes Required (No)
No user-facing documentation changes needed. The AutoManagedVHD feature is internal and the override is transparent — pipelines continue to work as before, just faster.