runme
runme copied to clipboard
Better error message for remote runner if server is not up
We introduced a health check that should make this easy. Apparently currently it will give a panic message, which is not ideal:
► Running task install-lit...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x1057909ac]
goroutine 1 [running]:
github.com/stateful/runme/internal/runner/client.(*RemoteRunner).RunBlock(0x1400000e318, {0x105c0ea58, 0x14000283b00}, {0x105c0f0b0?, 0x1400036f880?})
/Users/sourishkrout/Projects/stateful/oss/runme/internal/runner/client/client_remote.go:108 +0x6c
github.com/stateful/runme/internal/runner/client.MultiRunner.RunBlocks.func3(0x105c11468?)
/Users/sourishkrout/Projects/stateful/oss/runme/internal/runner/client/client_multi.go:120 +0x48
github.com/stateful/runme/internal/runner/client.MultiRunner.RunBlocks({{0x105c11468, 0x1400000e0f0}, {0x0, 0x0}, 0x14000283ac0, 0x14000283bc0}, {0x105c0ea58?, 0x14000283b00}, {0x14000442200?, 0x6, ...}, ...)
/Users/sourishkrout/Projects/stateful/oss/runme/internal/runner/client/client_multi.go:138 +0x5c0
github.com/stateful/runme/internal/cmd.runCmd.func1.4()
/Users/sourishkrout/Projects/stateful/oss/runme/internal/cmd/run.go:242 +0x94
github.com/stateful/runme/internal/cmd.inRawMode(0x1400077dc50)
/Users/sourishkrout/Projects/stateful/oss/runme/internal/cmd/run.go:308 +0xc4
github.com/stateful/runme/internal/cmd.runCmd.func1(0x14000122c00, {0x140001146c0, 0x6, 0x6?})
/Users/sourishkrout/Projects/stateful/oss/runme/internal/cmd/run.go:240 +0xba4
github.com/spf13/cobra.(*Command).execute(0x14000122c00, {0x14000114660, 0x6, 0x6})
/Users/sourishkrout/go/pkg/mod/github.com/spf13/[email protected]/command.go:916 +0x5c8
github.com/spf13/cobra.(*Command).ExecuteC(0x1400072c600)
/Users/sourishkrout/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
/Users/sourishkrout/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
main.root()
/Users/sourishkrout/Projects/stateful/oss/runme/main.go:14 +0x128
main.main()
/Users/sourishkrout/Projects/stateful/oss/runme/main.go:22 +0x1c