Skip to content

Conversation

@simonswine
Copy link
Contributor

@simonswine simonswine commented Dec 8, 2025

Summary

Fixes a bug where queries using format=dot would return a 500 error when no data is available, instead of returning an empty/valid response.

Changes

  • Updated pkg/querier/http.go to handle empty data scenarios for dot format queries
  • Added comprehensive test coverage in pkg/querier/http_test.go to verify the fix

Test plan

  • Added unit tests verifying that empty data responses return appropriate status codes instead of 500 errors

@simonswine simonswine requested a review from marcsanmi as a code owner December 8, 2025 17:35
@simonswine simonswine merged commit f85cf5c into main Dec 9, 2025
21 checks passed
@simonswine simonswine deleted the 20251208_empty-dot-result branch December 9, 2025 08:25
simonswine added a commit that referenced this pull request Dec 9, 2025
* profilecli(canary): do not check for service.name label (#4677)

* fix: No data for format=dot queries, should not result in a 500 (#4675)

---------

Co-authored-by: korniltsev-grafanista <anatoly.korniltsev@grafana.com>
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.

2 participants