Skip to content

fix(spans): Convert nones to zeros for failure rate and count#110330

Merged
Zylphrex merged 6 commits intomasterfrom
txiao/fix/convert-nones-to-zeros-for-failure-rate-and-count
Mar 11, 2026
Merged

fix(spans): Convert nones to zeros for failure rate and count#110330
Zylphrex merged 6 commits intomasterfrom
txiao/fix/convert-nones-to-zeros-for-failure-rate-and-count

Conversation

@Zylphrex
Copy link
Member

Nones cause the frontend to render (no value). So convert these to 0s.

Nones cause the frontend to render (no value). So convert these to 0s.
@Zylphrex Zylphrex requested a review from a team as a code owner March 10, 2026 17:53
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 10, 2026
@github-actions
Copy link
Contributor

Backend Test Failures

Failures on df57730 in this run:

tests/sentry/discover/test_compare_tables.py::CompareTablesTestCase::test_compare_empty_field_tableslog
tests/sentry/discover/test_compare_tables.py:292: in test_compare_empty_field_tables
    assert (
E   AssertionError: assert (['http.status_code'] is not None and 'failure_rate()' in ['http.status_code'])

@github-actions
Copy link
Contributor

Backend Test Failures

Failures on df5fad5 in this run:

tests/sentry/discover/test_compare_tables.py::CompareTablesTestCase::test_compare_empty_field_tableslog
tests/sentry/discover/test_compare_tables.py:292: in test_compare_empty_field_tables
    assert (
E   AssertionError: assert (['http.status_code'] is not None and 'failure_rate()' in ['http.status_code'])

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

widget_type=DashboardWidgetTypes.TRANSACTION_LIKE,
)

self.empty_field_widget_query = DashboardWidgetQuery.objects.create(
Copy link
Contributor

Choose a reason for hiding this comment

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

Orphaned test fixture left after removing its usage

Low Severity

self.empty_field_widget is still created in setUp but is now unused. The associated empty_field_widget_query and the test_compare_empty_field_tables test that referenced it were both removed in this PR, but the widget fixture itself was left behind. This creates an unnecessary database object on every test run and may confuse future readers.

Fix in Cursor Fix in Web

@Zylphrex Zylphrex merged commit 4857f51 into master Mar 11, 2026
58 checks passed
@Zylphrex Zylphrex deleted the txiao/fix/convert-nones-to-zeros-for-failure-rate-and-count branch March 11, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants