glab ci view crashes when trying to display child pipeline traces

Checklist

  • I'm using the latest version of the extension (Run glab --version)
    • Extension version: 1.45.0
  • Operating system and version: not relevant
  • Gitlab.com or self-managed instance? self-managed instance
  • GitLab version (if self-managed) 16.11.7 (Use the version endpoint, like this: gitlab.my-company.com/api/v4/version)
  • I have performed glab auth status to check for authentication issues

Summary

When trying to display the trace of a childpipeline, the cli crashes.

Same issue as #7372 except it happens everytime, no matter if the child pipeline is run or not.

Environment

  • OS: Darwin 23.6.0 arm64
  • SHELL: /opt/homebrew/bin/bash
  • TERM: tmux-256color
  • GLAB: Current glab version: 1.45.0 (2024-07-31

Other:

Steps to reproduce

  • Create a pipeline with a child-pipeline
  • navigate to the child pipeline
  • press any key (enter or arrow-keys)
╔═══════════════════════════════════════════════════════════════════════════════════════════════════ Pipeline #4857 triggered about 17 hours ago by Sebastian Gumprich ═══════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║  ┌────────────────────┐                                                                 ┌────────────────────┐                                                                 ┌────────────────────┐                                                                   ║
║  │       Build        │                                                                 │       Verify       │                                                                 │       Deploy       │                                                                   ║
║  └────────────────────┘                                                                 └────────────────────┘                                                                 └────────────────────┘                                                                   ║
║                                                                                                                                                                                                                                                                         ║
║  ╔══✔ 01 application══╗                                                                 ┌✔ 01 container scan…┐                                                                 ┌──────✔ to ops──────┐                                                                   ║
║  ║                    ║                                                                 │                    │                                                                 │                   »│                                                                   ║
║  ║             00m 45s║══╦═══════════════════════════════════════════════════════════╦══│             00m 33s│══╦══════════════════════════════════════════════════════════════│             67m 47s│                                                                   ║
║  ╚════════════════════╝  ║                                                           ║  └────────────────────┘  ║                                                              └────────────────────┘                                                                   ║
║                          ║                                                           ║                          ║                                                                                                                                                       ║
║  ┌─────✔ 05 image─────┐  ║                                                           ║  ┌✔ gemnasium-depende…┐  ║                                                                                                                                                       ║
║  │                    │  ║                                                           ║  │                    │  ║                                                                                                                                                       ║
║  │             01m 48s│══╝                                                           ╠══│             00m 44s│══╝                                                                                                                                                       ║
║  └────────────────────┘                                                              ║  └────────────────────┘  ║                                                                                                                                                       ║
║                                                                                      ║                          ║                                                                                                                                                       ║
║                                                                                      ║  ┌─✔ nodejs-scan-sast─┐  ║                                                                                                                                                       ║
║                                                                                      ║  │                    │  ║                                                                                                                                                       ║
║                                                                                      ╠══│             00m 25s│══╝                                                                                                                                                       ║
║                                                                                      ║  └────────────────────┘  ║                                                                                                                                                       ║
║                                                                                      ║                          ║                                                                                                                                                       ║
║                                                                                      ║  ┌───✔ semgrep-sast───┐  ║                                                                                                                                                       ║
║                                                                                      ║  │                    │  ║                                                                                                                                                       ║
║                                                                                      ╠══│             00m 41s│══╝                                                                                                                                                       ║
║                                                                                      ║  └────────────────────┘  ║                                                                                                                                                       ║
║                                                                                      ║                          ║                                                                                                                                                       ║
║                                                                                      ║  ┌─✔ secret_detection─┐  ║                                                                                                                                                       ║
║                                                                                      ║  │                    │  ║                                                                                                                                                       ║
║                                                                                      ╠══│             00m 37s│══╝                                                                                                                                                       ║
║                                                                                      ║  └────────────────────┘  ║                                                                                                                                                       ║
║                                                                                      ║                          ║                                                                                                                                                       ║
║                                                                                      ║  ┌──✔ kics-iac-sast───┐  ║                                                                                                                                                       ║
║                                                                                      ║  │                    │  ║                                                                                                                                                       ║
║                                                                                      ╚══│             00m 29s│══╝                                                                                                                                                       ║
║                                                                                         └────────────────────┘                                                                                                                                                          ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

═══════════════════════════════════════════════════════════════════════════════════════════════════ Pipeline #4857 triggered about 17 hours ago by Sebastian Gumprich ═══════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║  ┌────────────────────┐                                                                                                                                                                                                                                                 ║
║  │Feature Review Manua│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ╔✔ 00 inject image-m═╗                                                                                                                                                                                                                                                 ║
║  ║                    ║                                                                                                                                                                                                                                                 ║
║  ║             00m 05s║                                                                                                                                                                                                                                                 ║
║  ╚════════════════════╝                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ┌✔ 01 image-m review…┐                                                                                                                                                                                                                                                 ║
║  │                    │                                                                                                                                                                                                                                                 ║
║  │             00m 03s│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ┌✔ 02 image-m review…┐                                                                                                                                                                                                                                                 ║
║  │                    │                                                                                                                                                                                                                                                 ║
║  │             00m 02s│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ┌✔ 03 image-m clone …┐                                                                                                                                                                                                                                                 ║
║  │                    │                                                                                                                                                                                                                                                 ║
║  │             00m 06s│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ┌✔ 04 image-m review…┐                                                                                                                                                                                                                                                 ║
║  │                    │                                                                                                                                                                                                                                                 ║
║  │             00m 10s│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║  ┌✔ 05 image-m review…┐                                                                                                                                                                                                                                                 ║
║  │                    │                                                                                                                                                                                                                                                 ║
║  │             00m 04s│                                                                                                                                                                                                                                                 ║
║  └────────────────────┘                                                                                                                                                                                                                                                 ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
║                                                                                                                                                                                                                                                                         ║
╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

error:

2024/08/28 09:51:11 runtime error: index out of range [8] with length 6
goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x64
gitlab.com/gitlab-org/cli/commands/ci/view.recoverPanic(0x14000410000)
        gitlab.com/gitlab-org/cli/commands/ci/view/view.go:707 +0x44
panic({0x10356e420?, 0x14000038d80?})
        runtime/panic.go:770 +0x124
github.com/rivo/tview.(*Application).Run.func1()
        github.com/rivo/tview@v0.0.0-20230621164836-6cc0565babaf/application.go:251 +0x4c
panic({0x10356e420?, 0x14000038d80?})
        runtime/panic.go:770 +0x124
gitlab.com/gitlab-org/cli/commands/ci/view.(*navigator).Navigate(0x140005020c0?, {0x140005678c0?, 0x5329?, 0x8000?}, 0x1400029d3d0?)
        gitlab.com/gitlab-org/cli/commands/ci/view/view.go:429 +0x504
gitlab.com/gitlab-org/cli/commands/ci/view.drawView.inputCapture.func2(0x140002f8360)
        gitlab.com/gitlab-org/cli/commands/ci/view/view.go:265 +0x1e4
github.com/rivo/tview.(*Application).Run(0x14000410000)
        github.com/rivo/tview@v0.0.0-20230621164836-6cc0565babaf/application.go:327 +0x5ac
gitlab.com/gitlab-org/cli/commands/ci/view.drawView({{0x1400019a168, 0x12}, {0x1400067e390, 0x2c}, 0x14000278b40, {0x1400048c120, 0x28}, 0x140003ca488, {0x1036062e8, 0x1400007a030}, ...})
        gitlab.com/gitlab-org/cli/commands/ci/view/view.go:224 +0x82c
gitlab.com/gitlab-org/cli/commands/ci/view.NewCmdView.func1(0x1400028ea00?, {0x103db2160, 0x0, 0x102fb2fb3?})
        gitlab.com/gitlab-org/cli/commands/ci/view/view.go:182 +0x3f4
github.com/spf13/cobra.(*Command).execute(0x14000291808, {0x103db2160, 0x0, 0x0})
        github.com/spf13/cobra@v1.8.1/command.go:985 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x1400041f208)
        github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
main.main()
        gitlab.com/gitlab-org/cli/cmd/glab/main.go:155 +0x930

What is the expected correct behavior?

the trace should be shown