Skip to content

Fix for the controller panic issue on metrics.enabled is false#486

Merged
markmandel merged 1 commit intoagones-dev:masterfrom
aLekSer:metrics_fix
Jan 17, 2019
Merged

Fix for the controller panic issue on metrics.enabled is false#486
markmandel merged 1 commit intoagones-dev:masterfrom
aLekSer:metrics_fix

Conversation

@aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Jan 16, 2019

If we disable metrics in Helm config file, Agones controller will panic on Run() call which could not be executed on non-nil interface with nil value (and not empty type of metrics.Controller).

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 88873928-136c-46d3-9beb-d0b67ece13de

Build Logs
starting build "88873928-136c-46d3-9beb-d0b67ece13de"

FETCHSOURCE
Initialized empty Git repository in /workspace/.git/
From https://source.developers.google.com/p/agones-images/r/agones
 * branch            cdfb31460b17f23ef79e0b80c44794a09b1da284 -> FETCH_HEAD
HEAD is now at cdfb314 Fix for the issue when metrics.enabled is false
BUILD
Starting Step #0
Step #0: Pulling image: ubuntu
Step #0: Using default tag: latest
Step #0: latest: Pulling from library/ubuntu
Step #0: Digest: sha256:cef0c2cde57a973ed80513a7d3614bc654d9d6becad2c068c9328b41bb3f6713
Step #0: Status: Downloaded newer image for ubuntu:latest
Finished Step #0
Starting Step #1
Step #1: Already have image (with digest): gcr.io/cloud-builders/docker
Step #1: Sending build context to Docker daemon  122.7MB

