Skip to content

Commit

Permalink
feat(replays): Ingest null title as null (#4059)
Browse files Browse the repository at this point in the history
* Allow title to be set as null

* Update api test
  • Loading branch information
cmanallen committed Jul 10, 2023
1 parent dea5838 commit 938f177
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion snuba/datasets/processors/replays_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _process_tags(

# we have to set title to empty string as it is non-nullable,
# and on clickhouse 20 this throws an error.
processed["title"] = tags.transaction or ""
processed["title"] = tags.transaction
processed["tags.key"] = tags.keys
processed["tags.value"] = tags.values

Expand Down
2 changes: 1 addition & 1 deletion tests/datasets/test_replays_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def build_result(self, meta: KafkaMessageMetadata) -> Mapping[str, Any]:
"device_model": self.device_model,
"tags.key": ["customtag"],
"tags.value": ["is_set"],
"title": self.title or "",
"title": self.title,
"sdk_name": "sentry.python",
"sdk_version": "0.9.0",
"retention_days": 30,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_replays_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_sdk_user_title_nullability(self) -> None:

assert data["data"] == [
{
"title": "",
"title": None,
"user": None,
"sdk_name": None,
"sdk_version": None,
Expand Down

0 comments on commit 938f177

Please sign in to comment.