http: panic serving: runtime error: invalid memory address or nil pointer dereference
Goal
I came across this error when trying to open the UI immediately after launching dblab_server
DLE log:
2022/09/23 18:40:43 embedded_ui.go:173: [INFO] Embedded UI has started successfully on 0.0.0.0:2346.
2022/09/23 18:40:46 logging.go:16: [INFO] -> GET /healthz
2022/09/23 18:40:46 logging.go:16: [INFO] -> GET /snapshots
2022/09/23 18:40:46 mode_local.go:308: [INFO] no snapshots for pool dblab_pool
2022/09/23 18:40:46 util.go:37: [DEBUG] Response: []
2022/09/23 18:40:46 logging.go:16: [INFO] -> GET /status
2022/09/23 18:40:46 logging.go:16: [INFO] -> GET /instance/retrieval
2022/09/23 18:40:46 http: panic serving 172.21.0.3:40728: runtime error: invalid memory address or nil pointer dereference
goroutine 243 [running]:
net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1825 +0xbf
panic({0xe8a380, 0x17ba770})
/usr/local/go/src/runtime/panic.go:844 +0x258
gitlab.com/postgres-ai/database-lab/v3/internal/srv.(*Server).jobActivity(0x0?, {0x119cf68?, 0xc000237530?})
/builds/postgres-ai/database-lab/engine/internal/srv/routes.go:80 +0x95
gitlab.com/postgres-ai/database-lab/v3/internal/srv.(*Server).retrievalState(0xc00007e120, {0x119c5f8, 0xc0004622a0}, 0xc0000d9300)
/builds/postgres-ai/database-lab/engine/internal/srv/routes.go:55 +0x191
gitlab.com/postgres-ai/database-lab/v3/internal/srv/mw.(*Auth).Authorized.func1({0x119c5f8, 0xc0004622a0}, 0xc0000d9300)
/builds/postgres-ai/database-lab/engine/internal/srv/mw/auth.go:44 +0xae
net/http.HandlerFunc.ServeHTTP(0xc0000d9100?, {0x119c5f8?, 0xc0004622a0?}, 0x17be180?)
/usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0004f80c0, {0x119c5f8, 0xc0004622a0}, 0xc0000d9000)
/go/pkg/mod/github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1cf
gitlab.com/postgres-ai/database-lab/v3/internal/srv/mw.Logging.func1({0x119c5f8, 0xc0004622a0}, 0xc0000d9000)
/builds/postgres-ai/database-lab/engine/internal/srv/mw/logging.go:17 +0xed
net/http.HandlerFunc.ServeHTTP(0x0?, {0x119c5f8?, 0xc0004622a0?}, 0xc000054c00?)
/usr/local/go/src/net/http/server.go:2084 +0x2f
net/http.serverHandler.ServeHTTP({0xc0002373e0?}, {0x119c5f8, 0xc0004622a0}, 0xc0000d9000)
/usr/local/go/src/net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc00019ed20, {0x119cf68, 0xc000455950})
/usr/local/go/src/net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:3071 +0x4db
later refreshing the page I found that it was working properly