Step #1: Step 1/3 : FROM gcr.io/cloud-builders/docker
Step #1:  ---> 0bab03a8296d
Step #1: Step 2/3 : RUN apt-get install make
Step #1:  ---> Running in 88e23aad6a29
Step #1: Reading package lists...
Step #1: Building dependency tree...
Step #1: Reading state information...
Step #1: make is already the newest version (4.1-6).
Step #1: 0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
Step #1: Removing intermediate container 88e23aad6a29
Step #1:  ---> 58fb3aeaaeaa
Step #1: Step 3/3 : ENTRYPOINT ["/usr/bin/make"]
Step #1:  ---> Running in 4922dd957933
Step #1: Removing intermediate container 4922dd957933
Step #1:  ---> e6f44bff9265
Step #1: Successfully built e6f44bff9265
Step #1: Successfully tagged make-docker:latest
Finished Step #1
Starting Step #2
Step #2: Already have image: make-docker
Step #2: docker pull gcr.io/agones-images/agones-build:ecb91b2ec8 && docker tag gcr.io/agones-images/agones-build:ecb91b2ec8 agones-build:ecb91b2ec8
Step #2: ecb91b2ec8: Pulling from agones-images/agones-build
Step #2: 54f7e8ac135a: Pulling fs layer
Step #2: d6b856b25aeb: Pulling fs layer
Step #2: b4d69f3225dc: Pulling fs layer
Step #2: 037d177bc558: Pulling fs layer
Step #2: a920f8d81a07: Pulling fs layer
Step #2: cb4439cccf6a: Pulling fs layer
Step #2: ca60fe9971ac: Pulling fs layer
Step #2: 900a5d8ecad0: Pulling fs layer
Step #2: 126a6a5e55c2: Pulling fs layer
Step #2: eab845d45588: Pulling fs layer
Step #2: 9ab11613e389: Pulling fs layer
Step #2: 654bf86a9373: Pulling fs layer
Step #2: 3ab16d44460d: Pulling fs layer
Step #2: 1f1c41258e4c: Pulling fs layer
Step #2: 7a847f58dbc4: Pulling fs layer
Step #2: 0af37e69ef9b: Pulling fs layer
Step #2: 11048ac216f7: Pulling fs layer
Step #2: 9878e98813e5: Pulling fs layer
Step #2: c16fbfd1c0a6: Pulling fs layer
Step #2: e8be9ef6d09a: Pulling fs layer
Step #2: 83bc17d22bbf: Pulling fs layer
Step #2: 19d5d2da3421: Pulling fs layer
Step #2: 9878e98813e5: Waiting
Step #2: 654bf86a9373: Waiting
Step #2: c16fbfd1c0a6: Waiting
Step #2: 3ab16d44460d: Waiting
Step #2: e8be9ef6d09a: Waiting
Step #2: 83bc17d22bbf: Waiting
Step #2: 19d5d2da3421: Waiting
Step #2: 1f1c41258e4c: Waiting
Step #2: 7a847f58dbc4: Waiting
Step #2: 0af37e69ef9b: Waiting
Step #2: 126a6a5e55c2: Waiting
Step #2: ca60fe9971ac: Waiting
Step #2: 900a5d8ecad0: Waiting
Step #2: eab845d45588: Waiting
Step #2: 11048ac216f7: Waiting
Step #2: a920f8d81a07: Waiting
Step #2: cb4439cccf6a: Waiting
Step #2: 037d177bc558: Waiting
Step #2: 9ab11613e389: Waiting
Step #2: 54f7e8ac135a: Verifying Checksum
Step #2: 54f7e8ac135a: Download complete
Step #2: 037d177bc558: Verifying Checksum
Step #2: 037d177bc558: Download complete
Step #2: d6b856b25aeb: Verifying Checksum
Step #2: d6b856b25aeb: Download complete
Step #2: 54f7e8ac135a: Pull complete
Step #2: a920f8d81a07: Verifying Checksum
Step #2: a920f8d81a07: Download complete
Step #2: cb4439cccf6a: Download complete
Step #2: 900a5d8ecad0: Verifying Checksum
Step #2: 900a5d8ecad0: Download complete
Step #2: 126a6a5e55c2: Verifying Checksum
Step #2: 126a6a5e55c2: Download complete
Step #2: eab845d45588: Verifying Checksum
Step #2: eab845d45588: Download complete
Step #2: ca60fe9971ac: Verifying Checksum
Step #2: ca60fe9971ac: Download complete
Step #2: 9ab11613e389: Verifying Checksum
Step #2: 9ab11613e389: Download complete
Step #2: 654bf86a9373: Verifying Checksum
Step #2: 654bf86a9373: Download complete
Step #2: b4d69f3225dc: Verifying Checksum
Step #2: b4d69f3225dc: Download complete
Step #2: 7a847f58dbc4: Verifying Checksum
Step #2: 7a847f58dbc4: Download complete
Step #2: 1f1c41258e4c: Verifying Checksum
Step #2: 1f1c41258e4c: Download complete
Step #2: 3ab16d44460d: Verifying Checksum
Step #2: 3ab16d44460d: Download complete
Step #2: 9878e98813e5: Verifying Checksum
Step #2: 9878e98813e5: Download complete
Step #2: c16fbfd1c0a6: Verifying Checksum
Step #2: c16fbfd1c0a6: Download complete
Step #2: e8be9ef6d09a: Verifying Checksum
Step #2: e8be9ef6d09a: Download complete
Step #2: 11048ac216f7: Verifying Checksum
Step #2: 11048ac216f7: Download complete
Step #2: 19d5d2da3421: Download complete
Step #2: 83bc17d22bbf: Download complete
Step #2: 0af37e69ef9b: Download complete
Step #2: d6b856b25aeb: Pull complete
Step #2: b4d69f3225dc: Pull complete
Step #2: 037d177bc558: Pull complete
Step #2: a920f8d81a07: Pull complete
Step #2: cb4439cccf6a: Pull complete
Step #2: ca60fe9971ac: Pull complete
Step #2: 900a5d8ecad0: Pull complete
Step #2: 126a6a5e55c2: Pull complete
Step #2: eab845d45588: Pull complete
Step #2: 9ab11613e389: Pull complete
Step #2: 654bf86a9373: Pull complete
Step #2: 3ab16d44460d: Pull complete
Step #2: 1f1c41258e4c: Pull complete
Step #2: 7a847f58dbc4: Pull complete
Step #2: 0af37e69ef9b: Pull complete
Step #2: 11048ac216f7: Pull complete
Step #2: 9878e98813e5: Pull complete
Step #2: c16fbfd1c0a6: Pull complete
Step #2: e8be9ef6d09a: Pull complete
Step #2: 83bc17d22bbf: Pull complete
Step #2: 19d5d2da3421: Pull complete
Step #2: Digest: sha256:ce010082a9af71629473622e6492c36a9a5717eb39c052184ae7242ecf7cab96
Step #2: Status: Downloaded newer image for gcr.io/agones-images/agones-build:ecb91b2ec8
Finished Step #2
Starting Step #3 - "lint"
Step #3 - "lint": Already have image: make-docker
Step #3 - "lint": mkdir -p ~/.kube/
Step #3 - "lint": mkdir -p /workspace/build//.config/gcloud
Step #3 - "lint": mkdir -p ~/.helm
Step #3 - "lint": docker run -t -e "TERM=xterm-256color" --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.helm:/root/.helm -v /workspace:/go/src/agones.dev/agones -v /workspace/build//.gocache:/root/.cache/go-build -w /go/src/agones.dev/agones  agones-build:ecb91b2ec8 bash -c \
Step #3 - "lint": 	"golangci-lint run ./examples/... && golangci-lint run --deadline 15m ./..."
Finished Step #3 - "lint"
Starting Step #4 - "tests"
Starting Step #6 - "build-e2e"
Starting Step #5 - "build"
Step #6 - "build-e2e": Already have image (with digest): gcr.io/cloud-builders/docker
Step #4 - "tests": Already have image: make-docker
Step #5 - "build": Already have image: make-docker
Step #6 - "build-e2e": Sending build context to Docker daemon  7.168kB

Step #6 - "build-e2e": Step 1/20 : FROM gcr.io/cloud-builders/gcloud-slim
Step #6 - "build-e2e":  ---> 833437261a57
Step #6 - "build-e2e": Step 2/20 : RUN apt-get update &&     apt-get install -y wget psmisc make gcc python jq zip &&     apt-get clean
Step #6 - "build-e2e":  ---> Running in 46704e460d8f
Step #6 - "build-e2e": Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Step #6 - "build-e2e": Get:2 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease [23.8 kB]
Step #6 - "build-e2e": Get:3 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Step #4 - "tests": mkdir -p ~/.kube/
Step #4 - "tests": mkdir -p /workspace/build//.config/gcloud
Step #4 - "tests": mkdir -p ~/.helm
Step #4 - "tests": docker run --rm -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.helm:/root/.helm -v /workspace:/go/src/agones.dev/agones -v /workspace/build//.gocache:/root/.cache/go-build agones-build:ecb91b2ec8 go test -race agones.dev/agones/pkg/... \
Step #4 - "tests": agones.dev/agones/sdks/... agones.dev/agones/cmd/...
Step #6 - "build-e2e": Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [600 kB]
Step #6 - "build-e2e": Get:5 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial/main amd64 Packages [3356 B]
Step #6 - "build-e2e": Get:6 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [249 kB]
Step #6 - "build-e2e": Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7204 B]
Step #6 - "build-e2e": Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2152 B]
Step #6 - "build-e2e": Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [413 kB]
Step #6 - "build-e2e": Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [162 kB]
Step #6 - "build-e2e": Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3724 B]
Step #6 - "build-e2e": Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1844 B]
Step #6 - "build-e2e": Get:13 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Step #6 - "build-e2e": Get:14 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial/main Translation-en [2380 B]
Step #6 - "build-e2e": Get:15 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Step #6 - "build-e2e": Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1201 kB]
Step #5 - "build": mkdir -p ~/.kube/
Step #5 - "build": mkdir -p /workspace/build//.config/gcloud
Step #5 - "build": mkdir -p ~/.helm
Step #5 - "build": docker run --rm -e "CGO_ENABLED=0" -v /workspace/build//.config/gcloud:/root/.config/gcloud -v ~/.kube/:/root/.kube -v ~/.helm:/root/.helm -v /workspace:/go/src/agones.dev/agones -v /workspace/build//.gocache:/root/.cache/go-build agones-build:ecb91b2ec8 go build \
Step #5 - "build": -tags none -o /go/src/agones.dev/agones/cmd/controller/bin/controller \
Step #5 - "build":  -ldflags "-X agones.dev/agones/pkg.Version=0.8.0-cdfb314" -installsuffix cgo agones.dev/agones/cmd/controller
Step #6 - "build-e2e": Get:17 http://archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB]
Step #6 - "build-e2e": Get:18 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [8344 B]
Step #6 - "build-e2e": Get:19 http://archive.ubuntu.com/ubuntu xenial/restricted Translation-en [2908 B]
Step #6 - "build-e2e": Get:20 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Step #6 - "build-e2e": Get:21 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]
Step #4 - "tests": ?   	agones.dev/agones/pkg	[no test files]
Step #4 - "tests": ?   	agones.dev/agones/pkg/apis	[no test files]
Step #4 - "tests": ?   	agones.dev/agones/pkg/apis/stable	[no test files]
Step #6 - "build-e2e": Get:22 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Step #6 - "build-e2e": Get:23 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Step #6 - "build-e2e": Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [902 kB]
Step #6 - "build-e2e": Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [365 kB]
Step #6 - "build-e2e": Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7556 B]
Step #6 - "build-e2e": Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2272 B]
Step #6 - "build-e2e": Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [718 kB]
Step #6 - "build-e2e": Get:29 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [294 kB]
Step #6 - "build-e2e": Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.6 kB]
Step #6 - "build-e2e": Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8440 B]
Step #6 - "build-e2e": Get:32 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7280 B]
Step #6 - "build-e2e": Get:33 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4456 B]
Step #6 - "build-e2e": Get:34 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7804 B]
Step #6 - "build-e2e": Get:35 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4184 B]
Step #6 - "build-e2e": Fetched 18.3 MB in 5s (3244 kB/s)
Step #6 - "build-e2e": Reading package lists...
Step #6 - "build-e2e": Reading package lists...
Step #6 - "build-e2e": Building dependency tree...
Step #6 - "build-e2e": Reading state information...
Step #6 - "build-e2e": python is already the newest version (2.7.12-1~16.04).
Step #6 - "build-e2e": python set to manually installed.
Step #6 - "build-e2e": The following packages were automatically installed and are no longer required:
Step #6 - "build-e2e":   libexpat1-dev libpython-dev libpython2.7 libpython2.7-dev
Step #6 - "build-e2e":   python-pkg-resources python2.7-dev
Step #6 - "build-e2e": Use 'apt autoremove' to remove them.
Step #6 - "build-e2e": The following additional packages will be installed:
Step #6 - "build-e2e":   libonig2 unzip
Step #6 - "build-e2e": Suggested packages:
Step #6 - "build-e2e":   gcc-multilib autoconf automake libtool flex bison gdb gcc-doc make-doc
Step #6 - "build-e2e": The following NEW packages will be installed:
Step #6 - "build-e2e":   gcc jq libonig2 make psmisc unzip wget zip
Step #6 - "build-e2e": 0 upgraded, 8 newly installed, 0 to remove and 10 not upgraded.
Step #6 - "build-e2e": Need to get 746 kB/1051 kB of archives.
Step #6 - "build-e2e": After this operation, 3466 kB of additional disk space will be used.
Step #6 - "build-e2e": Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 psmisc amd64 22.21-2.1build1 [48.0 kB]
Step #6 - "build-e2e": Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libonig2 amd64 5.9.6-1ubuntu0.1 [86.7 kB]
Step #6 - "build-e2e": Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 jq amd64 1.5+dfsg-1ubuntu0.1 [144 kB]
Step #6 - "build-e2e": Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Step #6 - "build-e2e": Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 unzip amd64 6.0-20ubuntu1 [158 kB]
Step #6 - "build-e2e": Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 zip amd64 3.0-11 [158 kB]
Step #6 - "build-e2e": Fetched 746 kB in 1s (601 kB/s)
Step #6 - "build-e2e": Selecting previously unselected package psmisc.
Step #6 - "build-e2e": (Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 15833 files and directories currently installed.)
Step #6 - "build-e2e": Preparing to unpack .../psmisc_22.21-2.1build1_amd64.deb ...
Step #6 - "build-e2e": Unpacking psmisc (22.21-2.1build1) ...
Step #6 - "build-e2e": Selecting previously unselected package wget.
Step #6 - "build-e2e": Preparing to unpack .../wget_1.17.1-1ubuntu1.4_amd64.deb ...
Step #6 - "build-e2e": Unpacking wget (1.17.1-1ubuntu1.4) ...
Step #6 - "build-e2e": Selecting previously unselected package gcc.
Step #6 - "build-e2e": Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...
Step #6 - "build-e2e": Unpacking gcc (4:5.3.1-1ubuntu1) ...
Step #6 - "build-e2e": Selecting previously unselected package libonig2:amd64.
Step #6 - "build-e2e": Preparing to unpack .../libonig2_5.9.6-1ubuntu0.1_amd64.deb ...
Step #6 - "build-e2e": Unpacking libonig2:amd64 (5.9.6-1ubuntu0.1) ...
Step #6 - "build-e2e": Selecting previously unselected package jq.
Step #6 - "build-e2e": Preparing to unpack .../jq_1.5+dfsg-1ubuntu0.1_amd64.deb ...
Step #6 - "build-e2e": Unpacking jq (1.5+dfsg-1ubuntu0.1) ...
Step #6 - "build-e2e": Selecting previously unselected package make.
Step #6 - "build-e2e": Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Step #6 - "build-e2e": Unpacking make (4.1-6) ...
Step #6 - "build-e2e": Selecting previously unselected package unzip.
Step #6 - "build-e2e": Preparing to unpack .../unzip_6.0-20ubuntu1_amd64.deb ...
Step #6 - "build-e2e": Unpacking unzip (6.0-20ubuntu1) ...
Step #6 - "build-e2e": Selecting previously unselected package zip.
Step #6 - "build-e2e": Preparing to unpack .../archives/zip_3.0-11_amd64.deb ...
Step #6 - "build-e2e": Unpacking zip (3.0-11) ...
Step #6 - "build-e2e": Processing triggers for libc-bin (2.23-0ubuntu10) ...
Step #6 - "build-e2e": Processing triggers for mime-support (3.59ubuntu1) ...
Step #6 - "build-e2e": Setting up psmisc (22.21-2.1build1) ...
Step #6 - "build-e2e": Setting up wget (1.17.1-1ubuntu1.4) ...
Step #6 - "build-e2e": Setting up gcc (4:5.3.1-1ubuntu1) ...
Step #6 - "build-e2e": Setting up libonig2:amd64 (5.9.6-1ubuntu0.1) ...
Step #6 - "build-e2e": Setting up jq (1.5+dfsg-1ubuntu0.1) ...
Step #6 - "build-e2e": Setting up make (4.1-6) ...
Step #6 - "build-e2e": Setting up unzip (6.0-20ubuntu1) ...
Step #6 - "build-e2e": Setting up zip (3.0-11) ...
Step #6 - "build-e2e": Processing triggers for libc-bin (2.23-0ubuntu10) ...
Step #6 - "build-e2e": Removing intermediate container 46704e460d8f
Step #6 - "build-e2e":  ---> 856f3b6298c8
Step #6 - "build-e2e": Step 3/20 : WORKDIR /usr/local
Step #6 - "build-e2e":  ---> Running in 84ee0b54b028
Step #6 - "build-e2e": Removing intermediate container 84ee0b54b028
Step #6 - "build-e2e":  ---> 2f859aefb90e
Step #6 - "build-e2e": Step 4/20 : ENV GO_VERSION=1.11.1
Step #6 - "build-e2e":  ---> Running in d44298916634
Step #6 - "build-e2e": Removing intermediate container d44298916634
Step #6 - "build-e2e":  ---> b4e1c8803a7d
Step #6 - "build-e2e": Step 5/20 : ENV GOPATH /go
Step #6 - "build-e2e":  ---> Running in ccc23ff163a1
Step #6 - "build-e2e": Removing intermediate container ccc23ff163a1
Step #6 - "build-e2e":  ---> 19e75cbf0ea8
Step #6 - "build-e2e": Step 6/20 : RUN wget -q https://redirector.gvt1.com/edgedl/go/go${GO_VERSION}.linux-amd64.tar.gz &&     tar -xzf go${GO_VERSION}.linux-amd64.tar.gz && rm go${GO_VERSION}.linux-amd64.tar.gz && mkdir ${GOPATH}
Step #6 - "build-e2e":  ---> Running in 8895ae407f3c
Step #6 - "build-e2e": The command '/bin/sh -c wget -q https://redirector.gvt1.com/edgedl/go/go${GO_VERSION}.linux-amd64.tar.gz &&     tar -xzf go${GO_VERSION}.linux-amd64.tar.gz && rm go${GO_VERSION}.linux-amd64.tar.gz && mkdir ${GOPATH}' returned a non-zero code: 8
Finished Step #6 - "build-e2e"
Finished Step #4 - "tests"
Finished Step #5 - "build"
ERROR
ERROR: build step 6 "gcr.io/cloud-builders/docker" failed: exit status 8

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: b88e0386-0bcb-4e0d-834b-802ef91c6538

