Skip to content

[bug]: Abort after UpgradeΒ #8786

@nicolinux

Description

@nicolinux

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

First I upgraded the prime-cli to the latest version. Then started the upgrade with prime-cli upgrade. I saw the docker images being pulled, the migrations being applied and then I got this:

 ##+.    ##+    .##-                  
 ######+.######-.######.              
 #######.   -###    +#####+.          
 #######.      +       +######.       
 #######.              .#######       
 #######.              .#######       
  #######       +      .#######       
    .+#####+    ###-   .#######       
        .######.-#####+.+######       
            -##.    -##    .+##       

Caught panic:

runtime error: index out of range [-1]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.linux-amd64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.linux-amd64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:478 +0x8b
panic({0xb34180?, 0xc00034ee70?})
	/home/runner/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.2.linux-amd64/src/runtime/panic.go:785 +0x132
github.com/makeplane/prime-cli/cli/internal/tui/views/global.MigratorLogsView({0xc000583b00, 0x34d}, {{{0x115e3e0, 0x8, 0x8}, 0x5f5e100}, {0x116e220, 0xc0003b6840, {0x0, 0x0}}, ...})
	/home/runner/work/prime-cli/prime-cli/cli/internal/tui/views/global/utility_views.go:119 +0xbb8
github.com/makeplane/prime-cli/cli/internal/tui/views/global.RenderStatus({0xcb6620, 0xc0008a5208}, {{0xb81df6?, 0xc00051e4f0?}})
	/home/runner/work/prime-cli/prime-cli/cli/internal/tui/views/global/global_views.go:198 +0xdb4
github.com/makeplane/prime-cli/cli/internal/tui.UpgradeModel.View({{{0xb7d0c9, 0x7}, {0xc00024b4a5, 0x16}, {0xc0002a1136, 0x6}, {0xc0002a0f08, 0x6}, {0xc000027c59, 0xb}, ...}, ...})
	/home/runner/work/prime-cli/prime-cli/cli/internal/tui/upgrade.go:202 +0xf4
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0xc0003d88f0, {0xcb4ed8?, 0xc0003f0908?}, 0xc000515960)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:413 +0x61f
github.com/charmbracelet/bubbletea.(*Program).Run(0xc0003d88f0)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.25.0/tea.go:543 +0x84b
github.com/makeplane/prime-cli/cli/handlers.(*UpgradeHandler).Run(0xc0000a3b68, {0x6?, 0xcad460?, 0x7?})
	/home/runner/work/prime-cli/prime-cli/cli/handlers/upgrade.handler.go:77 +0x1ba
github.com/makeplane/prime-cli/cli/cmd.init.func23(0x1162dc0, {0x118fba0, 0x0, 0x0})
	/home/runner/work/prime-cli/prime-cli/cli/cmd/upgrade.go:58 +0x1f5
github.com/spf13/cobra.(*Command).execute(0x1162dc0, {0x118fba0, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x11619a0)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/makeplane/prime-cli/cli/cmd.Execute({{0xc0002a0d80, 0x6}, {0xcad460, 0x7}})
	/home/runner/work/prime-cli/prime-cli/cli/cmd/root.go:55 +0x1e6
main.main()
	/home/runner/work/prime-cli/prime-cli/cli/main.go:23 +0xb4

The installation seems to be fine, I can access Prime and prime-cli monitor shows that all services are running.

Steps to reproduce

  1. Upgrade from an older version 1.9.x

Environment

Production

Browser

Google Chrome

Variant

Self-hosted

Version

2.5.0

Metadata

Metadata

Assignees

Labels

planesync issues to PlaneπŸ›bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions