getsentry / getsentry/sentry

Flaky test: tests/snuba/rules/conditions/test_event_frequency.py::PerfIssuePlatformIssueEventFrequencyPercentConditionTestCase::test_five_minutes_no_events

Open
#108,869 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

flaky-test Tests
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

Failing test: tests/snuba/rules/conditions/test_event_frequency.py::PerfIssuePlatformIssueEventFrequencyPercentConditionTestCase::test_five_minutes_no_events
Sentry sha: ba9677707d394a61f057f87937c18f1837cc1b94
Run: https://github.com/getsentry/sentry/actions/runs/22269765006

.venv/lib/python3.13/site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.venv/lib/python3.13/site-packages/urllib3/connectionpool.py:534: in _make_request
    response = conn.getresponse()
.venv/lib/python3.13/site-packages/urllib3/connection.py:571: in getresponse
    httplib_response = super().getresponse()
.venv/lib/python3.13/site-packages/sentry_sdk/integrations/stdlib.py:132: in getresponse
    return real_getresponse(self, *args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:1428: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:331: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:300: in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
E   http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:
.venv/lib/python3.13/site-packages/requests/adapters.py:667: in send
    resp = conn.urlopen(
.venv/lib/python3.13/site-packages/urllib3/connectionpool.py:841: in urlopen
    retries = retries.increment(
.venv/lib/python3.13/site-packages/urllib3/util/retry.py:490: in increment
    raise reraise(type(error), error, _stacktrace)
.venv/lib/python3.13/site-packages/urllib3/util/util.py:38: in reraise
    raise value.with_traceback(tb)
.venv/lib/python3.13/site-packages/urllib3/connectionpool.py:787: in urlopen
    response = self._make_request(
.venv/lib/python3.13/site-packages/urllib3/connectionpool.py:534: in _make_request
    response = conn.getresponse()
.venv/lib/python3.13/site-packages/urllib3/connection.py:571: in getresponse
    httplib_response = super().getresponse()
.venv/lib/python3.13/site-packages/sentry_sdk/integrations/stdlib.py:132: in getresponse
    return real_getresponse(self, *args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:1428: in getresponse
    response.begin()
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:331: in begin
    version, status, reason = self._read_status()
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/http/client.py:300: in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
E   urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:
tests/snuba/rules/conditions/test_event_frequency.py:1325: in test_five_minutes_no_events
    self._make_sessions(60)
tests/snuba/rules/conditions/test_event_frequency.py:67: in _make_sessions
    self.bulk_store_sessions([make_session(i) for i in range(num)])
src/sentry/testutils/cases.py:1498: in bulk_store_sessions
    self.store_session(session)
src/sentry/testutils/cases.py:1471: in store_session
    push(SessionMRI.RAW_SESSION.value, {"session.status": "init"}, +1)
src/sentry/testutils/cases.py:1455: in push
    self.store_metric(
src/sentry/testutils/cases.py:1603: in store_metric
    cls.__send_buckets([msg], entity)
src/sentry/testutils/cases.py:1618: in __send_buckets
    assert (
.venv/lib/python3.13/site-packages/requests/api.py:115: in post
    return request("post", url, data=data, json=json, **kwargs)
.venv/lib/python3.13/site-packages/requests/api.py:59: in request
    return session.request(method=method, url=url, **kwargs)
.venv/lib/python3.13/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.venv/lib/python3.13/site-packages/requests/sessions.py:703: in send
    r = adapter.send(request, **kwargs)
.venv/lib/python3.13/site-packages/requests/adapters.py:682: in send
    raise ConnectionError(err, request=request)
E   requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running tests/snuba/rules/conditions/test_event_frequency.py::PerfIssuePlatformIssueEventFrequencyPercentConditionTestCase::test_five_minutes_no_events and inspect _make_sessions in that file. Trace the session storage path through src/sentry/testutils/cases.py, especially store_session, store_metric, and __send_buckets, where the RemoteDisconnected failure occurs. Done means the named test passes reliably without this connection failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.