getsentry / getsentry/sentry

Flaky test: tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py::OrganizationUptimeAlertIndexEndpointTest::test_owner_filter

Open
#108,890 1 comment 0 reactions 0 assignees View on GitHub
flaky-test Tests
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

Failing test: `tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py::OrganizationUptimeAlertIndexEndpointTest::test_owner_filter`
Sentry sha: ab471d2d1ede60c8a8c1e3911b78a71a83261eae
Run: https://github.com/getsentry/sentry/actions/runs/22271634857

```
tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py:65: in test_owner_filter
self.check_valid_response(response, [uptime_a, uptime_b, uptime_c])
tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py:15: in check_valid_response
assert [
E AssertionError: assert [{'assertion'...opment', ...}] == [{'assertion'...opment', ...}]
E 
E At index 0 diff: {'id': '4094', 'projectSlug': 'bar', 'environment': 'development', 'name': 'Cosmic Jawfish', 'status': 'active', 'uptimeStatus': , 'mode': 3, 'owner': {'type': 'user', 'id': '2688', 'name': '7736994d727e4729a5fcd41ee6dd7a7b@example.com', 'email': '7736994d727e4729a5fcd41ee6dd7a7b@example.com'}, 'recoveryThreshold': 1, 'downtimeThreshold': 3, 'url': 'http://Close-Civet.com', 'method': 'GET', 'body': None, 'headers': [], 'intervalSeconds': 60, 'timeoutMs': 100, 'traceSampling': False, 'responseCaptureEnabled': True, 'assertion': None} != {'id': '4096', 'projectSlug': 'bar', 'environment': 'development', 'name': 'Humble Mite', 'status': 'active', 'uptimeStatus': , 'mode': 3, 'owner': {'type': 'team', 'id': '4557676260622336', 'name': 'eminent-oriole'}, 'recoveryThreshold': 1, 'downtimeThreshold': 3, 'url': 'http://Epic-Tuna.com', 'method': 'GET', 'body': None, 'headers': [], 'intervalSeconds': 60, 'timeoutMs': 100, 'traceSampling': False, 'responseCaptureEnabled': True, 'assertion': None}
E 
E Full diff:
E [
E - {
E - 'assertion': None,
E - 'body': None,
E - 'downtimeThreshold': 3,
E - 'environment': 'development',
E - 'headers': [],
E - 'id': '4096',
E - 'intervalSeconds': 60,
E - 'method': 'GET',
E - 'mode': 3,
E - 'name': 'Humble Mite',
E - 'owner': {
E - 'id': '4557676260622336',
E - 'name': 'eminent-oriole',
E - 'type': 'team',
E - },
E - 'projectSlug': 'bar',
E - 'recoveryThreshold': 1,
E - 'responseCaptureEnabled': True,
E - 'status': 'active',
E - 'timeoutMs': 100,
E - 'traceSampling': False,
E - 'uptimeStatus': ,
E - 'url': 'http://Epic-Tuna.com',
E - },
E {
E 'assertion': None,
E 'body': None,
E 'downtimeThreshold': 3,
E 'environment': 'development',
E 'headers': [],
E 'id': '4094',
E 'intervalSeconds': 60,
E 'method': 'GET',
E 'mode': 3,
E 'name': 'Cosmic Jawfish',
E 'owner': {
E 'email': '7736994d727e4729a5fcd41ee6dd7a7b@example.com',
E 'id': '2688',
E 'name': '7736994d727e4729a5fcd41ee6dd7a7b@example.com',
E 'type': 'user',
E },
E 'projectSlug': 'bar',
E 'recoveryThreshold': 1,
E 'responseCaptureEnabled': True,
E 'status': 'active',
E 'timeoutMs': 100,
E 'traceSampling': False,
E 'uptimeStatus': ,
E 'url': 'http://Close-Civet.com',
E },
E {
E 'assertion': None,
E 'body': None,
E 'downtimeThreshold': 3,
E 'environment': 'development',
E 'headers': [],
E 'id': '4095',
E 'intervalSeconds': 60,
E 'method': 'GET',
E 'mode': 3,
E 'name': 'Precise Spider',
E 'owner': {
E 'email': 'aa3b93a1a5cc4332b1222aafbc77827e@example.com',
E 'id': '2689',
E 'name': 'aa3b93a1a5cc4332b1222aafbc77827e@example.com',
E 'type': 'user',
E },
E 'projectSlug': 'bar',
E 'recoveryThreshold': 1,
E 'responseCaptureEnabled': True,
E 'status': 'active',
E 'timeoutMs': 100,
E 'traceSampling': False,
E 'uptimeStatus': ,
E 'url': 'http://Sound-Hippo.com',
E },
E + {
E + 'assertion': None,
E + 'body': None,
E + 'downtimeThreshold': 3,
E + 'environment': 'development',
E + 'headers': [],
E + 'id': '4096',
E + 'intervalSeconds': 60,
E + 'method': 'GET',
E + 'mode': 3,
E + 'name': 'Humble Mite',
E + 'owner': {
E + 'id': '4557676260622336',
E + 'name': 'eminent-oriole',
E + 'type': 'team',
E + },
E + 'projectSlug': 'bar',
E + 'recoveryThreshold': 1,
E + 'responseCaptureEnabled': True,
E + 'status': 'active',
E + 'timeoutMs': 100,
E + 'traceSampling': False,
E + 'uptimeStatus': ,
E + 'url': 'http://Epic-Tuna.com',
E + },
E ]
```

Contributor guide

Open the contributing guide

Research direction

Start with tests/sentry/uptime/endpoints/test_organization_uptime_alert_index.py, especially test_owner_filter and its check_valid_response helper. Run the named test and compare the expected and actual response ordering shown in the failure; done means the test passes reliably without the reported mismatch.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.