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

ref(deletes): search-issues -> generic-events #6503

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion snuba/utils/streams/topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Topic(Enum):
METRICS_SUMMARIES = "snuba-metrics-summaries"
EAP_MUTATIONS = "snuba-eap-mutations"

LW_DELETIONS_SEARCH_ISSUES = "snuba-lw-deletions-search-issues"
LW_DELETIONS_GENERIC_EVENTS = "snuba-lw-deletions-generic-events"

COGS_SHARED_RESOURCES_USAGE = "shared-resources-usage"

Expand Down
2 changes: 1 addition & 1 deletion snuba/web/bulk_delete_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DeleteQueryMessage(TypedDict):

PRODUCER_MAP: MutableMapping[str, Producer] = {}
STORAGE_TOPIC: Mapping[str, Topic] = {
StorageKey.SEARCH_ISSUES.value: Topic.LW_DELETIONS_SEARCH_ISSUES
StorageKey.SEARCH_ISSUES.value: Topic.LW_DELETIONS_GENERIC_EVENTS
}


Expand Down
4 changes: 2 additions & 2 deletions tests/web/test_bulk_delete_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_attribution_info(
@patch("snuba.web.bulk_delete_query._enforce_max_rows", return_value=10)
def test_delete_success(mock_enforce_max_row: Mock) -> None:
admin_client = AdminClient(get_default_kafka_configuration())
create_topics(admin_client, [Topic.LW_DELETIONS_SEARCH_ISSUES])
create_topics(admin_client, [Topic.LW_DELETIONS_GENERIC_EVENTS])

consumer = Consumer(CONSUMER_CONFIG)
storage = get_writable_storage(StorageKey("search_issues"))
Expand All @@ -56,7 +56,7 @@ def test_delete_success(mock_enforce_max_row: Mock) -> None:

# just give in second before subscribing
time.sleep(2.0)
consumer.subscribe([Topic.LW_DELETIONS_SEARCH_ISSUES.value])
consumer.subscribe([Topic.LW_DELETIONS_GENERIC_EVENTS.value])

result = delete_from_storage(storage, conditions, attr_info)
assert result["search_issues_local_v2"]["data"] == [{"rows_to_delete": 10}]
Expand Down
Loading