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(eap-api): Snuba receives and returns doubles #6782

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

xurui-c
Copy link
Member

@xurui-c xurui-c commented Jan 16, 2025

Update plan:

  1. Sentry can receive doubles and floats
  2. Snuba can receive (from Sentry) and return (to Sentry) doubles and floats. In the case of aggregation, replace float with double. This is fine because Sentry handles the case of receiving doubles already
  3. Sentry asks for doubles only

This PR addresses step 2. Step 1's PR is here: getsentry/sentry#83566

@xurui-c xurui-c changed the title c fix(eap-api): get Snuba ready to support val_double and val_float Jan 16, 2025
@xurui-c xurui-c force-pushed the rachel/doublesbackwardcompatible branch from 3f05554 to ecc5a6b Compare January 16, 2025 07:40
Copy link

codecov bot commented Jan 16, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2791 1 2790 11
View the top 1 failed tests by shortest run time
tests.web.rpc.v1.test_endpoint_trace_item_table.test_endpoint_trace_item_table.TestTraceItemTable::test_aggregation_filter_and_or
Stack Traces | 0.343s run time
Traceback (most recent call last):
  File ".../v1/test_endpoint_trace_item_table/test_endpoint_trace_item_table.py", line 1303, in test_aggregation_filter_and_or
    assert response.column_values == [
AssertionError: assert [attribute_name: "kylestag"\nresults {\n  val_str: "val2"\n}\nresults {\n  val_str: "val3"\n}\n, attribute_name: "sum(my.float.field)"\nresults {\n  val_double: 1214.4\n}\nresults {\n  val_double: 3036\n}\n] == [attribute_name: "kylestag"\nresults {\n  val_str: "val2"\n}\nresults {\n  val_str: "val3"\n}\n,\n attribute_name: "sum(my.float.field)"\nresults {\n  val_float: 1214.4\n}\nresults {\n  val_float: 3036\n}\n]
  At index 1 diff: attribute_name: "sum(my.float.field)"\nresults {\n  val_double: 1214.4\n}\nresults {\n  val_double: 3036\n}\n != attribute_name: "sum(my.float.field)"\nresults {\n  val_float: 1214.4\n}\nresults {\n  val_float: 3036\n}\n
  Full diff:
    [
     attribute_name: "kylestag"
    results {
      val_str: "val2"
    }
    results {
      val_str: "val3"
    }
  - ,
  -  attribute_name: "sum(my.float.field)"
  + , attribute_name: "sum(my.float.field)"
  ? +
    results {
  -   val_float: 1214.4
  ?       ^ ^^^
  +   val_double: 1214.4
  ?       ^^^^ ^
    }
    results {
  -   val_float: 3036
  +   val_double: 3036
    }
    ,
    ]

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@xurui-c xurui-c force-pushed the rachel/doublesbackwardcompatible branch 2 times, most recently from 9ce32e8 to 8ecee4e Compare January 16, 2025 08:28
@xurui-c xurui-c changed the title fix(eap-api): get Snuba ready to support val_double and val_float fix(eap-api): Snuba receives and returns doubles Jan 16, 2025
@xurui-c xurui-c force-pushed the rachel/doublesbackwardcompatible branch 2 times, most recently from c15bab2 to 8f6cca1 Compare January 17, 2025 19:57
@xurui-c xurui-c force-pushed the rachel/doublesbackwardcompatible branch 2 times, most recently from 6b756f9 to 08e2ece Compare January 17, 2025 20:48
@xurui-c xurui-c force-pushed the rachel/doublesbackwardcompatible branch from 08e2ece to 628c371 Compare January 17, 2025 21:21
@@ -555,6 +556,39 @@ def test_table_with_aggregates(self, setup_teardown: Any) -> None:
limit=5,
)
response = EndpointTraceItemTable().execute(message)

Copy link
Member Author

Choose a reason for hiding this comment

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

im going to remove these

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.

1 participant