612 references to Path
AnalyzeCiFailure.Tests (612)
AnalyzeCiFailureAlternateWorkflowTests.cs (6)
298Assert.Single(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 311await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 323["collect", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, "--run-id", "123", "--run-attempt", "2"], 336var responses = Directory.CreateDirectory(Path.Combine(_workspace.Path, "responses")).FullName; 520Assert.Equal(0, (await RunProcessAsync("git", ["--no-pager", "remote", "add", "origin", Path.Combine(_workspace.Path, "remote.git")])).ExitCode); 528_workspace.Path,
AnalyzeCiFailureArtifactSelectionTests.cs (2)
195var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 196var jobsPath = Path.Combine(_workspace.Path, "jobs.json");
AnalyzeCiFailureBestEffortTests.cs (4)
48var root = Path.Combine(_workspace.Path, "partial-results"); 77var archivePath = Path.Combine(_workspace.Path, "failed-expansion.zip"); 87Path.Combine(_workspace.Path, "first"), 95Path.Combine(_workspace.Path, "second"),
AnalyzeCiFailureBootstrapTests.cs (2)
16var seed = Directory.CreateDirectory(Path.Combine(_workspace.Path, "seed")).FullName; 41var hostile = Directory.CreateDirectory(Path.Combine(_workspace.Path, "hostile")).FullName;
AnalyzeCiFailureBranchHistoryTests.cs (1)
46Path.Combine(_workspace.Path, "history-branch-calls.log"))),
AnalyzeCiFailureCohesionTests.cs (5)
20var output = Path.Combine(_workspace.Path, "workflow-output"); 24_workspace.Path, 46var input = new EvidencePaths(Path.Combine(_workspace.Path, "input")); 126Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 135var summary = Path.Combine(_workspace.Path, "summary.md");
AnalyzeCiFailureCollectionTests.cs (32)
28Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output"))); 42Assert.Contains("analysis_ready=false", await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output"))); 55var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 92_workspace.Path, 119var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "invocation-paths")); 137var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 148await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "require-final-outputs"), ""); 153var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 171var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 178await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 210var pathOutputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 228Path.Combine(_workspace.Path, "workflow-output"), 232await Verifier.Verify(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "workflow-output")), "txt") 250Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 265Assert.False(File.Exists(Path.Combine(_workspace.Path, "workflow-output"))); 272var outputDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "output-is-directory")).FullName; 283Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 296["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "missing-parent", "workflow-output"), 302Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 311await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-outcome-write"), ""); 335var paths = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 464var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 548Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 560await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))); 585var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 618var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 648var responses = Directory.CreateDirectory(Path.Combine(_workspace.Path, "responses")).FullName; 936Path.Combine(_workspace.Path, scenario == "history-transport" ? "missing.git" : "remote.git")])).ExitCode); 940var causes = Directory.CreateDirectory(Path.Combine(_workspace.Path, "history-seed", "causes")).FullName; 984["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "workflow-output"), 985["INVOCATION_PATHS"] = useWorkflowAdapter ? Path.Combine(_workspace.Path, "workflow-output") : Path.Combine(_workspace.Path, "invocation-paths"),
AnalyzeCiFailureCSharpRerunTests.cs (5)
87var analysis = Directory.CreateDirectory(Path.Combine(_workspace.Path, "proposal")).FullName; 100var output = Path.Combine(_workspace.Path, "agent-output.json"); 141["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir", analysis, "--working-dir", _workspace.Path], 159var calls = File.Exists(Path.Combine(_workspace.Path, "rerun-calls.log")) 160? await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "rerun-calls.log")) : [];
AnalyzeCiFailureDiagnosticsTests.cs (10)
54File.ReadAllLines(Path.Combine(_workspace.Path, "workflow-output"))); 75File.Delete(Path.Combine(_workspace.Path, "first-issue-published")); 76var fakeGh = Assert.Single(Directory.GetFiles(_workspace.Path, "gh", SearchOption.AllDirectories)); 79"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")], 112_workspace.Path, 131var input = Directory.CreateDirectory(Path.Combine(_workspace.Path, "invalid-replay")).FullName; 145Directory.CreateDirectory(Path.Combine(_workspace.Path, "eng")); 146await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "eng", "test-retry-patterns.json"), "not JSON"); 231await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "comment-response"), response); 252var output = Directory.CreateDirectory(Path.Combine(_workspace.Path, "not-an-output-file")).FullName;
AnalyzeCiFailureEvidenceTests.cs (23)
53var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 63var accepted = AnalyzeCiFailureFixtures.Validate(_workspace.Path); 89var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 122var file = Path.Combine(_workspace.Path, "typed-test-failures.json"); 144var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 146var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 150var output = Path.Combine(_workspace.Path, "accepted.json"); 167var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 188var accepted = AnalyzeCiFailureFixtures.Validate(_workspace.Path); 228var accepted = AnalyzeCiFailureFixtures.Validate(_workspace.Path); 241Path.Combine(_workspace.Path, "issue-details.json"), 255Assert.False(File.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json"))); 268var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 291await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 293Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs"))); 306await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "invalidate-evidence-on-lookup"), ""); 319["issue"] = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), 320["comment"] = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 346var output = Path.Combine(_workspace.Path, "summary.json"); 375var output = Path.Combine(_workspace.Path, "summary.json"); 387var file = Path.Combine(_workspace.Path, "jobs.json"); 410var output = Path.Combine(_workspace.Path, "summary.json"); 432var output = Path.Combine(_workspace.Path, "summary.json");
AnalyzeCiFailureGitTests.cs (23)
17var bin = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-git")).FullName; 18var started = Path.Combine(_workspace.Path, "head-started"); 19var released = Path.Combine(_workspace.Path, "head-released"); 37_workspace.Path, 43var store = new CauseHistoryStore(command, "microsoft/aspire", _workspace.Path, new AnalysisDiagnostics()); 44var commit = store.CommitAndPushAsync("123", [Path.Combine(_workspace.Path, "causes/test.json")]); 60["--no-pager -C " + _workspace.Path + " add -- causes/test.json", 61"--no-pager -C " + _workspace.Path + " diff --cached --name-only", 62"--no-pager -C " + _workspace.Path + " commit -m Update CI failure analysis for run 123", 63"--no-pager -C " + _workspace.Path + " rev-parse HEAD"], 64await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "git-operations"))); 72var directory = Path.Combine(_workspace.Path, "memory checkout"); 73var history = new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(_workspace.Path), "microsoft/aspire", directory, new AnalysisDiagnostics()); 87var directory = Path.Combine(_workspace.Path, "memory checkout"); 89var store = new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(_workspace.Path), "microsoft/aspire", directory, new AnalysisDiagnostics()); 126var directory = Path.Combine(_workspace.Path, "memory checkout"); 127var command = new AnalyzeCiFailure.AnalyzerCommandExecutor(_workspace.Path); 179var fakeBin = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 206var directory = Path.Combine(_workspace.Path, "history-checkout"); 207var notes = Path.Combine(_workspace.Path, "operator-notes.txt"); 211new CauseHistoryStore(new AnalyzeCiFailure.AnalyzerCommandExecutor(_workspace.Path, environment), "microsoft/aspire", directory, new AnalysisDiagnostics()).OpenForPublicationAsync()); 220var remoteDirectory = Path.Combine(_workspace.Path, "remote repository.git"); 237await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "stored-history.json"), contents);
AnalyzeCiFailureIdentifierPrecisionTests.cs (1)
29var outputPath = Path.Combine(_workspace.Path, "last-success.json");
AnalyzeCiFailureInvocationTests.cs (12)
19var evidence = Directory.CreateDirectory(Path.Combine(_workspace.Path, "saved-evidence")).FullName; 20var proposal = Directory.CreateDirectory(Path.Combine(_workspace.Path, "saved-proposal")).FullName; 21var alias = Path.Combine(_workspace.Path, "evidence-alias"); 49var outputs = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "workflow-output")); 58Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "ci-failure-data"))); 97Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 113Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 173var saved = Directory.CreateDirectory(Path.Combine(_workspace.Path, "earlier-replay")).FullName; 176var linkedInput = Path.Combine(_workspace.Path, "linked-evidence"); 208var output = Path.Combine(_workspace.Path, "workflow-output"); 234var evidence = Directory.CreateDirectory(Path.Combine(_workspace.Path, "input-evidence")).FullName; 235var proposal = Directory.CreateDirectory(Path.Combine(_workspace.Path, "input-proposal")).FullName;
AnalyzeCiFailureMigrationTests.cs (33)
85var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 88var path = Path.Combine(_workspace.Path, "ci-analysis-output", "proposal.json"); 94var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, 95"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 126var regenerated = await RunValidatorCommandAsync(["replay", "--working-dir", _workspace.Path]); 242var file = Path.Combine(_workspace.Path, "job-123.log"); 302_workspace.Path, 326Path.Combine(_workspace.Path, "issue.json"), 336var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 339var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!; 351Path.Combine(_workspace.Path, "issue.json"), 362await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 364Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs"))); 379var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 404Assert.False(File.Exists(Path.Combine(_workspace.Path, "gh-calls.log"))); 405Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs"))); 414var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 417await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-issue-create-once"), ""); 418await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "seed-unselected-malformed"), ""); 436await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "ci-analysis-output", "proposal.json"), TransientJson.Write(proposal)); 437var fakeGh = Assert.Single(Directory.GetFiles(_workspace.Path, "gh", SearchOption.AllDirectories)); 440var stored = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!; 451var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!; 455Assert.True(File.Exists(Path.Combine(_workspace.Path, "pr-comment.md"))); 465var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 467var agent = Path.Combine(_workspace.Path, "ci-analysis-output"); 470var arguments = new[] { "validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, "--analysis-dir", agent }; 491AnalyzeCiFailureFixtures.Write(_workspace.Path); 492var agent = Path.Combine(_workspace.Path, "ci-analysis-output"); 495var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, 507var transferred = Directory.CreateDirectory(Path.Combine(_workspace.Path, "transferred")).FullName; 533var agent = Directory.CreateDirectory(Path.Combine(_workspace.Path, "agent-artifact")).FullName; 586var (captured, _) = AnalyzeCiFailureFixtures.Read(_workspace.Path);
AnalyzeCiFailureOccurrenceTests.cs (5)
150var path = Path.Combine(_workspace.Path, "issue-body.md"); 166var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 175Path.Combine(_workspace.Path, "issue.json"), 195var summaryPath = Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"); 209var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh");
AnalyzeCiFailureOverflowTests.cs (15)
42var record = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo/runs/123.json")))!; 46Assert.True(File.Exists(Path.Combine(_workspace.Path, "memory-repo/causes", id + ".json"))); 50var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 64await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-overflow-comment-once"), ""); 67var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 72var issuePath = Path.Combine(_workspace.Path, "issue.json"); 76var pagesPath = Path.Combine(_workspace.Path, "overflow-comments.json"); 85File.Delete(Path.Combine(_workspace.Path, "ci-analysis-output/causes", $"cause-{index}.json")); 95Assert.Contains("Operator issue notes.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal); 112var path = Path.Combine(_workspace.Path, "issue.json"); 136var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 152var path = Path.Combine(_workspace.Path, "ci-analysis-output/analysis-result.json"); 156foreach (var file in Directory.GetFiles(Path.Combine(_workspace.Path, "ci-analysis-output/causes"), "*.json")) 162var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 167var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md"));
AnalyzeCiFailurePathsTests.cs (1)
17var workingDirectory = Path.Combine(_workspace.Path, "working directory");
AnalyzeCiFailurePreparationTests.cs (17)
87var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 105Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 176var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 189Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 273_preparationEvidence = AnalyzeCiFailureFixtures.Read(_workspace.Path).Evidence; 483var secret = Path.Combine(_workspace.Path, "external.xml"); 555var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!; 558var summary = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!; 559var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 606var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 674Assert.False(Directory.Exists(Path.Combine(_workspace.Path, "memory-repo"))); 696var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 715var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 800var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 839var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 861summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)!; 867var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!;
AnalyzeCiFailurePublicationTests.cs (88)
23await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "existing-main-label"), ""); 50await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue.json"), "[null,5]"); 56var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 58Assert.False(File.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json"))); 71var memoryDirectory = Path.Combine(_workspace.Path, "memory-repo"); 75_workspace.Path, 76Path.Combine(_workspace.Path, "analysis"), 118var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 218await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue-details.json"), issue.ToJsonString()); 221await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "issue-lookup-failure"), ""); 224? JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "debugger-timeout.json")))!.AsObject() 245var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 253Assert.False(File.Exists(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json"))); 268Path.Combine(_workspace.Path, "comments.json"), 273await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "close-after-lookup"), ""); 277var summaryPath = Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"); 287File.Delete(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "debugger-timeout.json")); 293var calls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 307var request = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "published-comment-request.json")))!; 315await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 332await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "pr-comment.md")), 359var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 361Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 382Path.Combine(_workspace.Path, "issue-details.json"), 397Assert.Contains("new operator note.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal); 398var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 419var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 459var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 477var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 510var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 526var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 540var summaryPath = Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"); 544var causePath = Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "debugger-timeout.json"); 568var summaryPath = Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"); 572var causePath = Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "debugger-timeout.json"); 581var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!; 585summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)!; 587Assert.InRange(System.Text.Encoding.UTF8.GetByteCount(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md"))), 1, 65000); 635var updated = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 640history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!.AsObject(); 666Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 667var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 674var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!; 694var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 715summary = AnalyzeCiFailure.CiFailureJson.ToNode(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)!; 734var analysis = Path.Combine(_workspace.Path, "ci-analysis-output"); 768var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 774Path.Combine(_workspace.Path, "issue.json"), 792var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 797var updated = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 824Assert.False(File.Exists(Path.Combine(_workspace.Path, "issue-body.md"))); 825var calls = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 827var original = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue.json")))!; 838var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 847Path.Combine(_workspace.Path, "issue.json"), 856var fakeGh = Path.Combine(Assert.Single(Directory.GetDirectories(_workspace.Path, "fake-bin-*")), "gh"); 890var causes = Directory.CreateDirectory(Path.Combine(_workspace.Path, "memory-repo", "causes")).FullName; 893if (File.Exists(Path.Combine(_workspace.Path, "seed-unselected-malformed"))) 895var causes = Directory.CreateDirectory(Path.Combine(_workspace.Path, "memory-repo", "causes")).FullName; 901Path.Combine(_workspace.Path, "issue.json"), 1000AnalyzeCiFailureFixtures.Write(_workspace.Path); 1014typeof(AnalyzeCiFailure.Program).Assembly.Location, "publish", "--working-dir", _workspace.Path, 1015"--evidence-dir", EvidenceDirectory, "--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output"), 1016"--history-dir", Path.Combine(_workspace.Path, "memory-repo"), "--repo", "microsoft/aspire", 1026var checkout = Path.Combine(_workspace.Path, "memory-repo"); 1027var remote = Path.Combine(_workspace.Path, "remote.git"); 1094var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1104await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "fail-second-issue"), ""); 1119var path = Path.Combine(_workspace.Path, "memory-repo", "causes", $"{id}.json"); 1136Assert.False(File.Exists(Path.Combine(_workspace.Path, "pr-comment.md"))); 1174var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1206var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1240var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1259var path = Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"); 1280var history = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "causes", "debugger-timeout.json")))!; 1282var run = JsonNode.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "memory-repo", "runs", "123.json")))!; 1292var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1353var directory = Path.Combine(_workspace.Path, "ci-analysis-output"); 1367var collected = AnalyzeCiFailureFixtures.Validate(_workspace.Path); 1401var storedDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "memory-repo", "causes")).FullName; 1431["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "obsolete-analysis-directory"), 1435typeof(AnalyzeCiFailure.Program).Assembly.Location, "publish", "--working-dir", _workspace.Path, 1437"--history-dir", Path.Combine(_workspace.Path, "memory-repo"), "--repo", "microsoft/aspire", 1440AnalyzeCiFailureFixtures.Write(_workspace.Path); 1447await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 1461var body = await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")); 1464Path.Combine(_workspace.Path, "issue.json"), 1481Assert.Contains("Operator notes: keep this.", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "issue-body.md")), StringComparison.Ordinal);
AnalyzeCiFailureStorageTests.cs (7)
18_workspace.Path, 35Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 173var replay = await RunValidatorCommandAsync(["replay", "--working-dir", _workspace.Path]); 193var target = collection ? Path.Combine(_workspace.Path, "saved-evidence") : paths.RootDirectory; 213_workspace.Path, 223var result = await RunValidatorCommandAsync(["replay", "--working-dir", _workspace.Path]); 246var result = await RunValidatorCommandAsync(["replay", "--working-dir", _workspace.Path]);
AnalyzeCiFailureWorkflowCommandsTests.cs (18)
25Assert.Equal(report, await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "step-summary"))); 32var summary = Path.Combine(_workspace.Path, "step-summary"); 39var outputs = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "workflow-output")); 74var summary = Directory.CreateDirectory(Path.Combine(_workspace.Path, "step-summary")).FullName; 88var path = Path.Combine(_workspace.Path, "workflow-output"); 119var output = Path.Combine(_workspace.Path, "workflow-output"); 139var output = Path.Combine(_workspace.Path, "workflow-output"); 184["collect", "--repo", "microsoft/aspire", "--run-id", "123", "--working-dir", _workspace.Path, "--github-output"], 195Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 202["collect", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path], 205["GITHUB_OUTPUT"] = Path.Combine(_workspace.Path, "workflow-output"), 213Assert.False(File.Exists(Path.Combine(_workspace.Path, "workflow-output"))); 221var output = Path.Combine(_workspace.Path, "agent-output.json"); 225["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir", _workspace.Path, "--working-dir", _workspace.Path], 240var output = Path.Combine(_workspace.Path, "agent-output.json"); 244["workflow", "rerun", "--repo", "microsoft/aspire", "--analysis-dir", _workspace.Path, "--working-dir", _workspace.Path],
AnalyzeCiFailureWorkflowTests.cs (301)
25private string EvidenceDirectory => _collectedEvidenceDirectory ?? Path.Combine(_workspace.Path, "ci-failure-analysis", "evidence"); 26private string ReplayDirectory => _replayDirectory ?? Path.Combine(_workspace.Path, "ci-failure-analysis", "replay"); 27private string RecoveryDirectory(string stage) => Path.Combine(_invocationDirectory ?? Path.Combine(_workspace.Path, "ci-failure-analysis"), "recovery", stage); 64var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 88var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 112Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "ghost.json")); 114var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 117Assert.True(Directory.Exists(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "ghost.json"))); 135var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 152var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 173var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 191var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 238Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 260Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 280Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 293Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 311Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 322AnalyzeCiFailureFixtures.Write(_workspace.Path); 347Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 363await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "arguments.rsp"), "collect"); 369Assert.Equal(["arguments.rsp"], Directory.GetFileSystemEntries(_workspace.Path).Select(Path.GetFileName)); 379Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 389new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ambient-analysis") }); 395Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 406new Dictionary<string, string> { ["ANALYSIS_DIR"] = Path.Combine(_workspace.Path, "ambient-analysis") }); 410Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 423Assert.Empty(Directory.GetFileSystemEntries(_workspace.Path)); 435AnalyzeCiFailureFixtures.Write(_workspace.Path); 436var workingDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "working directory")).FullName; 440Directory.Move(Path.Combine(_workspace.Path, "ci-analysis-output"), analysisDirectory); 441var ambientDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ambient-analysis")).FullName; 458var path = Path.Combine(_workspace.Path, "not-a-directory"); 468Directory.GetFileSystemEntries(_workspace.Path).Select(Path.GetFileName).Order(StringComparer.Ordinal)); 483var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 494Assert.Equal(text, await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "ci-analysis-output", "proposal.json"))); 506var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 521var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 535var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 550var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 570var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 580var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 618var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 632var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 663var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 684var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 706var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 734var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 754var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 786var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 813var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 848var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 867var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 870using var analysis = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)); 899var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 934var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 937using var analysis = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)); 961var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 982var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1003var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1022var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1042var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1062var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1085var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1104var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1127var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1159var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1186AnalyzeCiFailureFixtures.Write(_workspace.Path); 1187await File.WriteAllTextAsync(Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "unreferenced.json"), "not-json"); 1188var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, 1189"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 1220var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1237AnalyzeCiFailureFixtures.Write(_workspace.Path); 1240var result = await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, 1241"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 1262var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1312var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1365var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1448var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1451using var sanitized = JsonDocument.Parse(AnalyzeCiFailure.CiFailureJson.Serialize(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Report)); 1477var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1497var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1556var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1572var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1598var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1637var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1672var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1676Assert.Single(AnalyzeCiFailureFixtures.Validate(_workspace.Path).Causes).Definition)); 1699var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1730var causePath = Path.Combine(_workspace.Path, "ci-analysis-output", "causes", "nuget-timeout.json"); 1731var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1750var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1770var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 1794var (evidence, proposal) = AnalyzeCiFailureFixtures.Read(_workspace.Path); 1836var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1837var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 1861var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1862var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 1905var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 1906var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 2102var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2153var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2176var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2195var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2223var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2244var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 2257var causePath = Path.Combine(_workspace.Path, "main-build-break.json"); 2258var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 2259var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json"); 2260var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json"); 2261var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 2262var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2263var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2338var causePath = Path.Combine(_workspace.Path, "main-build-break.json"); 2339var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 2340var lastSuccessfulRunPath = Path.Combine(_workspace.Path, "last-successful-main-run.json"); 2341var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge-pr.json"); 2342var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 2343var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2344var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2416var causePath = Path.Combine(_workspace.Path, "flaky-failure.json"); 2417var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 2418var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 2459var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2465var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2479var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2485var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2506var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2511var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2524var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2529var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2542var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2547var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2570var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2582var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2595var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2600var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2613var archivePath = Path.Combine(_workspace.Path, "test-results.zip"); 2622var outputDirectory = Path.Combine(_workspace.Path, "extracted"); 2635var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2649var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2681var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2702var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2737var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2739var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2764var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2776var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2805var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2833var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2876var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2878var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2908var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2910var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2940var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2942var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 2972var artifactsPath = Path.Combine(_workspace.Path, "artifacts.json"); 2986var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3021var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3040var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3046var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3062var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3075var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3079var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3091var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3104var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3108var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3120var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3139var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3143var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3156var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3158var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3162var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3174var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3179var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3183var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3199var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3212var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3216var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3236var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3240var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3244var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3264var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3266var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3270var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3290var testResultsDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "test-results")); 3300var jobsPath = Path.Combine(_workspace.Path, "all-jobs.json"); 3304var outputPath = Path.Combine(_workspace.Path, "test-failures.json"); 3335var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json"); 3336var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json"); 3418var responses = Path.Combine(_workspace.Path, "comments.json"); 3452var callLogPath = Path.Combine(_workspace.Path, "gh-calls.log"); 3463var openIssuesPath = Path.Combine(_workspace.Path, "open-issues.json"); 3464var closedIssuesPath = Path.Combine(_workspace.Path, "closed-issues.json"); 3505Path.Combine(_workspace.Path, "last-success.json")); 3508using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3511Assert.Contains("per_page=100", await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-calls.log")), StringComparison.Ordinal); 3513await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3539var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3574var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3581await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3609var outputPath = Path.Combine(_workspace.Path, "last-success.json"); 3617await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3639Path.Combine(_workspace.Path, "last-success.json")); 3657Path.Combine(_workspace.Path, "last-success.json")); 3684Path.Combine(_workspace.Path, "last-success.json")); 3687using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3689Assert.True(int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count"))) >= 2); 3691(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))) 3718Path.Combine(_workspace.Path, "last-success.json")); 3721using var output = JsonDocument.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "last-success.json"))); 3723Assert.Equal(2, int.Parse(await File.ReadAllTextAsync(Path.Combine(_workspace.Path, "gh-call-count")))); 3726(await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log"))) 3739Path.Combine(_workspace.Path, "last-success.json")); 3752var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3753var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3773var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3774var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3817var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3818var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3866var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3867var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3878var ghCalls = await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")); 3926var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3927var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 3938await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "gh-calls.log")), 3967var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 3968var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4011var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 4012var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4051var candidatesPath = Path.Combine(_workspace.Path, "candidate-merges.json"); 4052var statusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4094var outputPath = Path.Combine(_workspace.Path, "persisted-main.json"); 4152var outputPath = Path.Combine(_workspace.Path, $"persisted-{historyState}.json"); 4193var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4246var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4278var outputPath = Path.Combine(_workspace.Path, "persisted-pr.json"); 4321var causePath = Path.Combine(_workspace.Path, "prior-cause.json"); 4359var metadataPath = Path.Combine(_workspace.Path, "metadata.json"); 4389var diagnosticsPath = Path.Combine(_workspace.Path, "diagnostics.json"); 4410var logPath = Path.Combine(_workspace.Path, "job.log"); 4461var inputPath = Path.Combine(_workspace.Path, "job.log"); 4462var outputPath = Path.Combine(_workspace.Path, "sanitized.log"); 4475var inputPath = Path.Combine(_workspace.Path, "job.log"); 4476var outputPath = Path.Combine(_workspace.Path, "sanitized.log"); 4493var causePath = Path.Combine(_workspace.Path, "cause.json"); 4494var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4495var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 4557var analysisPath = Path.Combine(_workspace.Path, "analysis.json"); 4558var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 4614var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4615var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4656var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4657var canonicalBodyPath = Path.Combine(_workspace.Path, "canonical-body.md"); 4658var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4775var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4776var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4824var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4825var outputPath = Path.Combine(_workspace.Path, "updated-body.md"); 4859var currentBodyPath = Path.Combine(_workspace.Path, "current-body.md"); 4860var firstOutputPath = Path.Combine(_workspace.Path, "first-output.md"); 4861var secondOutputPath = Path.Combine(_workspace.Path, "second-output.md"); 4917var causePath = Path.Combine(_workspace.Path, "cause.json"); 4918var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4919var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 4953var causePath = Path.Combine(_workspace.Path, "cause.json"); 4954var runContextPath = Path.Combine(_workspace.Path, "run-context.json"); 4955var lastSuccessfulPath = Path.Combine(_workspace.Path, "last-successful.json"); 4956var triggeringMergePath = Path.Combine(_workspace.Path, "triggering-merge.json"); 4957var candidateHistoryStatusPath = Path.Combine(_workspace.Path, "candidate-merge-history-status.json"); 4958var bodyPath = Path.Combine(_workspace.Path, "issue-body.md"); 4959var metadataPath = Path.Combine(_workspace.Path, "issue-metadata.json"); 5000var trustedJobsPath = Path.Combine(_workspace.Path, "failed-jobs.json"); 5001var buildCausePath = Path.Combine(_workspace.Path, "build-cause.json"); 5002var testCausePath = Path.Combine(_workspace.Path, "test-cause.json"); 5003var multiJobCausePath = Path.Combine(_workspace.Path, "multi-job-cause.json"); 5043var buildBodyPath = Path.Combine(_workspace.Path, "build-body.md"); 5044var buildMetadataPath = Path.Combine(_workspace.Path, "build-metadata.json"); 5045var testBodyPath = Path.Combine(_workspace.Path, "test-body.md"); 5046var testMetadataPath = Path.Combine(_workspace.Path, "test-metadata.json"); 5105AnalyzeCiFailureFixtures.Write(_workspace.Path); 5112["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, 5113"--analysis-dir", Path.Combine(_workspace.Path, "ci-analysis-output")]); 5132var analysis = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName; 5135return await RunValidatorCommandAsync(["validate", "--repo", "microsoft/aspire", "--working-dir", _workspace.Path, "--analysis-dir", analysis]); 5144var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 5151["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"), 5152["GH_CALL_COUNT_FILE"] = Path.Combine(_workspace.Path, "gh-call-count"), 5166var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "fake-bin")).FullName; 5173["GH_CALL_LOG"] = Path.Combine(_workspace.Path, "gh-calls.log"), 5188var fakeBinDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, $"fake-bin-{Guid.NewGuid():N}")).FullName; 5217var analysisDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output")).FullName; 5236Path.Combine(_workspace.Path, "ci-analysis-output", "analysis-result.json"))!; 5258=> new((await File.ReadAllLinesAsync(Path.Combine(_workspace.Path, "http-requests.jsonl"))) 5263var http = new HttpClient(new AnalyzeCiFailure.TestServices.GitHubFixtureHandler(_workspace.Path, environment)); 5285process.StartInfo.WorkingDirectory = workingDirectory ?? _workspace.Path; 5291process.StartInfo.Environment["GITHUB_STEP_SUMMARY"] = Path.Combine(_workspace.Path, "step-summary"); 5341var directory = workingIndex >= 0 && workingIndex + 1 < arguments.Count ? arguments[workingIndex + 1] : _workspace.Path; 5342return [.. arguments, "--evidence-dir", directory == _workspace.Path ? EvidenceDirectory : Path.Combine(directory, "ci-failure-analysis", "evidence")]; 5354var analysisDirectory = Path.Combine(_workspace.Path, "ci-analysis-output"); 5423var causesDirectory = Directory.CreateDirectory(Path.Combine(_workspace.Path, "ci-analysis-output", "causes")).FullName; 5432var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json")); 5443var result = await RunValidationScriptAsync(Path.Combine(_workspace.Path, "output.json"));
tests\Shared\TemporaryWorkspace.cs (1)
218var aspireDir = IOPath.Combine(workspace.Path, ".aspire");