Skip to content

chore(ci): Skip broken trace item detail tests#116497

Merged
kenzoengineer merged 1 commit into
masterfrom
kenjiang/skip-broken-trace-item-tests
May 29, 2026
Merged

chore(ci): Skip broken trace item detail tests#116497
kenzoengineer merged 1 commit into
masterfrom
kenjiang/skip-broken-trace-item-tests

Conversation

@kenzoengineer
Copy link
Copy Markdown
Member

@kenzoengineer kenzoengineer commented May 29, 2026

Summary

  • Skip 3 tests in test_project_trace_item_details.py that are broken as of 05-29-2026
  • test_convert_rpc_attribute_to_json_serializes_known_string_array_without_array_flag
  • test_convert_rpc_attribute_to_json_exposes_array_with_array_flag
  • TestReplacementAttributeFiltering::test_replacement_array_shown_when_no_deprecated_source

Test plan

  • CI should pass with these tests skipped

Will continue root causing and follow up with the relevant parties to ensure the real cause is addressed.

🤖 Generated with Claude Code

Skipping 3 tests broken by CI as of 05-29-2026.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kenzoengineer kenzoengineer requested a review from a team as a code owner May 29, 2026 17:19
@kenzoengineer kenzoengineer changed the title skip: Skip broken trace item detail tests chore(ci): Skip broken trace item detail tests May 29, 2026
@kenzoengineer kenzoengineer enabled auto-merge (squash) May 29, 2026 17:21
from sentry.search.eap.types import SupportedTraceItemType


@pytest.mark.skip(reason="Skipping due to broken CI 05-29-2026")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Array-type attributes like gen_ai.output.messages are silently dropped from API responses when include_arrays=False due to incorrect type translation.
Severity: MEDIUM

Suggested Fix

Update convert_rpc_attribute_to_json to correctly handle cases where translate_search_type_for_internal_column returns None for array types. Ensure that array attributes are not skipped when include_arrays=False and are properly formatted. This may involve registering array types in SPAN_ATTRIBUTE_DEFINITIONS or adding specific handling for them in the conversion logic.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: tests/sentry/api/endpoints/test_project_trace_item_details.py#L7

Potential issue: The function `convert_rpc_attribute_to_json` incorrectly handles
array-type attributes like `gen_ai.output.messages`. Because
`translate_search_type_for_internal_column` returns `None` for these attributes, they
are processed incorrectly. When `include_arrays=False` (the default), the function's
logic causes these attributes to be silently dropped from the API response. This affects
the `ProjectTraceItemDetailsEndpoint` for all users, regardless of whether the
`organizations:performance-sentry-conventions-fields` flag is enabled.

Also affects:

  • tests/sentry/api/endpoints/test_project_trace_item_details.py:119

Did we get this right? 👍 / 👎 to inform future reviews.

assert result == []


@pytest.mark.skip(reason="Skipping due to broken CI 05-29-2026")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: When include_arrays=True, array-type attributes are given an incorrect name like tags[internal_name,array] in the API response.
Severity: MEDIUM

Suggested Fix

In convert_rpc_attribute_to_json, when include_arrays=True and translate_search_type_for_internal_column returns None, ensure external_name is correctly set to the internal_name instead of falling back to the tags[...] format. This will ensure array attributes are correctly named in the API response.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: tests/sentry/api/endpoints/test_project_trace_item_details.py#L58

Potential issue: The function `convert_rpc_attribute_to_json` incorrectly handles
array-type attributes when `include_arrays=True`. Because
`translate_search_type_for_internal_column` returns `None` for attributes like
`gen_ai.output.messages`, the `external_name` is not set. This triggers fallback logic
that assigns a malformed name, such as `tags[gen_ai.output.messages,array]`, instead of
the correct `gen_ai.output.messages`. This bug affects users with the
`organizations:trace-item-details-array-fields` feature flag enabled.

Did we get this right? 👍 / 👎 to inform future reviews.

@kenzoengineer kenzoengineer merged commit 3e7c391 into master May 29, 2026
63 checks passed
@kenzoengineer kenzoengineer deleted the kenjiang/skip-broken-trace-item-tests branch May 29, 2026 17:33
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