Skip to content

Commit 62baf08

Browse files
authored
fix(dashboard): do not delete the dashboard report (#3669)
* Do not delete the dashboard report For the past two years I have wondered why I would get "Report could not be found..." error on the dashboard when performing this command: ```sh dotnet tool run dotnet-stryker --reporter dashboard --open-report:dashboard --version main --dashboard-api-key ****** ```` Today I looked at the code and it turns out that the HTTP client performs a DELETE request on the report when all the mutants are tested, obviously deleting it! Note: this regression was introduced in #2563. * Call PublishReport _after_ PublishFinished Since PublishFinished performs a DELETE on the report
1 parent b96c403 commit 62baf08

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Stryker.Core/Stryker.Core/Reporters/DashboardReporter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public DashboardReporter(IStrykerOptions options, IDashboardClient dashboardClie
3535

3636
public void OnAllMutantsTested(IReadOnlyProjectComponent reportComponent, ITestProjectsInfo testProjectsInfo)
3737
{
38-
var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo);
39-
_dashboardClient.PublishReport(mutationReport, _options.ProjectVersion).Wait();
40-
4138
if (ShouldPublishInRealTime())
4239
{
4340
_dashboardClient.PublishFinished().Wait();
4441
}
42+
43+
var mutationReport = JsonReport.Build(_options, reportComponent, testProjectsInfo);
44+
_dashboardClient.PublishReport(mutationReport, _options.ProjectVersion).Wait();
4545
}
4646

4747
private void OpenDashboardReport(string reportUri)

0 commit comments

Comments
 (0)