-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
Two issues occur during a fresh installation via prime-cli:
1. Installation aborts with migrator timeout:
The initial prime-cli setup fails with:
Setup Failed with Error
plane-migrator-1 taking too long to complete the job – check the container logs for more information
The migrator timeout appears to be too aggressive for virtualized environments. The migration itself does not fail — it simply does not complete within the hardcoded time window.
2. Subsequent prime-cli repair crashes with Go runtime panic:
After the failed installation, running prime-cli repair to recover completes the actual repair operation but crashes with an index out of range [-1] panic in the TUI rendering layer:
Caught panic:
runtime error: index out of range [-1]
Restoring terminal...
goroutine 1 [running]:
github.com/makeplane/prime-cli/cli/internal/tui/views/global.MigratorLogsView(...)
/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(...)
/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.RepairModel.View(...)
/home/runner/work/prime-cli/prime-cli/cli/internal/tui/repair.go:154 +0x89
The panic originates at utility_views.go:119 in MigratorLogsView. The index out of range [-1] suggests slice[len(slice)-1] on an empty slice — likely because the migrator container produced no logs or had already exited before the TUI tried to render.
Despite both errors, all core services eventually come up healthy after the panic (verified via prime-cli healthcheck). The 6 services showing "Unhealthy" (email, pi-api, pi-beat, pi-db-init, pi-migrator, pi-worker) are unconfigured optional components (Plane AI and email ingestion) — unrelated to this bug.
Suggested fixes:
- Issue 1: Make the migrator timeout configurable (e.g.
prime-cli install --migrator-timeout 600) or increase the default significantly for slower environments. - Issue 2: Add a bounds check in
MigratorLogsViewbefore accessing the log slice:if len(logs) == 0 { return "No migrator logs available." }
Steps to reproduce
- Set up a Proxmox LXC container (Debian-based) with Docker installed
- Run
curl -fsSL https://prime.plane.so/install/ | sh - - Follow the Express installation, enter domain name
- Observe: installation aborts with
plane-migrator-1 taking too long to complete the job - Run
sudo prime-cli repair - Observe: repair completes but CLI crashes with the panic shown above
Environment
Production
Browser
None
Variant
Self-hosted
Version
latest