-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Go sample permission denied
issues with dependencies
#13823
Comments
When we fix this one, the realworld sample will probably also work and we could reconsider to include also that one into 7.0.0. |
After discussing with @sparkoo I believe this should be dealt with in Che 7 Endgame.
|
So the issue is that "/go" is first in the gopath in the devfile and go language tools are downloading dependencies there? |
@tsmaeder that's my theory. However, I don't know how to patch and deploy Go plugin locally so I haven't test it in Che. |
I think we have a few options (in order of preference):
|
I don't know that this issue has a convenient solution; Go has issues with developing outside of Go 1.11 adds "preliminary" support [1] for modules and 1.12 improves this [2] in preparation for it being a default in 1.13 later this year. This would resolve our issue, but
With our current version of Go, the solution would look something like
[1] - Docs on modules |
Wrong permissions for
|
I've just check the PR [1] and it works fine. [1] eclipse-che/che-theia#348 |
@tolusha any particular reason you're not proposing a PR with 2) and 3)? |
@tsmaeder I don't understand what you mean. |
Who is going to fix the devfile and plugin to use the new image? |
Nobody, the fix will be in the next build of go sidecar container. |
@sparkoo So can we consider this one fixed now? |
@tsmaeder I wasn't able to verify the fix yet. All che-theia containers I've tried still have the bug. Current default is |
@tolusha I've just tried with |
@sparkoo I've just checked and permissions are set correctly. Could you confirm pls? |
@tolusha ok, how could I test it? |
|
I see, now it is problem with
|
I've introduced PRs to fix the problem. |
yes, works now. thanks. |
@tolusha Has this fix made it into the plugin-registry/sidecar image? Using https://che-plugin-registry.prod-preview.openshift.io/ I'm not seeing the fix for our golang devfile. |
@amisevsk correct. |
Description
There are issues with current Go devfile sample https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/go. This is the sample project: https://github.com/golang/example. We have tasks just for its
outyet
part, which works ok. However, there are many other Go files with main functions. Problematic ones are those with 3rd party dependencies, like this one https://github.com/golang/example/blob/master/gotypes/skeleton/main.go. When theia tries to build the file, it fails withpermission denied
to/go
directory, when it try to download dependency there.Reproduction Steps
gotypes/skeleton/main.go
There is another issue with clone path #13796 which affects also this devfile. This patch has to be applied to the devfile. Without that, project is cloned to
... golang/example/example
. Once the issue is fixed, this patch must not be needed.OS and version:
7.0.0-rc-4.0-SNAPSHOT
Diagnostics:
running
go: Current GOPATH
task say/go:/projects is the current GOPATH.
I believe this is the issue.
GOPATH
set in the plugin here https://github.com/eclipse/che-plugin-registry/blob/master/v3/plugins/ms-vscode/go/0.11.0/meta.yaml#L20 have/go
as first and this is where it tries to download the dependency, but has no permissions there.The text was updated successfully, but these errors were encountered: