Remove support for go 1.19 (#1449)
* Remove support for go 1.19 Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com> * Replace rand.Seed, deprecated in go 1.20 Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com> --------- Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
This commit is contained in:
parent
9dd5d2a64a
commit
353395b3b6
|
@ -18,7 +18,7 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go_version: ["1.19", "1.20", "1.21", "1.22"]
|
go_version: ["1.20", "1.21", "1.22"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -21,7 +21,7 @@ test: deps common-test
|
||||||
test-short: deps common-test-short
|
test-short: deps common-test-short
|
||||||
|
|
||||||
.PHONY: generate-go-collector-test-files
|
.PHONY: generate-go-collector-test-files
|
||||||
VERSIONS := 1.19 1.20 1.21 1.22
|
VERSIONS := 1.20 1.21 1.22
|
||||||
generate-go-collector-test-files:
|
generate-go-collector-test-files:
|
||||||
for GO_VERSION in $(VERSIONS); do \
|
for GO_VERSION in $(VERSIONS); do \
|
||||||
docker run \
|
docker run \
|
||||||
|
|
|
@ -10,8 +10,8 @@ This is the [Go](http://golang.org) client library for
|
||||||
instrumenting application code, and one for creating clients that talk to the
|
instrumenting application code, and one for creating clients that talk to the
|
||||||
Prometheus HTTP API.
|
Prometheus HTTP API.
|
||||||
|
|
||||||
**This library requires Go1.19 or later.**
|
**This library requires Go1.20 or later.**
|
||||||
> The library mandates the use of Go1.19 or subsequent versions. While it has demonstrated functionality with versions as old as Go 1.17, our commitment remains to offer support and rectifications for only the most recent three major releases.
|
> The library mandates the use of Go1.20 or subsequent versions. While it has demonstrated functionality with versions as old as Go 1.17, our commitment remains to offer support and rectifications for only the most recent three major releases.
|
||||||
|
|
||||||
## Important note about releases and stability
|
## Important note about releases and stability
|
||||||
|
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module github.com/prometheus/client_golang
|
module github.com/prometheus/client_golang
|
||||||
|
|
||||||
go 1.19
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/beorn7/perks v1.0.1
|
github.com/beorn7/perks v1.0.1
|
||||||
|
|
|
@ -157,7 +157,7 @@ func TestHistogramConcurrency(t *testing.T) {
|
||||||
t.Skip("Skipping test in short mode.")
|
t.Skip("Skipping test in short mode.")
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(42)
|
rand.New(rand.NewSource(42))
|
||||||
|
|
||||||
it := func(n uint32) bool {
|
it := func(n uint32) bool {
|
||||||
mutations := int(n%1e4 + 1e4)
|
mutations := int(n%1e4 + 1e4)
|
||||||
|
@ -243,7 +243,7 @@ func TestHistogramVecConcurrency(t *testing.T) {
|
||||||
t.Skip("Skipping test in short mode.")
|
t.Skip("Skipping test in short mode.")
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(42)
|
rand.New(rand.NewSource(42))
|
||||||
|
|
||||||
it := func(n uint32) bool {
|
it := func(n uint32) bool {
|
||||||
mutations := int(n%1e4 + 1e4)
|
mutations := int(n%1e4 + 1e4)
|
||||||
|
@ -1010,7 +1010,7 @@ func TestNativeHistogramConcurrency(t *testing.T) {
|
||||||
t.Skip("Skipping test in short mode.")
|
t.Skip("Skipping test in short mode.")
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(42)
|
rand.New(rand.NewSource(42))
|
||||||
|
|
||||||
it := func(n uint32) bool {
|
it := func(n uint32) bool {
|
||||||
ts := time.Now().Add(30 * time.Second).Unix()
|
ts := time.Now().Add(30 * time.Second).Unix()
|
||||||
|
|
|
@ -203,7 +203,7 @@ func TestSummaryConcurrency(t *testing.T) {
|
||||||
t.Skip("Skipping test in short mode.")
|
t.Skip("Skipping test in short mode.")
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(42)
|
rand.New(rand.NewSource(42))
|
||||||
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
|
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
|
||||||
|
|
||||||
it := func(n uint32) bool {
|
it := func(n uint32) bool {
|
||||||
|
@ -284,7 +284,7 @@ func TestSummaryVecConcurrency(t *testing.T) {
|
||||||
t.Skip("Skipping test in short mode.")
|
t.Skip("Skipping test in short mode.")
|
||||||
}
|
}
|
||||||
|
|
||||||
rand.Seed(42)
|
rand.New(rand.NewSource(42))
|
||||||
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
|
objMap := map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}
|
||||||
|
|
||||||
objSlice := make([]float64, 0, len(objMap))
|
objSlice := make([]float64, 0, len(objMap))
|
||||||
|
|
Loading…
Reference in New Issue