ref(cells): Update assert_webhook_payloads_for_mailbox#111856
ref(cells): Update assert_webhook_payloads_for_mailbox#111856
Conversation
Backend Test FailuresFailures on
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| """ | ||
| expected_payload = WebhookPayload.get_attributes_from_request(request=request) | ||
| region_names_set = set(region_names) | ||
| cell_names_set = set(cell_names or region_names or []) |
There was a problem hiding this comment.
Falsy-check on cell_names ignores explicit empty list
Low Severity
The expression cell_names or region_names or [] uses Python's truthiness check, which treats an empty list [] the same as None. If a caller explicitly passes cell_names=[] (meaning "expect no cells") while getsentry simultaneously passes region_names=["us"] during the transition period, the empty cell_names would be silently ignored and region_names would be used instead. Using cell_names if cell_names is not None else (region_names if region_names is not None else []) would correctly distinguish "not provided" from "explicitly empty." Current in-repo callers aren't affected because they never pass both parameters, but this could bite getsentry callers during the synchronization window.


more region to cell renaming