From 81367df2bd958c1cb9ae15db451b3df09c5a3187 Mon Sep 17 00:00:00 2001 From: Eleanor Kiefel Haggerty Date: Thu, 28 Oct 2021 16:13:07 +1100 Subject: [PATCH] Fix null dereference in cloudwatch publisher --- scaler/scaler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scaler/scaler.go b/scaler/scaler.go index dae2fc6..e93f613 100644 --- a/scaler/scaler.go +++ b/scaler/scaler.go @@ -76,7 +76,9 @@ func NewScaler(client *buildkite.Client, sess *session.Session, params Params) ( } if params.PublishCloudWatchMetrics { - scaler.metrics = &cloudWatchMetricsPublisher{} + scaler.metrics = &cloudWatchMetricsPublisher{ + sess: sess, + } } }