Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Fix delete user failure due to quota not enabled #59875

Merged
merged 1 commit into from Dec 6, 2022

Conversation

papagian
Copy link
Contributor

@papagian papagian commented Dec 6, 2022

What is this feature?

It fixes DELETE /admin/users/{user_id} failure:

logger=context userId=1 orgId=1 uname=admin t=2022-12-06T13:42:36.369981+02:00 level=error msg="Failed to delete user" error="[quota.disabled] " remote_addr=[::1] traceID=

This bug was introduced in #58643; there is a different quota implementation depending on whether quotas are enabled or not. The serviceDisabled should not propagate the error for methods that are called by APIs other than the quota related ones.

Why do we need this feature?

[Add a description of the problem the feature is trying to solve.]

Who is this feature for?

[Add information on what kind of user the feature is for.]

Which issue(s) does this PR fix?:

Fixes #59781

Special notes for your reviewer:
This fix however has as a side effect possible orphan entries in the quota table for the deleted user if the quota are not enabled given that this call no more returns an error if the service is disabled.

@papagian papagian added this to the 9.3.2 milestone Dec 6, 2022
@papagian papagian requested a review from a team as a code owner December 6, 2022 12:04
@papagian papagian requested review from sakjur, zserge and yangkb09 and removed request for a team December 6, 2022 12:04
@papagian papagian merged commit 4259b6b into main Dec 6, 2022
@papagian papagian deleted the papagian/59781-fix branch December 6, 2022 13:02
grafanabot pushed a commit that referenced this pull request Dec 6, 2022
papagian added a commit that referenced this pull request Dec 6, 2022
API: Fix delete user failure due to quota not enabled (#59875)

(cherry picked from commit 4259b6b)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
GuYounes pushed a commit to paul-wurth/BIXpert that referenced this pull request Feb 8, 2023
…na#59879)

API: Fix delete user failure due to quota not enabled (grafana#59875)

(cherry picked from commit 4259b6b)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin/User: 500 error when deleting a user, but user still deleted
3 participants