-
Notifications
You must be signed in to change notification settings - Fork 23
fix: start dev on podman does not work if odo can't retrieve podman status #773
fix: start dev on podman does not work if odo can't retrieve podman status #773
Conversation
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
return; | ||
} | ||
try { | ||
e.getPresentation().setEnabled(odo.checkPodman()); |
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.
Actual fix is here
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.
Is this the fix for the following when using IU-2023.3
?
Screen.Recording.2024-04-09.at.16.47.56.mov
com.intellij.diagnostic.PluginException: 316 ms to call on EDT DevOnPodmanComponentAction#Update@MainMenu (org.jboss.tools.intellij.openshift.actions.component.DevOnPodmanComponentAction). Revise AnAction.getActionUpdateThread property [Plugin: org.jboss.tools.intellij.openshift]
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.computeOnEdt(ActionUpdater.kt:223)
at com.intellij.openapi.actionSystem.impl.ActionUpdater.access$computeOnEdt(ActionUpdater.kt:71)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$computeOnEdt$1.invokeSuspend(ActionUpdater.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: java.lang.Throwable: EDT-trace-at-264-ms (4/5)
at java.base@17.0.9/java.lang.Object.wait(Native Method)
at java.base@17.0.9/java.lang.Object.wait(Object.java:338)
at java.base@17.0.9/java.lang.ProcessImpl.waitFor(ProcessImpl.java:434)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:323)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:253)
at com.redhat.devtools.intellij.common.utils.ExecHelper.executeWithResult(ExecHelper.java:258)
at org.jboss.tools.intellij.openshift.utils.odo.OdoCli.execute(OdoCli.java:158)
at org.jboss.tools.intellij.openshift.utils.odo.OdoCli.execute(OdoCli.java:176)
at org.jboss.tools.intellij.openshift.utils.odo.OdoCli.checkPodman(OdoCli.java:814)
at org.jboss.tools.intellij.openshift.tree.application.ApplicationRootNodeOdo.checkPodman(ApplicationRootNodeOdo.java:360)
at org.jboss.tools.intellij.openshift.actions.component.DevOnPodmanComponentAction.update(DevOnPodmanComponentAction.java:59)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:164)
at com.intellij.openapi.actionSystem.ex.ActionUtil$$Lambda$1521/0x000000f000d62bd0.run(Unknown Source)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:187)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.doUpdate(ActionUpdater.kt:696)
at com.intellij.openapi.actionSystem.impl.ActionUpdaterKt.access$doUpdate(ActionUpdater.kt:1)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:110)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$updateActionReal$success$1.invoke(ActionUpdater.kt:109)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$callAction$4.invoke(ActionUpdater.kt:178)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$computeOnEdt$2.invoke(ActionUpdater.kt:204)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$computeOnEdt$deferred$1$1.invoke(ActionUpdater.kt:468)
at com.intellij.openapi.progress.CoroutinesKt.blockingContextInner(coroutines.kt:321)
at com.intellij.openapi.progress.CoroutinesKt.access$blockingContextInner(coroutines.kt:1)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invokeSuspend(coroutines.kt:198)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at com.intellij.openapi.progress.CoroutinesKt$blockingContext$2.invoke(coroutines.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:197)
at com.intellij.openapi.actionSystem.impl.ActionUpdater$computeOnEdt$deferred$1.invokeSuspend(ActionUpdater.kt:467)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at com.intellij.openapi.actionSystem.impl.UtilsKt$runBlockingForActionExpand$1.invoke(Utils.kt:1108)
at com.intellij.openapi.actionSystem.impl.UtilsKt$runBlockingForActionExpand$1.invoke(Utils.kt:1105)
at com.intellij.openapi.progress.ContextKt.prepareThreadContext(context.kt:86)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupImpl(Utils.kt:1130)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu$intellij_platform_ide_impl(Utils.kt:394)
at com.intellij.openapi.actionSystem.impl.Utils.fillPopupMenu(Utils.kt:366)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.updateChildren(ActionPopupMenuImpl.java:174)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:124)
at com.intellij.ui.PopupHandler$2.invokePopup(PopupHandler.java:142)
at com.intellij.ui.PopupHandler.mousePressed(PopupHandler.java:47)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:288)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6654)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
at com.intellij.ui.treeStructure.Tree.processMouseEvent(Tree.java:434)
at java.desktop/java.awt.Component.processEvent(Component.java:6422)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4969)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4580)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4524)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2809)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4855)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:794)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:733)
at java.base@17.0.9/java.security.AccessController.executePrivileged(AccessController.java:776)
at java.base@17.0.9/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base@17.0.9/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base@17.0.9/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:766)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:764)
at java.base@17.0.9/java.security.AccessController.executePrivileged(AccessController.java:776)
at java.base@17.0.9/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base@17.0.9/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:763)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:695)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:635)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:580)
at com.intellij.ide.IdeEventQueue$$Lambda$2172/0x000000f00144bba8.run(Unknown Source)
at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:580)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
at com.intellij.ide.IdeEventQueueKt$$Lambda$1336/0x000000f000b36dd0.run(Unknown Source)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueue$$Lambda$1329/0x000000f000b335c0.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
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.
nope
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.
works for me. LGTM.
I would have preferred to have the reformatting in a separate PR though because it's almost impossible to review 4000+ lines.
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.
Imho we should fix the fatal IDE error that I can reproduce in IU-2023.3
(see #773 (comment))
Signed-off-by: Stephane Bouchet <[email protected]>
Yes, totally agree. as tests are failling, i'm going to a rabbit hole trying to refactor it rather than fixing it and focus on the actual isssue. |
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
@@ -59,10 +59,6 @@ public void update(AnActionEvent e) { | |||
} | |||
ComponentNode componentNode = (ComponentNode) node; | |||
Component component = componentNode.getComponent(); | |||
Odo odo = componentNode.getRoot().getOdo().getNow(null); |
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.
removed because it causes slow actions updates.
@@ -459,16 +459,18 @@ public List<URL> listURLs(String context) throws IOException { | |||
@Override | |||
public ComponentInfo getComponentInfo(String project, String component, String path, | |||
ComponentKind kind) throws IOException { | |||
boolean isPodmanPresent = !execute(command, envVars, "version").contains("unable to fetch the podman client version"); |
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.
podman check is now here, added as componentInfo status. This is done when loading tree component where the debug podman action resisdes.
@adietish please review. |
…tatus Signed-off-by: Stephane Bouchet <[email protected]>
|
/override ci/prow/e2e-openshift |
@sbouchet: Overrode contexts on behalf of sbouchet: ci/prow/e2e-openshift In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Other than maybe adding a unit test for the action, LGTM. Works for me.
assertTrue(componentInfo.getSupportedFeatures().contains(ComponentFeature.Mode.DEV_MODE)); | ||
assertEquals("Go", componentInfo.getComponentTypeName()); | ||
assertEquals("Go", componentInfo.getLanguage()); | ||
} | ||
|
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.
Maybe you could add a unit test in DevOnPodmanComponentActionTest
testing enablement when podman is present/not present?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adietish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What is the purpose of this change? What does it change?
Was the change discussed in an issue?
fixes #637
How to test changes?