diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b31c6203..e33f929e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,13 +1,17 @@ --- version: 2.1 -jobs: - test: - # Whenever the Go version is updated here, .travis.yml should also be - # updated. +executors: + # Whenever the Go version is updated here, .travis.yml and .promu.yml + # should also be updated. + golang: docker: - - image: circleci/golang:1.10 + - image: circleci/golang:1.11 working_directory: /go/src/github.com/prometheus/prometheus + +jobs: + test: + executor: golang resource_class: large steps: @@ -24,7 +28,6 @@ jobs: build: machine: true - working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/prometheus steps: - checkout @@ -39,9 +42,7 @@ jobs: destination: /build docker_hub_master: - docker: - - image: circleci/golang:1.10 - working_directory: /go/src/github.com/prometheus/prometheus + executor: golang steps: - checkout @@ -59,9 +60,7 @@ jobs: - run: make docker-publish DOCKER_REPO=quay.io/prometheus docker_hub_release_tags: - docker: - - image: circleci/golang:1.10 - working_directory: /go/src/github.com/prometheus/prometheus + executor: golang steps: - checkout diff --git a/.promu.yml b/.promu.yml index 43f18f33a..a0041011c 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,3 +1,7 @@ +go: + # Whenever the Go version is updated here, .travis.yml and + # .circle/config.yml should also be updated. + version: 1.11 repository: path: github.com/prometheus/prometheus build: diff --git a/.travis.yml b/.travis.yml index 7aacb0429..2b8e14c25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,10 +2,10 @@ sudo: false language: go -# Whenever the Go version is updated here, .circleci/config.yml should also be -# updated. +# Whenever the Go version is updated here, .circleci/config.yml and .promu.yml +# should also be updated. go: -- 1.10.x +- 1.11.x go_import_path: github.com/prometheus/prometheus diff --git a/Makefile b/Makefile index 2a164d2d8..6742a44f9 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,10 @@ STATICCHECK_IGNORE = \ github.com/prometheus/prometheus/discovery/kubernetes/node.go:SA1019 \ github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/main.go:SA1019 \ github.com/prometheus/prometheus/pkg/textparse/lex.l.go:SA4006 \ + github.com/prometheus/prometheus/pkg/textparse/lex.l.go:SA4006 \ github.com/prometheus/prometheus/pkg/pool/pool.go:SA6002 \ - github.com/prometheus/prometheus/promql/engine.go:SA6002 + github.com/prometheus/prometheus/promql/engine.go:SA6002 \ + github.com/prometheus/prometheus/prompb/rpc.pb.gw.go:SA1019 DOCKER_IMAGE_NAME ?= prometheus diff --git a/discovery/kubernetes/service_test.go b/discovery/kubernetes/service_test.go index 581b2e35c..e75cc4a53 100644 --- a/discovery/kubernetes/service_test.go +++ b/discovery/kubernetes/service_test.go @@ -86,8 +86,8 @@ func TestServiceDiscoveryAdd(t *testing.T) { Targets: []model.LabelSet{ { "__meta_kubernetes_service_port_protocol": "TCP", - "__address__": "testservice.default.svc:30900", - "__meta_kubernetes_service_port_name": "testport", + "__address__": "testservice.default.svc:30900", + "__meta_kubernetes_service_port_name": "testport", }, }, Labels: model.LabelSet{ @@ -135,13 +135,13 @@ func TestServiceDiscoveryUpdate(t *testing.T) { Targets: []model.LabelSet{ { "__meta_kubernetes_service_port_protocol": "TCP", - "__address__": "testservice.default.svc:30900", - "__meta_kubernetes_service_port_name": "testport0", + "__address__": "testservice.default.svc:30900", + "__meta_kubernetes_service_port_name": "testport0", }, { "__meta_kubernetes_service_port_protocol": "UDP", - "__address__": "testservice.default.svc:30901", - "__meta_kubernetes_service_port_name": "testport1", + "__address__": "testservice.default.svc:30901", + "__meta_kubernetes_service_port_name": "testport1", }, }, Labels: model.LabelSet{ @@ -175,8 +175,8 @@ func TestServiceDiscoveryNamespaces(t *testing.T) { Targets: []model.LabelSet{ { "__meta_kubernetes_service_port_protocol": "TCP", - "__address__": "testservice.ns1.svc:30900", - "__meta_kubernetes_service_port_name": "testport", + "__address__": "testservice.ns1.svc:30900", + "__meta_kubernetes_service_port_name": "testport", }, }, Labels: model.LabelSet{ @@ -189,8 +189,8 @@ func TestServiceDiscoveryNamespaces(t *testing.T) { Targets: []model.LabelSet{ { "__meta_kubernetes_service_port_protocol": "TCP", - "__address__": "testservice.ns2.svc:30900", - "__meta_kubernetes_service_port_name": "testport", + "__address__": "testservice.ns2.svc:30900", + "__meta_kubernetes_service_port_name": "testport", }, }, Labels: model.LabelSet{ diff --git a/web/api/v1/api_test.go b/web/api/v1/api_test.go index c5739ebb9..a3e569cc0 100644 --- a/web/api/v1/api_test.go +++ b/web/api/v1/api_test.go @@ -234,11 +234,11 @@ func TestEndpoints(t *testing.T) { QueryEngine: suite.QueryEngine(), targetRetriever: testTargetRetriever{}, alertmanagerRetriever: testAlertmanagerRetriever{}, - now: func() time.Time { return now }, - config: func() config.Config { return samplePrometheusCfg }, - flagsMap: sampleFlagMap, - ready: func(f http.HandlerFunc) http.HandlerFunc { return f }, - rulesRetriever: algr, + now: func() time.Time { return now }, + config: func() config.Config { return samplePrometheusCfg }, + flagsMap: sampleFlagMap, + ready: func(f http.HandlerFunc) http.HandlerFunc { return f }, + rulesRetriever: algr, } testEndpoints(t, api, true) @@ -287,11 +287,11 @@ func TestEndpoints(t *testing.T) { QueryEngine: suite.QueryEngine(), targetRetriever: testTargetRetriever{}, alertmanagerRetriever: testAlertmanagerRetriever{}, - now: func() time.Time { return now }, - config: func() config.Config { return samplePrometheusCfg }, - flagsMap: sampleFlagMap, - ready: func(f http.HandlerFunc) http.HandlerFunc { return f }, - rulesRetriever: algr, + now: func() time.Time { return now }, + config: func() config.Config { return samplePrometheusCfg }, + flagsMap: sampleFlagMap, + ready: func(f http.HandlerFunc) http.HandlerFunc { return f }, + rulesRetriever: algr, } testEndpoints(t, api, false) diff --git a/web/ui/assets_vfsdata.go b/web/ui/assets_vfsdata.go index 54cc520cd..7895e235c 100644 --- a/web/ui/assets_vfsdata.go +++ b/web/ui/assets_vfsdata.go @@ -549,7 +549,7 @@ func (fs vfsgen۰FS) Open(path string) (http.File, error) { } return &vfsgen۰CompressedFile{ vfsgen۰CompressedFileInfo: f, - gr: gr, + gr: gr, }, nil case *vfsgen۰DirInfo: return &vfsgen۰Dir{