ricklamers / gridstudio

Grid studio is a web-based application for data science with full integration of open source data science frameworks and languages.
GNU Affero General Public License v3.0
8.88k stars 1.5k forks source link

Bring Go to 1.14.2 in Dockerfile #119

Closed gliptak closed 4 years ago

gliptak commented 4 years ago

@ricklamers please review

ricklamers commented 4 years ago

Looks like major version bump from 1.12 to 1.14. Did you try out whether it breaks something in the Go code (due to API changes)? Don't have time to test myself at the moment, and test coverage is abysmal (my fault 😀).

gliptak commented 4 years ago

@ricklamers ran the container locally. both show a panic when closing a workspace

updated

docker run --rm -p 8080:8080 -p 4430:4430 gridstudio:latest
--> Updating terminal app.js
--> Run manager proxy, starting manager.go (compiling with go run ...)
Listening on port: 8080
WS Listening on port: 4430
No session present for given session_uuid: 1b260155-4748-4875-9a98-e574ccbef808
2020/04/24 00:18:49 websocketproxy: couldn't dial to remote backend url dial tcp 127.0.0.1:0: connect: connection refused
Tried destroying session 1b260155-4748-4875-9a98-e574ccbef808, but sessions not in active usersessions.
0 user sessions active.
Hashed PW: 19yxYLFN-1h1mow8cpqDqLlgsHo=
Login, found user matching hashed PW.
No uuid found, creating new WorkSession and processes
Create users session with UUID: 3613dcd0-573b-46c0-87b6-2617c1dde6b7.
1 user sessions active.
[Spawn] Tried creating processes GoCmd and NodeCmd
2020/04/24 00:20:10 http: panic serving 172.17.0.1:50568: runtime error: invalid memory address or nil pointer dereference
goroutine 66 [running]:
net/http.(*conn).serve.func1(0xc000308000)
    /usr/local/go/src/net/http/server.go:1772 +0x139
panic(0x89e680, 0xe34fb0)
    /usr/local/go/src/runtime/panic.go:975 +0x3e3
main.destructSession(0xc0000f208e, 0x24, 0xc00009ae40, 0xc00009ae70)
    /home/source/proxy/manager.go:217 +0x128
main.main.func16(0x9a3c40, 0xc0001120e0, 0xc000317000)
    /home/source/proxy/manager.go:778 +0xfa
net/http.HandlerFunc.ServeHTTP(0xc0000a63c0, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2012 +0x44
net/http.(*ServeMux).ServeHTTP(0xe7d6c0, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2387 +0x1a5
net/http.serverHandler.ServeHTTP(0xc000112000, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2807 +0xa3
net/http.(*conn).serve(0xc000308000, 0x9a4800, 0xc00030e000)
    /usr/local/go/src/net/http/server.go:1895 +0x86c
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2933 +0x35c
Tried destroying session 3613dcd0-573b-46c0-87b6-2617c1dde6b7, but sessions not in active usersessions.
0 user sessions active.

current

docker run --rm -p 8080:8080 -p 4430:4430 gridstudio:latest
--> Updating terminal app.js
--> Run manager proxy, starting manager.go (compiling with go run ...)
Listening on port: 8080
WS Listening on port: 4430
No session present for given session_uuid: 1b260155-4748-4875-9a98-e574ccbef808
2020/04/24 00:18:49 websocketproxy: couldn't dial to remote backend url dial tcp 127.0.0.1:0: connect: connection refused
Tried destroying session 1b260155-4748-4875-9a98-e574ccbef808, but sessions not in active usersessions.
0 user sessions active.
Hashed PW: 19yxYLFN-1h1mow8cpqDqLlgsHo=
Login, found user matching hashed PW.
No uuid found, creating new WorkSession and processes
Create users session with UUID: 3613dcd0-573b-46c0-87b6-2617c1dde6b7.
1 user sessions active.
[Spawn] Tried creating processes GoCmd and NodeCmd
2020/04/24 00:20:10 http: panic serving 172.17.0.1:50568: runtime error: invalid memory address or nil pointer dereference
goroutine 66 [running]:
net/http.(*conn).serve.func1(0xc000308000)
    /usr/local/go/src/net/http/server.go:1772 +0x139
panic(0x89e680, 0xe34fb0)
    /usr/local/go/src/runtime/panic.go:975 +0x3e3
main.destructSession(0xc0000f208e, 0x24, 0xc00009ae40, 0xc00009ae70)
    /home/source/proxy/manager.go:217 +0x128
main.main.func16(0x9a3c40, 0xc0001120e0, 0xc000317000)
    /home/source/proxy/manager.go:778 +0xfa
net/http.HandlerFunc.ServeHTTP(0xc0000a63c0, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2012 +0x44
net/http.(*ServeMux).ServeHTTP(0xe7d6c0, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2387 +0x1a5
net/http.serverHandler.ServeHTTP(0xc000112000, 0x9a3c40, 0xc0001120e0, 0xc000317000)
    /usr/local/go/src/net/http/server.go:2807 +0xa3
net/http.(*conn).serve(0xc000308000, 0x9a4800, 0xc00030e000)
    /usr/local/go/src/net/http/server.go:1895 +0x86c
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2933 +0x35c
Tried destroying session 3613dcd0-573b-46c0-87b6-2617c1dde6b7, but sessions not in active usersessions.
0 user sessions active.
ricklamers commented 4 years ago

I think the panic in the proxy was already there with Go 1.12. I'll accept the merge and will try to generally fix the panic caused by the websocket proxy at a later time.