zaquestion / lab

Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
https://zaquestion.github.io/lab
Creative Commons Zero v1.0 Universal
1.11k stars 102 forks source link

ci view --follow panics #854

Open sding3 opened 1 year ago

sding3 commented 1 year ago

lab ci view --follow panics before downstream pipelines are created/running:

$ lab ci view --follow
2023/03/01 09:58:15 ERROR: ci_view.go:487: runtime error: invalid memory address or nil pointer dereference
goroutine 101 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x65
github.com/zaquestion/lab/cmd.recoverPanic(0x0?)
        /tmp/lab/cmd/ci_view.go:487 +0x4c
panic({0xce4ea0, 0x14ab880})
        /usr/local/go/src/runtime/panic.go:838 +0x207
github.com/zaquestion/lab/internal/gitlab.CIJobs({0xcb5040?, 0xc00012a0a0}, 0x0?, 0x1, {0x0, 0x0})
        /tmp/lab/internal/gitlab/gitlab.go:1278 +0x54f
github.com/zaquestion/lab/cmd.updateJobs(0xc0002a4000, 0x1?)
        /tmp/lab/cmd/ci_view.go:498 +0xe5
created by github.com/zaquestion/lab/cmd.glob..func7
        /tmp/lab/cmd/ci_view.go:97 +0x59b
prarit commented 1 year ago

My apologies for the late reply @sding3 . I'm trying to reproduce this but so far have been unsuccessful. Is it possible that you could point me to an MR where you can reproduce this?

teto commented 2 months ago

hi, I see the same issue with the version 0.25.1 from nixpkgs:

➜ lab ci view --follow
2024/09/18 11:14:55 ERROR: ci_view.go:487: runtime error: invalid memory address or nil pointer dereference
goroutine 99 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x5e
github.com/zaquestion/lab/cmd.recoverPanic(0xc0000de1c0)
    github.com/zaquestion/lab/cmd/ci_view.go:487 +0x4a
panic({0xe114e0?, 0x16bb1f0?})
    runtime/panic.go:770 +0x132
github.com/zaquestion/lab/internal/gitlab.CIJobs({0xdda4a0, 0xc00043c000}, 0x69676, 0x1, {0x0, 0x0})
    github.com/zaquestion/lab/internal/gitlab/gitlab.go:1233 +0x4fd
github.com/zaquestion/lab/cmd.updateJobs(0xc0000de1c0, 0xc000041e00)
    github.com/zaquestion/lab/cmd/ci_view.go:498 +0xd3
created by github.com/zaquestion/lab/cmd.init.func10 in goroutine 1
    github.com/zaquestion/lab/cmd/ci_view.go:97 +0x6f2

❌1 ❯ lab --version       
lab version 0.25.1

sry I cant point you at my (private) pipeline either