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
Service accounts: Creation logic simplification #63884
Conversation
FWIW, you shouldn't have to do that, if there's a transaction on the context object, Grafana should reuse that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-63884-to-v9.4.x origin/v9.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 3fb1894739f0d9344065e4d8b61f5fb896f4c933
# Push it to GitHub
git push --set-upstream origin backport-63884-to-v9.4.x
git switch main
# Remove the local backport branch
git branch -D backport-63884-to-v9.4.x Then, create a pull request where the |
* SA creation improvements * PR feedback - put salt and rand back in and remove an unneeded line:
What is this feature?
Simplify the creation logic:
CreateServiceAccount
method in the user store;model.go
;Why do we need this feature?
Nested transactions caused issues with instances that have a limit on the number of DB sessions.
Other changes are mainly to simplify the code and make it easier to maintain.
Special notes for your reviewer:
Enterprise PR (a one line change): https://github.com/grafana/grafana-enterprise/pull/4712