Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(admin): Handle NaN in admin results #6412

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Conversation

evanh
Copy link
Member

@evanh evanh commented Oct 11, 2024

Python will encode NaN into JSON, even though it's not actually valid JSON.
This will cause the frontend to error out. Handle this case for the admin tool.

Python will encode NaN into JSON, even though it's not actually valid JSON.
This will cause the frontend to error out. Handle this case for the admin tool.
@evanh evanh requested a review from a team as a code owner October 11, 2024 14:29
@evanh evanh enabled auto-merge (squash) October 11, 2024 14:36
Copy link

codecov bot commented Oct 11, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
554 1 553 1
View the top 1 failed tests by shortest run time
tests.admin.clickhouse.test_tracing test_scrub
Stack Traces | 0.001s run time
Traceback (most recent call last):
  File ".../admin/clickhouse/test_tracing.py", line 5, in test_scrub
    assert scrub_row((1, 2, 3, "release name")) == (1, 2, 3, "<scrubbed: str>")
  File ".../admin/clickhouse/tracing.py", line 62, in scrub_row
    if math.isnan(val):
       ^^^^^^^^^^^^^^^
TypeError: must be real number, not str

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@evanh evanh merged commit 2ce300c into master Oct 11, 2024
29 of 30 checks passed
@evanh evanh deleted the evanh/fix/nan-in-snuba-admin branch October 11, 2024 16:03
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