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

improvement: add do not show bsp errors option #5678

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

kasiaMarek
Copy link
Contributor

Add possibility to stop showing bsp errors.

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

Thanks for the constant tweaks! We will get it right at some point 😅

)
} else {
(
makeLongMessage(message),
List(goToLogs, restartBuildServer, dismiss),
List(goToLogs, restartBuildServer, dismiss, doNotShowErrors),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
List(goToLogs, restartBuildServer, dismiss, doNotShowErrors),
List(goToLogs, dismiss, doNotShowErrors),

I am wondering it even help, most people will probably not restart or click mindlessly on it without looking into logs. We could mention it in the message. "the error might require restating build server"

@@ -62,6 +67,8 @@ class BspErrorHandler(
restartBspServer().ignoreValue
case BspErrorHandler.dismiss =>
Future.successful(dismissedErrors.add(message)).ignoreValue
case BspErrorHandler.doNotShowErrors =>
Future.successful { doNotShowErrors = true }
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's save it to database as in case of other notifications

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't we want to move this long term to bsp status + doctor anyway? Then this flag won't be needed anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm.... in that case yeah. Are we able to sensibly move it to status? We could add the option to disable for now until this is implemented

@kasiaMarek kasiaMarek requested a review from tgodzik October 2, 2023 14:10
@@ -0,0 +1,4 @@
-- If should show bsp errors
create table show_bsp_errors(
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add it to the notifications table, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somehow I wasn't aware we had such a generic mechanism for notifications.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry! Should have mentioned it earlier

@kasiaMarek kasiaMarek force-pushed the donot-show-bsp-errors branch from bca9601 to fda848a Compare October 3, 2023 15:34
@kasiaMarek kasiaMarek requested a review from tgodzik October 4, 2023 12:57
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

@kasiaMarek kasiaMarek merged commit e3b108a into scalameta:main Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants