getsentry / getsentry/sentry

Flaky test: tests/sentry/users/services/test_user_impl.py::DatabaseBackedUserService::test_get_or_create_user

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

Nobody has claimed this yet.

flaky-test
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/22283661627

tests/sentry/users/services/test_user_impl.py:33: in test_get_or_create_user
    assert user1.id == result.user.id
E   AssertionError: assert 780 == 781
E    +  where 780 = <User at 0x7f61ce775f30: id=780>.id
E    +  and   781 = RpcUser(id=781, pk=781, name='', email='test@email.com', username='2', actor_id=None, display_name='test@email.com', l...zenset(), permissions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]).id
E    +    where RpcUser(id=781, pk=781, name='', email='test@email.com', username='2', actor_id=None, display_name='test@email.com', l...zenset(), permissions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]) = UserCreateResult(user=RpcUser(id=781, pk=781, name='', email='test@email.com', username='2', actor_id=None, display_na...sions=frozenset(), avatar=None, emails=frozenset({'test@email.com'}), useremails=[], authenticators=[]), created=False).user

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 with tests/sentry/users/services/test_user_impl.py::DatabaseBackedUserService::test_get_or_create_user and reproduce it using the linked GitHub Actions run context if available. Trace the get-or-create path around the failing assertion, then verify the test consistently returns the expected user identity and passes reliably.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.