Browse Source

*: move to go 1.11 (#4626)

* *: move to go 1.11

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Reduce number of places where we specify the Go version

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
pull/4746/merge
Simon Pasquier 6 years ago committed by GitHub
parent
commit
c4a6acfb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      .circleci/config.yml
  2. 4
      .promu.yml
  3. 6
      .travis.yml
  4. 4
      Makefile
  5. 20
      discovery/kubernetes/service_test.go
  6. 20
      web/api/v1/api_test.go
  7. 2
      web/ui/assets_vfsdata.go

23
.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

4
.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:

6
.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

4
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

20
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{

20
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)

2
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{

Loading…
Cancel
Save