Closed lox closed 5 years ago
This is a perplexing one. It looks like the handler
object getting passed in is nil. Any ideas @itsdalmo?
Assuming that this is version 3.0.0
?
Based on these log entries:
lifecycled: os.(*File).Name(...)
lifecycled: /usr/local/Cellar/go/1.11.1/libexec/src/os/file.go:50
And os.(*File).Name()
being defined as:
func (f *File) Name() string { return f.name }
It doesn't seem like Handler
itself is nil, but rather Handler.file
? Perhaps lifecycled
was started without --handler
being specified, and since it's not required or validated to be non-nil, this is what causes the crash? Either way, with the current implementation in main.go
then --handler
should be a required argument - I can submit a PR.
Sidenote; I'm wondering if perhaps more of the logic that currently lives in cmd/lifecycled/main.go
should be moved into the module so it can thoroughly tested (would be a good idea if we want to support more handlers as well, e.g. #54).
Yup, I think it makes a lot of sense to move as much as possible of main.go
into something testable.
Ref this PR: https://github.com/buildkite/elastic-ci-stack-for-aws/pull/507
Seems like handler not being set might have been the issue here? Sorry about that!
Yeah, I suspect that was the cause, as we weren't restarting lifecycled after setting it's config. No problems, appreciate your help fixing it!
Closed via #63.