Failing to register runner on master
Summary
When you run gitlab-runner register
the runner panics
Steps to reproduce
- Download runner from master
- Run the
register
command
Actual behavior
A panic happens
register flag redefined: cache-s3-server-address
panic: register flag redefined: cache-s3-server-address [recovered]
panic: register flag redefined: cache-s3-server-address
goroutine 1 [running]:
main.main.func1()
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/main.go:34 +0x7f
panic(0x2044320, 0xc4202efe20)
/usr/local/go/src/runtime/panic.go:489 +0x2cf
flag.(*FlagSet).Var(0xc420431500, 0x31f73c0, 0xc420434700, 0xc420421bc0, 0x17, 0xc420426bd0, 0x2c)
/usr/local/go/src/flag/flag.go:793 +0x420
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.GenericFlag.ApplyWithError.func1(0xc420421bc0, 0x17)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/flag.go:128 +0x9e
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.eachName(0xc420421bc0, 0x17, 0xc4204d5838)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/flag.go:94 +0xb5
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.GenericFlag.ApplyWithError(0xc420421bc0, 0x17, 0xc420426bd0, 0x2c, 0x214b20e, 0x11, 0x0, 0x2c5ed60, 0xc420434700, 0xc420431500, ...)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/flag.go:129 +0x110
gitlab.com/gitlab-org/gitlab-runner/vendor/gitlab.com/ayufan/golang-cli-helpers.(*StructFieldFlag).ApplyWithError(0xc42042bb80, 0xc420431500, 0xc42042bb80, 0x31f7380)
<autogenerated>:7 +0x6a
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.flagSet(0x229667c, 0x8, 0xc4203a5600, 0x89, 0x90, 0x0, 0x0, 0x0)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/flag.go:80 +0xfa
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.Command.Run(0x229667c, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x22a992f, 0x15, 0x0, ...)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/command.go:109 +0xbc
gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli.(*App).Run(0xc4202f61a0, 0xc42000a2e0, 0x2, 0x2, 0x0, 0x0)
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/vendor/github.com/urfave/cli/app.go:255 +0x76f
main.main()
/builds/gitlab-org/gitlab-runner/.gopath/src/gitlab.com/gitlab-org/gitlab-runner/main.go:61 +0x2df
Expected behavior
User is prompted with the usual register questions
Used GitLab Runner version
Version: 11.3.0~beta.715.g74085754
Git revision: 74085754
Git branch: master
GO version: go1.8.7
Built: 2018-09-06T20:38:07+0000
OS/Arch: darwin/amd64
Version: 11.3.0~beta.715.g74085754
Git revision: 74085754
Git branch: master
GO version: go1.8.7
Built: 2018-09-06T20:38:07+0000
OS/Arch: linux/amd64
Edited by Steve Xuereb