Skip to content

Commit df52f17

Browse files
authored
Merge pull request #512 from prometheus/beorn7/release
Cut v1.5.0
2 parents 646d958 + 427fe09 commit df52f17

File tree

7 files changed

+324
-55
lines changed

7 files changed

+324
-55
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ executors:
66
# Whenever the Go version is updated here, .promu.yml should also be updated.
77
golang:
88
docker:
9-
- image: cimg/go:1.18
9+
- image: cimg/go:1.19
1010
jobs:
1111
test:
1212
executor: golang

.promu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
go:
33
# Whenever the Go version is updated here, .circle/config.yml should also
44
# be updated.
5-
version: 1.18
5+
version: 1.19
66
repository:
77
path: github.com/prometheus/pushgateway
88
build:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.5.0 / 2022-11-24
2+
3+
* [FEATURE] Add multiple listeners and systemd socket support. #512
4+
* [FEATURE] Accept a gzip'd body of a POST or PUT request. #477
5+
16
## 1.4.3 / 2022-05-30
27

38
* [BUGFIX] Update dependencies to pull in possibly relevant bugfixes.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.3
1+
1.5.0

go.mod

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,38 @@ module github.com/prometheus/pushgateway
33
require (
44
github.com/go-kit/log v0.2.1
55
github.com/golang/protobuf v1.5.2
6-
github.com/matttproud/golang_protobuf_extensions v1.0.1
7-
github.com/prometheus/client_golang v1.12.2
8-
github.com/prometheus/client_model v0.2.0
9-
github.com/prometheus/common v0.34.0
10-
github.com/prometheus/exporter-toolkit v0.7.1
6+
github.com/matttproud/golang_protobuf_extensions v1.0.4
7+
github.com/prometheus/client_golang v1.14.0
8+
github.com/prometheus/client_model v0.3.0
9+
github.com/prometheus/common v0.37.0
10+
github.com/prometheus/exporter-toolkit v0.8.1
1111
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
1212
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1313
)
1414

1515
require (
1616
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
17-
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
17+
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
1818
github.com/beorn7/perks v1.0.1 // indirect
1919
github.com/cespare/xxhash/v2 v2.1.2 // indirect
20+
github.com/coreos/go-systemd/v22 v22.4.0 // indirect
2021
github.com/go-logfmt/logfmt v0.5.1 // indirect
2122
github.com/jpillora/backoff v1.0.0 // indirect
2223
github.com/julienschmidt/httprouter v1.3.0 // indirect
2324
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
24-
github.com/pkg/errors v0.9.1 // indirect
25-
github.com/prometheus/procfs v0.7.3 // indirect
25+
github.com/prometheus/procfs v0.8.0 // indirect
2626
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
27-
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
28-
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
29-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
30-
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
27+
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a // indirect
28+
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
29+
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
30+
golang.org/x/sync v0.1.0 // indirect
31+
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
3132
golang.org/x/text v0.3.7 // indirect
32-
google.golang.org/appengine v1.6.6 // indirect
33-
google.golang.org/protobuf v1.26.0 // indirect
33+
golang.org/x/tools v0.1.5 // indirect
34+
google.golang.org/appengine v1.6.7 // indirect
35+
google.golang.org/protobuf v1.28.1 // indirect
3436
gopkg.in/yaml.v2 v2.4.0 // indirect
37+
gopkg.in/yaml.v3 v3.0.1 // indirect
3538
)
3639

3740
go 1.17

go.sum

Lines changed: 296 additions & 23 deletions
Large diffs are not rendered by default.

main.go

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"compress/gzip"
1818
"context"
1919
"fmt"
20-
"net"
2120
"net/http"
2221
"net/http/pprof"
2322
"net/url"
@@ -78,8 +77,7 @@ func gunzipRequest(h http.Handler) http.Handler {
7877
func main() {
7978
var (
8079
app = kingpin.New(filepath.Base(os.Args[0]), "The Pushgateway")
81-
webConfig = webflag.AddFlags(app)
82-
listenAddress = app.Flag("web.listen-address", "Address to listen on for the web interface, API, and telemetry.").Default(":9091").String()
80+
webConfig = webflag.AddFlags(app, ":9091")
8381
metricsPath = app.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").String()
8482
externalURL = app.Flag("web.external-url", "The URL under which the Pushgateway is externally reachable.").Default("").URL()
8583
routePrefix = app.Flag("web.route-prefix", "Prefix for the internal routes of web endpoints. Defaults to the path of --web.external-url.").Default("").String()
@@ -153,13 +151,6 @@ func main() {
153151
// Re-enable pprof.
154152
r.Get(*routePrefix+"/debug/pprof/*pprof", handlePprof)
155153

156-
level.Info(logger).Log("listen_address", *listenAddress)
157-
l, err := net.Listen("tcp", *listenAddress)
158-
if err != nil {
159-
level.Error(logger).Log("err", err)
160-
os.Exit(1)
161-
}
162-
163154
quitCh := make(chan struct{})
164155
quitHandler := func(w http.ResponseWriter, r *http.Request) {
165156
fmt.Fprintf(w, "Requesting termination... Goodbye!")
@@ -211,13 +202,10 @@ func main() {
211202

212203
mux.Handle(apiPath+"/v1/", http.StripPrefix(apiPath+"/v1", av1))
213204

214-
server := &http.Server{
215-
Addr: *listenAddress,
216-
Handler: mux,
217-
}
205+
server := &http.Server{Handler: mux}
218206

219207
go shutdownServerOnQuit(server, quitCh, logger)
220-
err = web.Serve(l, server, *webConfig, logger)
208+
err := web.ListenAndServe(server, webConfig, logger)
221209

222210
// In the case of a graceful shutdown, do not log the error.
223211
if err == http.ErrServerClosed {

0 commit comments

Comments
 (0)