-
Notifications
You must be signed in to change notification settings - Fork 153
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
SLI-378 Prefer PasswordSafe to PasswordUtil #858
base: master
Are you sure you want to change the base?
SLI-378 Prefer PasswordSafe to PasswordUtil #858
Conversation
064e677
to
bbc1101
Compare
Quality Gate passedKudos, no new issues are introduced in this PR! 0 New issues |
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.
Looks mostly good to me, there is just this nightmare issue with slow operations on EDT
} | ||
|
||
private fun loadCredentials(connectionId: String): ServerConnectionCredentials? { | ||
val token = PasswordSafe.instance.getPassword(tokenCredentials(connectionId)) |
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.
This is a slow operation and it should not be run on the EDT 😢
This is especially annoying because it is called from each IssueNode
when rendering
2 stack traces I got:
2023-11-02 11:06:53,403 [ 22494] SEVERE - #c.i.u.SlowOperations - Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.intellij.util.SlowOperations.assertNonCancelableSlowOperationsAreAllowed(SlowOperations.java:115)
at com.intellij.ide.passwordSafe.impl.BasePasswordSafe.get(PasswordSafeImpl.kt:93)
at com.intellij.credentialStore.CredentialStore.getPassword(CredentialStore.java:30)
at org.sonarlint.intellij.config.global.ServerConnectionService.loadCredentials(ServerConnectionService.kt:128)
at org.sonarlint.intellij.config.global.ServerConnectionService.getConnections(ServerConnectionService.kt:52)
at org.sonarlint.intellij.core.ProjectBindingManager.tryGetServerConnection(ProjectBindingManager.java:148)
at org.sonarlint.intellij.ui.nodes.IssueNode.retrieveServerConnection(IssueNode.java:59)
at org.sonarlint.intellij.ui.nodes.IssueNode.doRender(IssueNode.java:71)
at org.sonarlint.intellij.ui.nodes.IssueNode.lambda$render$0(IssueNode.java:67)
[...]
at org.sonarlint.intellij.common.ui.ReadActionUtils$Companion.runReadActionSafely(ReadActionUtils.kt:34)
at org.sonarlint.intellij.common.ui.ReadActionUtils.runReadActionSafely(ReadActionUtils.kt)
at org.sonarlint.intellij.ui.nodes.IssueNode.render(IssueNode.java:67)
at org.sonarlint.intellij.ui.tree.TreeCellRenderer.customizeCellRenderer(TreeCellRenderer.java:37)
[...]
at org.sonarlint.intellij.core.ProjectBindingManager.bindTo(ProjectBindingManager.java:188)
at org.sonarlint.intellij.config.project.SonarLintProjectSettingsPanel.save(SonarLintProjectSettingsPanel.java:105)
at org.sonarlint.intellij.config.project.SonarLintProjectConfigurable.apply(SonarLintProjectConfigurable.java:96)
2023-11-02 11:06:44,520 [ 13611] SEVERE - #c.i.u.SlowOperations - Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.intellij.util.SlowOperations.assertNonCancelableSlowOperationsAreAllowed(SlowOperations.java:115)
at com.intellij.ide.passwordSafe.impl.BasePasswordSafe.get(PasswordSafeImpl.kt:93)
at com.intellij.credentialStore.CredentialStore.getPassword(CredentialStore.java:30)
at org.sonarlint.intellij.config.global.ServerConnectionService.loadCredentials(ServerConnectionService.kt:128)
at org.sonarlint.intellij.config.global.ServerConnectionService.getConnections(ServerConnectionService.kt:52)
at org.sonarlint.intellij.config.global.ServerConnectionService.connectionExists(ServerConnectionService.kt:76)
at org.sonarlint.intellij.config.project.SonarLintProjectBindPanel.onConnectionSelected(SonarLintProjectBindPanel.java:158)
at org.sonarlint.intellij.config.project.SonarLintProjectBindPanel$ServerItemListener.itemStateChanged(SonarLintProjectBindPanel.java:415)
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.
😡 I did not face it on my side... Thanks for testing, I will have to rework the PR then, I will ping you when it's done
bbc1101
to
421df9e
Compare
421df9e
to
4e749ec
Compare
No description provided.