Skip to content

Deleting a user account deletes all of the data associated with that user #494

Description

@poswald

While upgrading from sentry 3.8.2 to the latest my user account threw a ValueError similar to this one:

File "django/core/handlers/base.py", line 168, in get_response
receivers = signals.got_request_exception.send(sender=self.__class__, request=request)
File "django/utils/decorators.py", line 99, in _wrapped_view
raise
File "sentry/web/frontend/accounts.py", line 25, in login
if form.is_valid():
File "django/forms/forms.py", line 121, in is_valid
return self.is_bound and not bool(self.errors)
File "django/forms/forms.py", line 112, in _get_errors
self.full_clean()
File "django/forms/forms.py", line 268, in full_clean
self._clean_form()
File "django/forms/forms.py", line 298, in _clean_form
self._errors[NON_FIELD_ERRORS] = self.error_class(e.messages)
File "django/contrib/auth/forms.py", line 85, in clean
self.user_cache = authenticate(username=username, password=password)
File "django/contrib/auth/__init__.py", line 58, in authenticate
continue
File "django/contrib/auth/backends.py", line 21, in authenticate
return None
File "django/contrib/auth/models.py", line 275, in check_password
return check_password(raw_password, self.password) 
File "django/contrib/auth/models.py", line 42, in check_password
algo, salt, hsh = enc_password.split('$')

I decided that my user account was somehow invalid so I ran sentry repair and sentry cleanup and finally sentry createsuperuser to create a new account. Once logged into the system, I deleted my old account and renamed the new account to have the same name.

Somehow in this process I ended up with an empty sentry database and lost all of the event data in there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions