Skip to content

fix(dashboard): do not delete the dashboard report#3669

Open
0xced wants to merge 2 commits into
stryker-mutator:masterfrom
0xced:do-not-delete-dashboard-report
Open

fix(dashboard): do not delete the dashboard report#3669
0xced wants to merge 2 commits into
stryker-mutator:masterfrom
0xced:do-not-delete-dashboard-report

Conversation

@0xced

@0xced 0xced commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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:

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.

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 stryker-mutator#2563.
Copilot AI review requested due to automatic review settings June 26, 2026 20:32
@0xced 0xced changed the title Do not delete the dashboard report fix(dashboard): do not delete the dashboard report Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a regression in Stryker.NET’s dashboard real-time reporting client where finishing a run would issue an HTTP DELETE against the dashboard report URL, causing the report to disappear and later fail to open.

Changes:

  • Removed the DELETE call from DashboardClient.PublishFinished() so finishing a run no longer deletes the dashboard report.
  • (No other functional changes in this PR.)
Comments suppressed due to low confidence (1)

src/Stryker.Core/Stryker.Core/Clients/DashboardClient.cs:105

  • Grammar in this log message is off (missing "to"), which makes the error harder to read/search consistently.
        {
            _logger.LogError(exception, "Failed send finished event to the dashboard at {DashboardUrl}", url);
        }

Comment on lines 89 to 101
public async Task PublishFinished()
{
var url = GetUrl(_options.ProjectVersion, true);

try
{
if (_batch.Count != 0)
{
var batchResponse = await _httpClient.PostAsJsonAsync(url, _batch, JsonReportSerialization.Options);
batchResponse.EnsureSuccessStatusCode();
_batch.Clear();
}

var deleteResponse = await _httpClient.DeleteAsync(url);
deleteResponse.EnsureSuccessStatusCode();
}
@rouke-broersma

Copy link
Copy Markdown
Member

If I remember correctly the deletion is by design. It is a failsafe in case anything in the mutant matching, transport or whatever else (a risk was identified but I don't remember the specific reason that was brought forward) happens with real time reporting. However immediately after that the non-realtime report (so the full report as calculated by Stryker client) is supposed to be published iirc so it should not have any user impact so obviously something is going wrong there still.

Since PublishFinished performs a DELETE on the report
@0xced

0xced commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

However immediately after that the non-realtime report (so the full report as calculated by Stryker client) is supposed to be published.

The thing is, the current implementation publishes the report immediately before and not immediately after deletion. 😉

Addressed in 63ee722 and restored the DELETE HTTP call.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants