Skip to content

Override fetchFilter to null for AutoManagedVHD#5571

Open
semihokur wants to merge 1 commit into
microsoft:masterfrom
semihokur:patch-1
Open

Override fetchFilter to null for AutoManagedVHD#5571
semihokur wants to merge 1 commit into
microsoft:masterfrom
semihokur:patch-1

Conversation

@semihokur

@semihokur semihokur commented May 20, 2026

Copy link
Copy Markdown
Contributor

Context

When an AutoManagedVHD is detected, the agent already forces clean = false and fetchDepth = 0 to preserve the VHD's full clone. However, fetchFilter is still passed through to git fetch. Setting fetchFilter: blob:none on a VHD-backed full clone causes a ~5 minute sync regression (vs ~30s without the filter) on the AzureDevOps repo. The --filter=blob:none flag 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 .autoManagedVhd marker is detected, force fetchFilter = null alongside the existing fetchDepth = 0 and clean = false overrides. This prevents the agent from passing --filter=blob:none to git fetch on 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 (.autoManagedVhd marker detected). It follows the same override pattern already established for fetchDepth and clean. 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.

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.
@semihokur semihokur requested review from a team as code owners May 20, 2026 02:52
@tarunramsinghani

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@semihokur

Copy link
Copy Markdown
Contributor Author

@sanjuyadav24, can we please merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants