Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(source-control): reduce pull request read overhead #18400

Closedmaria-rckswants to merge 10 commits intomain fromrefs/pull/18400/headopened View on GitHub

Showing 12 changed files with 47 additions and 12 deletions (loading 11).

x
0 of 12 viewed, 12 left
47 additions and 12 deletionspackages/source-control-azure-devops/src/server/AzureDevOpsPullRequestCli.test.tsModified
View file
@@ -801,8 +801,9 @@
yield* ask();
const again = yield* ask();
​
- assert.strictEqual(mockedExecute.mock.calls.length, 5);
- // The second read goes straight to the pushes, and still answers with the head's blob.
+ assert.strictEqual(mockedExecute.mock.calls.length, 4);
+ // The second read goes straight to the pushes, finds the same push's changes already held,
+ // and still answers with the head's blob.
expect(argsOfCall(3)).toContain("pullRequestIterations");
expect([...again.revisions]).toEqual([["README.md", "8f80"]]);
}),
@@ -1148,7 +1149,7 @@
- it.effect("stops following pages when one of them does not move the cursor on", () =>
+ it.effect("retries truncated changes without a push and retains complete results", () =>
Effect.gen(function* () {
mockedExecute
.mockReturnValueOnce(
@@ -1201,17 +1202,35 @@
- );
+ )
+ .mockReturnValueOnce(Effect.succeed(output(json(oneIteration))))