Flaky test: tests/sentry/users/services/test_user_impl.py::DatabaseBackedUserService::test_get_or_create_user
Open
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/sentry/users/services/test_user_impl.py::DatabaseBackedUserService::test_get_or_create_user
Sentry sha: 4a8dadc9c184ad93a761561c5f57437a29cd3300
Run: https://github.com/getsentry/sentry/actions/runs/22283661245
[1m[31mtests/sentry/users/services/test_user_impl.py[0m:33: in test_get_or_create_user
assert user1.id == result.user.id
[1m[31mE AssertionError: assert 3039 == 3040[0m
[1m[31mE + where 3039 = <User at 0x7f7a7d2bf5c0: id=3039>.id[0m
[1m[31mE + and 3040 = RpcUser(id=3040, pk=3040, name='', email='test@email.com', username='2', actor_id=None, display_name='test@email.com',...zenset(), permissions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]).id[0m
[1m[31mE + where RpcUser(id=3040, pk=3040, name='', email='test@email.com', username='2', actor_id=None, display_name='test@email.com',...zenset(), permissions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]) = UserCreateResult(user=RpcUser(id=3040, pk=3040, name='', email='test@email.com', username='2', actor_id=None, display_...sions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]), created=False).user[0m
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/sentry/users/services/test_user_impl.py::DatabaseBackedUserService::test_get_or_create_user and reproduce the failure from the linked Actions run or local test command. Trace why the returned RpcUser id differs from user1.id, then verify the test passes consistently without the 3039/3040 mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100