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

Config: Add configuration option to define custom user-facing general error message for certain error types #70023

Merged
merged 33 commits into from
Jun 16, 2023

Conversation

mmandrus
Copy link
Contributor

@mmandrus mmandrus commented Jun 13, 2023

What is this feature?

Currently, for detailed errors that we want to hide from front-end users, we display error messages saying things like "please inspect the server logs". This doesn't make sense for production deployments of Grafana where end users cannot check the logs themselves.

This feature adds a new config setting to customize this error message, and applies it throughout the backend where we found it was needed

Why do we need this feature?

Quality of life improvement for end users

Who is this feature for?

Users hosting production deployments of Grafana

Which issue(s) does this PR fix?:

Part one of #49441

Special notes
Corresponding Enterprise PR: https://github.com/grafana/grafana-enterprise/pull/5281

If there are any spots we missed, we will add them in follow-up PRs. Found each location by searching for the terms "inspect" and "server log"

@mmandrus mmandrus requested review from a team, sakjur, papagian and yangkb09 and removed request for a team June 13, 2023 16:35
@CLAassistant
Copy link

CLAassistant commented Jun 13, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ mmandrus
✅ summerwollin
❌ Summer Wollin


Summer Wollin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mmandrus mmandrus marked this pull request as ready for review June 13, 2023 18:03
@mmandrus mmandrus requested a review from torkelo as a code owner June 13, 2023 18:03
@mmandrus mmandrus requested a review from a team June 13, 2023 18:03
@mmandrus mmandrus requested a review from a team as a code owner June 13, 2023 18:03
@mmandrus mmandrus requested review from mdvictor and sjd210 and removed request for a team June 13, 2023 18:03
@mmandrus mmandrus requested a review from chri2547 as a code owner June 13, 2023 18:15
Copy link
Contributor

@suntala suntala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of small comments. I'm happy to approve this once the pipeline is green.

pkg/tsdb/sqleng/sql_engine.go Outdated Show resolved Hide resolved
conf/defaults.ini Outdated Show resolved Hide resolved
@mmandrus
Copy link
Contributor Author

@suntala We are having some CLA issues because Summer's local git config was messed up during a few commits. She corrected it to get the CLA check to pass, but subsequent pushes by me seem to be breaking it again.

Could you give an approval, given that we have both signed the CLA, and I will look for a repository admin to force the merge for us?

Copy link
Collaborator

@chri2547 chri2547 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a suggestion. Thank you.

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
pkg/tsdb/sqleng/sql_engine.go Outdated Show resolved Hide resolved
mmandrus and others added 3 commits June 16, 2023 10:20
@kminehart kminehart merged commit 66d2214 into main Jun 16, 2023
6 checks passed
@kminehart kminehart deleted the override-user-facing-error branch June 16, 2023 15:46
@zerok zerok modified the milestones: 10.0.x, 10.0.1, 10.1.x Jun 20, 2023
LudoVio pushed a commit that referenced this pull request Jun 26, 2023
… error message for certain error types (#70023)

---------

Co-authored-by: Summer Wollin <summer.wollin@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend datasource/MSSQL Microsoft SQL Server Data Source datasource/MySQL datasource/Postgres no-backport Skip backport of PR type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants