intellij-openshift-connector
intellij-openshift-connector copied to clipboard
feat: allow to use helm values when installing chart (#609)
fixes #609
Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all
Quality Gate failed
Failed conditions
1 Security Hotspot
0.7% Coverage on New Code (required ≥ 80%)
D Reliability Rating on New Code (required ≥ A)
See analysis details on SonarCloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
@adietish : can you rebase this one ?
To test this do the following:
Steps:
- ASSERT: use crc or sandbox
- EXEC: in the ctx menu of the current namespace pick "Install Helm Charts"
- ASSERT: dialog listing the available charts shows up
- EXEC: select "wildfly/wildfly" and hit "Install" in the details panel
- ASSERT: a form where you can provide the instance name and the helm values shows up
- EXEC: pick "wild1" as name and hit "Install"
- ASSERT: installation fails complaining about missing git source repository
- EXEC: change name to "wild2"
- ASSERT: editor shows up again (hides the installation result)
- EXEC: replace the editor with the following:
build:
uri: https://github.com/wildfly/quickstart.git
ref: 27.0.0.Final
contextDir: microprofile-config
mode: bootable-jar
env:
- name: MAVEN_ARGS_APPEND
# Use the bootable-jar-openshift profile to ensure that the application
# can be deployed on OpenShift but disable JKube as the image will be
# built and deployed by this chart.
value: -Pbootable-jar-openshift -Djkube.skip=true
deploy:
replicas: 1
env:
- name: CONFIG_PROP
value: Hello from OpenShift
Result: Wildfly running the quickstart was installed.
To verify that it's running you can do the following:
- EXEC: switch to intellij-kubernetes tool window
- EXEC: navigate to
[sandbox] > Network > Routes > wild2
and double click it. - EXEC: in the editor go to
spec > host
, copy the hostname and paste it into your navigator
Result: You get greeted with the output of the hellow world app for wildfly:
Hello World!
Trying out several charts, modifying values / testing validation, all works fine.
however, the UI does not scale on labels, see below screenshot around "active namespace"
also got the below stack (memory leak on the editor part)
2024-07-05 16:10:06,464 [1212511] SEVERE - #c.i.o.u.ObjectTree - Memory leak detected: 'com.intellij.openapi.editor.impl.view.EditorView@4e94399f' (class com.intellij.openapi.editor.impl.view.EditorView) was registered in Disposer as a child of 'ROOT_DISPOSABLE' (class com.intellij.openapi.util.Disposer$2) but wasn't disposed.
Register it with a proper parentDisposable or ensure that it's always disposed by direct Disposer.dispose call.
See https://jetbrains.org/intellij/sdk/docs/basics/disposers.html for more details.
The corresponding Disposer.register() stacktrace is shown as the cause:
java.lang.RuntimeException: Memory leak detected: 'com.intellij.openapi.editor.impl.view.EditorView@4e94399f' (class com.intellij.openapi.editor.impl.view.EditorView) was registered in Disposer as a child of 'ROOT_DISPOSABLE' (class com.intellij.openapi.util.Disposer$2) but wasn't disposed.
Register it with a proper parentDisposable or ensure that it's always disposed by direct Disposer.dispose call.
See https://jetbrains.org/intellij/sdk/docs/basics/disposers.html for more details.
The corresponding Disposer.register() stacktrace is shown as the cause:
at com.intellij.openapi.util.ObjectNode.assertNoChildren(ObjectNode.java:45)
at com.intellij.openapi.util.ObjectTree.assertIsEmpty(ObjectTree.java:219)
at com.intellij.openapi.util.Disposer.assertIsEmpty(Disposer.java:223)
at com.intellij.openapi.util.Disposer.assertIsEmpty(Disposer.java:217)
at com.intellij.openapi.application.impl.ApplicationImpl.disposeContainer(ApplicationImpl.java:197)
at com.intellij.openapi.application.impl.ApplicationImpl.destructApplication(ApplicationImpl.java:620)
at com.intellij.openapi.application.impl.ApplicationImpl.doExit(ApplicationImpl.java:551)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:536)
at com.intellij.openapi.application.impl.ApplicationImpl.exit(ApplicationImpl.java:525)
at com.intellij.openapi.application.ex.ApplicationEx.exit(ApplicationEx.java:78)
at com.intellij.ide.actions.ExitAction.actionPerformed(ExitAction.java:30)
at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:305)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks$lambda$4(ActionUtil.kt:276)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1161)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.kt:275)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction$lambda$5(ActionMenuItem.kt:269)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:227)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.kt:260)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem._init_$lambda$0(ActionMenuItem.kt:71)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed$lambda$4(ActionMenuItem.kt:102)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.kt:101)
at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:525)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
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:4583)
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/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/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/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/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:698)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.kt:637)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$10(IdeEventQueue.kt:584)
at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138)
at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:584)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:77)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:362)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:361)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:361)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:356)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1021)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1021)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:356)
at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:209)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:398)
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)
Caused by: java.lang.Throwable
at com.intellij.openapi.util.ObjectNode.<init>(ObjectNode.java:24)
at com.intellij.openapi.util.ObjectNode.findOrCreateChildNode(ObjectNode.java:140)
at com.intellij.openapi.util.ObjectTree.register(ObjectTree.java:52)
at com.intellij.openapi.util.Disposer.register(Disposer.java:156)
at com.intellij.openapi.editor.impl.view.EditorView.<init>(EditorView.java:96)
at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:450)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.doCreateEditor(EditorFactoryImpl.java:222)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:203)
at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:196)
at org.jboss.tools.intellij.openshift.ui.helm.install.ValuesEditor.createEditor(ValuesEditor.java:128)
at org.jboss.tools.intellij.openshift.ui.helm.install.ValuesEditor.createYamlEditor(ValuesEditor.java:112)
at org.jboss.tools.intellij.openshift.ui.helm.install.ValuesEditor.showValues(ValuesEditor.java:67)
at org.jboss.tools.intellij.openshift.ui.helm.install.ValuesOrResultPanel.showChartValues(ValuesOrResultPanel.java:49)
at org.jboss.tools.intellij.openshift.ui.helm.install.InstallPanel.lambda$loadAndShowChartValues$3(InstallPanel.java:187)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.RwLockHolder.runIntendedWriteActionOnCurrentThread(RwLockHolder.kt:204)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:419)
at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:138)
at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:129)
at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1152)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:81)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:123)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:792)
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/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:761)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:698)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$12(IdeEventQueue.kt:593)
at com.intellij.openapi.application.impl.RwLockHolder.runWithoutImplicitRead(RwLockHolder.kt:105)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:593)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:77)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:362)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:361)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:361)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:356)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1021)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
... 11 more
2024-07-05 16:10:06,466 [1212513] SEVERE - #c.i.o.u.ObjectTree - IntelliJ IDEA 2024.1 Build #IU-241.14494.240
2024-07-05 16:10:06,466 [1212513] SEVERE - #c.i.o.u.ObjectTree - JDK: 17.0.10; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-07-05 16:10:06,466 [1212513] SEVERE - #c.i.o.u.ObjectTree - OS: Linux
2024-07-05 16:10:06,467 [1212514] SEVERE - #c.i.o.u.ObjectTree - Plugin to blame: OpenShift Toolkit by Red Hat version: 1.9.1-SNAPSHOT
@sbouchet fixed both issues. Please re-review.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: sbouchet
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [sbouchet]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
New changes are detected. LGTM label has been removed.
/override ci/prow/e2e-openshift
@adietish: Overrode contexts on behalf of adietish: ci/prow/e2e-openshift
In response to this:
/override ci/prow/e2e-openshift
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-sigs/prow repository.