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): return normalized fields for GetTraceEndpoint #6856

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xurui-c
Copy link
Member

@xurui-c xurui-c commented Feb 4, 2025

Currently, if the user doesn't specify attributes to the GetTraceEndpoint, we won't return normalized fields; however, we should

Copy link

codecov bot commented Feb 4, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2753 1 2752 12
View the top 1 failed tests by shortest run time
tests.web.rpc.v1.test_endpoint_get_trace.TestGetTrace::test_with_data
Stack Traces | 1.14s run time
Traceback (most recent call last):
  File ".../rpc/v1/test_endpoint_get_trace.py", line 242, in test_with_data
    response = EndpointGetTrace().execute(message)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../web/rpc/__init__.py", line 150, in execute
    return self.__after_execute(in_msg, out, error)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../web/rpc/__init__.py", line 203, in __after_execute
    raise error
  File ".../web/rpc/__init__.py", line 146, in execute
    out = self._execute(in_msg)
          ^^^^^^^^^^^^^^^^^^^^^
  File ".../rpc/v1/endpoint_get_trace.py", line 46, in _execute
    responses = [
                ^
  File ".../rpc/v1/endpoint_get_trace.py", line 47, in <listcomp>
    self.get_resolver(item.item_type).resolve(in_msg) for item in in_msg.items
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../resolvers/R_eap_spans/resolver_get_trace.py", line 263, in resolve
    items = _convert_results(results.result.get("data", []))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../resolvers/R_eap_spans/resolver_get_trace.py", line 237, in _convert_results
    add_attribute(key, value)
  File ".../resolvers/R_eap_spans/resolver_get_trace.py", line 224, in add_attribute
    attribute_key, attribute_value = _value_to_attribute(key, value)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../resolvers/R_eap_spans/resolver_get_trace.py", line 206, in _value_to_attribute
    raise BadSnubaRPCRequestException(f"data type unknown: {type(value)}")
snuba.web.rpc.common.exceptions.BadSnubaRPCRequestException: data type unknown: <class 'datetime.datetime'>

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

Rachel Chen added 2 commits February 4, 2025 20:25
@xurui-c xurui-c marked this pull request as ready for review February 5, 2025 06:42
@xurui-c xurui-c requested review from a team as code owners February 5, 2025 06:43
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