The following development artifacts have been built, and will exist for the next 30 days:

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/486/head:pr_486 && git checkout pr_486
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.8.0-cdfb314

@markmandel
Copy link
Collaborator

Rather than use all this reflect (and generally we shouldn't need to) - and to avoid this messiness, why don't we try something more like this, where we dynamically append to rs rather than look for nil values.

WDYT?

	server := &httpServer{}
	var rs []runner
	var health healthcheck.Handler

	if ctlConf.Metrics {
		registry := prom.NewRegistry()
		metricHandler, err := metrics.RegisterPrometheusExporter(registry)
		if err != nil {
			logger.WithError(err).Fatal("Could not create register prometheus exporter")
		}
		server.Handle("/metrics", metricHandler)
		health = healthcheck.NewMetricsHandler(registry, "agones")
		rs = append(rs, metrics.NewController(kubeClient, agonesClient, agonesInformerFactory))

	} else {
		health = healthcheck.NewHandler()
	}

	server.Handle("/", health)

	allocationMutex := &sync.Mutex{}

	gsController := gameservers.NewController(wh, health, allocationMutex,
		ctlConf.MinPort, ctlConf.MaxPort, ctlConf.SidecarImage, ctlConf.AlwaysPullSidecar,
		ctlConf.SidecarCPURequest, ctlConf.SidecarCPULimit,
		kubeClient, kubeInformationFactory, extClient, agonesClient, agonesInformerFactory)
	gsSetController := gameserversets.NewController(wh, health, allocationMutex,
		kubeClient, extClient, agonesClient, agonesInformerFactory)
	fleetController := fleets.NewController(wh, health, kubeClient, extClient, agonesClient, agonesInformerFactory)
	faController := fleetallocation.NewController(wh, allocationMutex,
		kubeClient, extClient, agonesClient, agonesInformerFactory)
	gasController := gameserverallocations.NewController(wh, health, allocationMutex, kubeClient,
		kubeInformationFactory, extClient, agonesClient, agonesInformerFactory)
	fasController := fleetautoscalers.NewController(wh, health,
		kubeClient, extClient, agonesClient, agonesInformerFactory)

	rs = append(rs, wh, gsController, gsSetController, fleetController, faController, fasController, gasController, server)

	stop := signals.NewStopChannel()

	kubeInformationFactory.Start(stop)
	agonesInformerFactory.Start(stop)

	for _, r := range rs {
		go func(rr runner) {
			if runErr := rr.Run(workers, stop); runErr != nil {
				logger.WithError(runErr).Fatalf("could not start runner: %s", reflect.TypeOf(rr))
			}
		}(r)
	}

@cyriltovena
Copy link
Collaborator

I think it's a great idea !

Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's change this PR to do this then 😄

Force us to clean this section up.

If we disable metrics in Helm config file, Agones controller
will panic on rr.Run() which could not be executed on non-nil interface
with nil value (and not empty type of metrics.Controller).
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7d79a0f1-5675-4a72-9612-23bb0587be53

The following development artifacts have been built, and will exist for the next 30 days:

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/486/head:pr_486 && git checkout pr_486
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.8.0-caae253

@markmandel markmandel added kind/bug These are bugs. kind/cleanup Refactoring code, fixing up documentation, etc labels Jan 17, 2019
@markmandel markmandel added this to the 0.8.0 milestone Jan 17, 2019
@markmandel markmandel merged commit f8ddee7 into agones-dev:master Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug These are bugs. kind/cleanup Refactoring code, fixing up documentation, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants