buildkite/buildkite-agent-metrics

PR #86 Breaks Lambda

Closed this issue · 1 comments

I was using this package as a lambda, and it looks like #86 breaks functionality when the BUILDKITE_QUEUE env variable is omitted.

// https://github.com/buildkite/buildkite-agent-metrics/blob/master/lambda/main.go#L39
queue := os.Getenv("BUILDKITE_QUEUE") // initializes a string



// https://github.com/buildkite/buildkite-agent-metrics/blob/master/lambda/main.go#L66
Queues:    []string{queue} // creates an array that is always length 1

// https://github.com/buildkite/buildkite-agent-metrics/blob/master/collector/collector.go#L91
if len(c.Queues) == 0 // will never happen
lox commented

Argh, apologies, you are correct. Will fix this and get out a new release.