From 1f6fd0d73d11edcf217ae9961247460d73ba5b47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jul 2021 07:08:56 +0000 Subject: [PATCH 1/2] Bump github.com/thoas/go-funk from 0.8.0 to 0.9.0 Bumps [github.com/thoas/go-funk](https://github.com/thoas/go-funk) from 0.8.0 to 0.9.0. - [Release notes](https://github.com/thoas/go-funk/releases) - [Changelog](https://github.com/thoas/go-funk/blob/master/CHANGELOG.md) - [Commits](https://github.com/thoas/go-funk/compare/v0.8.0...v0.9.0) --- updated-dependencies: - dependency-name: github.com/thoas/go-funk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0e29712a..18e3e01d 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/palantir/go-githubapp v0.7.0 github.com/redhat-cop/operator-utils v1.1.4 github.com/stretchr/testify v1.7.0 - github.com/thoas/go-funk v0.8.0 + github.com/thoas/go-funk v0.9.0 k8s.io/api v0.21.2 k8s.io/apimachinery v0.21.2 k8s.io/client-go v0.21.2 diff --git a/go.sum b/go.sum index 14de0ab8..f665bbdd 100644 --- a/go.sum +++ b/go.sum @@ -503,8 +503,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/thoas/go-funk v0.8.0 h1:JP9tKSvnpFVclYgDM0Is7FD9M4fhPvqA0s0BsXmzSRQ= -github.com/thoas/go-funk v0.8.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= +github.com/thoas/go-funk v0.9.0 h1:Yzu8aTjTb1sqHZzSZLBt4qaZrFfjNizhA7IfnefjEzo= +github.com/thoas/go-funk v0.9.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= From ecd28bcbed50ed166a5ffc5fa77527d9b44dd0b5 Mon Sep 17 00:00:00 2001 From: "David J. M. Karlsen" Date: Wed, 7 Jul 2021 12:14:57 +0200 Subject: [PATCH 2/2] no need to cast any longer --- controllers/githubactionrunner_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/githubactionrunner_controller.go b/controllers/githubactionrunner_controller.go index 7e5a170f..9c9befbe 100644 --- a/controllers/githubactionrunner_controller.go +++ b/controllers/githubactionrunner_controller.go @@ -124,7 +124,7 @@ func (r *GithubActionRunnerReconciler) handleScaling(ctx context.Context, instan if shouldScaleUp(podRunnerPairs, instance) { instance.Status.CurrentSize = podRunnerPairs.numPods() - scale := funk.MaxInt([]int{instance.Spec.MinRunners - podRunnerPairs.numRunners(), 1}).(int) + scale := funk.MaxInt([]int{instance.Spec.MinRunners - podRunnerPairs.numRunners(), 1}) logger.Info("Scaling up", "numInstances", scale) if err := r.scaleUp(ctx, scale, instance); err != nil {