eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Add JetBrains GoLand IDE integration #23229

Open azatsarynnyy opened 1 day ago

azatsarynnyy commented 1 day ago

Is your task related to a problem? Please describe

When running a workspace from the Go Runtime sample with the JetBrains GoLand IDE, the Dashboard displays the following message: image

Describe the solution you'd like

We need to fix the problem reported by the GoLand IDE backend process when running from the Go Runtime sample:

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /opt/app-root/src/.npm
npm ERR! errno -13
npm ERR! 
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR! 
npm ERR! To permanently fix this problem, please run:
npm ERR!   sudo chown -R 1001270000:0 "/opt/app-root/src/.npm"

npm ERR! Log files were not written due to an error writing to the directory: /opt/app-root/src/.npm/_logs
npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal
Status app is listening on port 3400

**Start Failed**

Internal error

java.nio.file.AccessDeniedException: /opt/app-root/src/.config
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:438)
        at java.base/java.nio.file.Files.createDirectory(Files.java:699)
        at com.intellij.openapi.util.io.NioFiles.tryCreateDirectory(NioFiles.java:96)
        at com.intellij.openapi.util.io.NioFiles.createDirectories(NioFiles.java:89)
        at com.intellij.openapi.util.io.NioFiles.createDirectories(NioFiles.java:88)
        at com.intellij.openapi.util.io.NioFiles.createDirectories(NioFiles.java:88)
        at com.intellij.platform.ide.bootstrap.DirectoryLock.lockOrActivate(DirectoryLock.java:148)
        at com.intellij.platform.ide.bootstrap.StartupUtil$lockSystemDirs$result$1.invokeSuspend(startup.kt:500)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

-----
JRE: 21.0.4+13-b509.17 amd64 (JetBrains s.r.o.)
/idea-server/jbr

Describe alternatives you've considered

No response

Additional context

No response

AObuchow commented 1 day ago

@azatsarynnyy FWIW, the Go Runtime sample has $HOME set to /opt/app-root/src/ which is not writeable. We encountered something similar for DWO but in our case, we are most likely just going to abort if $HOME is not writeable, which doesn't seem to be the correct solution for this issue (since then, the IDE won't start).