Repository navigation
Engineering - fetch only the pinned vscode-distro commit - #343219
Bryan Chen (bryanchen-d) wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
What changed in this PR
Reduces Azure Pipelines failures/timeouts when checking out microsoft/vscode-distro by avoiding a full-history fetch and updating the branch-head resolution logic to work with shallow checkouts.
Changes:
- Switch
download-distro.ymlto a shallow checkout and explicitly fetch the pinned distro commit with retries. - Update
checkDistroCommit.tsto resolve branch heads viagit ls-remoteinstead of relying on local remote-tracking refs.
| File | Description |
|---|---|
| build/azure-pipelines/distro/download-distro.yml | Shallow checkout + explicit fetch of pinned commit to avoid long full-history downloads and token expiry. |
| build/azure-pipelines/common/checkDistroCommit.ts | Use remote query (ls-remote) to resolve branch heads in shallow checkouts; adjust logging message. |
Review effort: Lite
|
Validation run 487569 on this branch, with publish off, covering Quality, Linux x64 and macOS ARM64:
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
2 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
2 resolved since last review
Review effort: Lite
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open issues
This changes behavior from “treat as missing branch” to “skip the check entirely” on any transient… · New Fetching by raw SHA relies on the remote allowing SHA-based wants and the commit being… · New Interpolating${error}into an Azure DevOps logging command can introduce newlines/formatting… · New
2 resolved since last review
Review effort: Lite
|
Raymond Zhao (@rzhao271) Alex Ross (@alexr00) could you take an early look? Raymond made the last change to This PR fetches only the pinned vscode-distro commit, after two macOS checkouts failed mid-transfer ( The question I'd most like your eyes on: does fetching only the pinned commit break any consumer that expects the full distro history or other branches? Results from the full definition 111 validation run (487592) will be posted here shortly, so you can review against real evidence.
|
Every job fetched the full vscode-distro history (1.4M objects, ~455 MiB). Since Oct 20 ~20:00 UTC, macOS AcesShared agents intermittently download from GitHub at ~100 KiB/s, so that fetch ran for an hour. The first attempt then died with "early EOF" after ~62 min, and every retry failed with "Cannot prompt because user interactivity has been disabled" because the one-hour GitHub App token had expired. That failed the 05:00 insider 487409 (macOS ARM64 Sign) and main CI 487475 (Smoke Tests). Check out distro with depth 1 and no tags, then fetch just the commit pinned in package.json (~13 MiB). The distro commit check no longer has local branch refs, so it asks the remote for the branch head with ls-remote. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…the checkout exit code Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…distro commit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ating it as a feature branch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4b1aaeb to
95ab254
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
3 resolved since last review
Review effort: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
2 open issues
2 resolved since last review
Review effort: Lite
|
Full pipeline 111 validation, as required for pipeline changes: run 487592, covering all platforms with publish, release and sanity tests off. It ran a throwaway branch: Distro checkout per platform. Every job fetched 421 objects, 12.73 MiB, and none failed. Before this change it was 1.4M objects and 455 MiB.
That proves Windows X64 stage failure (test artifact, not this PR). To exercise #342967's skip branch, I retried the green Windows X64 stage with
|




Fixes the
Checkout microsoft/vscode-distrofailures that cost the 05:00 UTC insider 487409 about 5h and failed main CI 487475.What happened
download-distro.ymlfetches the full vscode-distro history withfetchDepth: 0: 1,415,967 objects, about 455 MiB. On a healthy agent that takes about 12 s at roughly 38 MiB/s. Both failures ran on macOS AcesShared agents downloading at about 100 KiB/s:early EOF)early EOF)Every retry then failed within a second with
fatal: Cannot prompt because user interactivity has been disabled. That applies to the agent's inner retries and to all 3retryCountOnTaskFailureattempts. They reuse the same extraheader, and it's a GitHub App installation token that expires after one hour. Once a fetch outlives the token, no retry can succeed.Scan of the last 30 days
I scanned all 1,663 builds of definition 111, covering 38,568 distro checkouts and including previous job attempts:
The slow network is on the macOS pool side and needs routing to its owners. This PR stops one slow pool from costing a release.
Fix
fetchDepth: 1andfetchTags: false. ThenCheckout distro commitfetches only the full 40-character commit pinned inpackage.json(currentlyf74ed5fd22f722226243d6e993b17c7e98587baa), using the persisted credentials, and checks it out. That step now also hasretryCountOnTaskFailure: 3. A depth-1 fetch of the pinned commit is about 12.7 MiB, roughly 36 times smaller. At the observed 100 KiB/s that's about 2 min instead of more than an hour.checkDistroCommit.tsused to readrefs/remotes/origin/<branch>, which a shallow checkout no longer has. It now runsgit ls-remote --heads origin refs/heads/<branch>. A branch that's missing from distro still takes the existing "expected for feature branches" path. In Quality Checks this step runs about 9 min after the checkout, well within the token's lifetime.lfs pullworks onHEAD.Validation
I replayed the new flow locally against vscode-distro with the same commands:
main, then fetching and checking out the pinnedf74ed5fd, took 1 s for 12.74 MiB in total.npm/andmixin/{exploration,insider,stable}are present.checkDistroCommit.tsreports the samemainmismatch as Quality Checks in 487522 (f74ed5fdvs2733515d). It resolves arelease/*branch head and takes the feature-branch path for a missing branch.checkDistroCommit.tstype-checks againstbuild/tsconfig.json.