Skip to content

Commit 9e6543d

Browse files
committed
Merge branch 'master' into master-ttl
* master: (30 commits) Update common Prometheus files Update common Prometheus files Update common Prometheus files Bump Go version to 1.17 Update common Prometheus files Update common Prometheus files Update common Prometheus files Cut v1.4.2 Update dependencies Update build tags to new style Log shutdown gracefully (prometheus#428) Simplify and update the issue template Update common Prometheus files go.mod: Update dependencies Replace go-kit/kit with go-kit/log Update common Prometheus files Cut v1.4.1 Fix spelling and comment Fix spelling in test Fix issue where labels aren't persisted when draining ...
2 parents b28bd03 + 6393a90 commit 9e6543d

File tree

857 files changed

+486
-345457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

857 files changed

+486
-345457
lines changed

.circleci/config.yml

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,45 @@
1-
---
21
version: 2.1
3-
42
orbs:
5-
prometheus: prometheus/[email protected]
6-
3+
prometheus: prometheus/[email protected]
74
executors:
85
# Whenever the Go version is updated here, .promu.yml should also be updated.
96
golang:
107
docker:
11-
- image: circleci/golang:1.15
12-
8+
- image: circleci/golang:1.17
139
jobs:
1410
test:
1511
executor: golang
16-
1712
steps:
18-
- prometheus/setup_environment
19-
- run: make
20-
- prometheus/store_artifact:
21-
file: pushgateway
22-
13+
- prometheus/setup_environment
14+
- run: make
15+
- prometheus/store_artifact:
16+
file: pushgateway
2317
workflows:
2418
version: 2
2519
pushgateway:
2620
jobs:
27-
- test:
28-
filters:
29-
tags:
30-
only: /.*/
31-
- prometheus/build:
32-
name: build
33-
filters:
34-
tags:
35-
only: /.*/
36-
- prometheus/publish_master:
37-
requires:
38-
- test
39-
- build
40-
filters:
41-
branches:
42-
only: master
43-
- prometheus/publish_release:
44-
requires:
45-
- test
46-
- build
47-
filters:
48-
tags:
49-
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
50-
branches:
51-
ignore: /.*/
21+
- test:
22+
filters:
23+
tags:
24+
only: /.*/
25+
- prometheus/build:
26+
name: build
27+
filters:
28+
tags:
29+
only: /.*/
30+
- prometheus/publish_master:
31+
requires:
32+
- test
33+
- build
34+
filters:
35+
branches:
36+
only: master
37+
- prometheus/publish_release:
38+
requires:
39+
- test
40+
- build
41+
filters:
42+
tags:
43+
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
44+
branches:
45+
ignore: /.*/

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
<!--
22
33
Note that we use GitHub issues for bugs and (uncontroversial) feature
4-
requests (see below for details).
5-
6-
Please do *NOT* ask usage questions in GitHub issues. Usage questions make
7-
most sense on the users mailing list, where more people are available to
8-
potentially respond to your question, and the whole community can benefit
9-
from the answers provided (perhaps your question has already been answered,
10-
search the archive to find out):
11-
https://groups.google.com/forum/#!forum/prometheus-users
12-
13-
While a GitHub issue is fine to track progress on an uncontroversial
14-
feature request, many feature requests touch the best practices and
15-
concepts of Prometheus as a whole and need to be discussed with the wider
16-
developer community first. This is in particular true for a request to
17-
reconsider a prior rejection of a feature request or any of the declared
18-
non-goals (see README.md). Those overarching discussions happen on the
19-
developer mailing list (GitHub issues, in particular closed ones, are not
20-
tracked by the wider developer community and thus inadequate):
21-
https://groups.google.com/forum/#!forum/prometheus-developers
22-
23-
You can find more information at: https://prometheus.io/community/
4+
requests. For questions and discussions, please use GitHub discussions or
5+
any of the other community channels: https://prometheus.io/community/
246
257
-->
268

.github/workflows/golangci-lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
paths:
5+
- "go.sum"
6+
- "go.mod"
7+
- "**.go"
8+
- "scripts/errcheck_excludes.txt"
9+
- ".github/workflows/golangci-lint.yml"
10+
- ".golangci.yml"
11+
pull_request:
12+
paths:
13+
- "go.sum"
14+
- "go.mod"
15+
- "**.go"
16+
- "scripts/errcheck_excludes.txt"
17+
- ".github/workflows/golangci-lint.yml"
18+
- ".golangci.yml"
19+
20+
jobs:
21+
golangci:
22+
name: lint
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
- name: Lint
29+
uses: golangci/golangci-lint-action@v2
30+
with:
31+
version: v1.42.0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
*~
77
*.exe
88
*.tar.gz
9+
/vendor

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
run:
2-
modules-download-mode: vendor
3-
41
# Run only staticcheck for now. Additional linters will be enabled one-by-one.
52
linters:
63
enable:

.promu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
go:
22
# Whenever the Go version is updated here, .circle/config.yml should also
33
# be updated.
4-
version: 1.15
4+
version: 1.17
55
repository:
66
path: github.com/prometheus/pushgateway
77
build:
8-
flags: -mod=vendor -a -tags netgo
8+
flags: -a -tags netgo
99
ldflags: |
1010
-X github.com/prometheus/common/version.Version={{.Version}}
1111
-X github.com/prometheus/common/version.Revision={{.Revision}}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 1.4.2 / 2021-10-11
2+
3+
* [BUGFIX] Do not log an error upon graceful shutdown. #428
4+
* [BUGFIX] Update dependencies to pull in possibly relevant bugfixes.
5+
6+
## 1.4.1 / 2021-05-28
7+
8+
* [BUGFIX] Persist labels properly when draining. #404
9+
* [BUGFIX] Use relative paths for web assets. #390
10+
111
## 1.4.0 / 2021-01-23
212

313
* [FEATURE] **Experimental!** Add TLS and basic authentication to HTTP endpoints. #381

Makefile.common

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,23 @@ ifneq ($(shell which gotestsum),)
7878
endif
7979
endif
8080

81-
PROMU_VERSION ?= 0.7.0
81+
PROMU_VERSION ?= 0.13.0
8282
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
8383

8484
GOLANGCI_LINT :=
8585
GOLANGCI_LINT_OPTS ?=
86-
GOLANGCI_LINT_VERSION ?= v1.18.0
86+
GOLANGCI_LINT_VERSION ?= v1.42.0
8787
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
8888
# windows isn't included here because of the path separator being different.
8989
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
9090
ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386))
91-
GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint
91+
# If we're in CI and there is an Actions file, that means the linter
92+
# is being run in Actions, so we don't need to run it here.
93+
ifeq (,$(CIRCLE_JOB))
94+
GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint
95+
else ifeq (,$(wildcard .github/workflows/golangci-lint.yml))
96+
GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint
97+
endif
9298
endif
9399
endif
94100

@@ -118,7 +124,7 @@ endif
118124
%: common-% ;
119125

120126
.PHONY: common-all
121-
common-all: precheck style check_license lint unused build test
127+
common-all: precheck style check_license lint yamllint unused build test
122128

123129
.PHONY: common-style
124130
common-style:
@@ -154,7 +160,7 @@ endif
154160
update-go-deps:
155161
@echo ">> updating Go dependencies"
156162
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
157-
$(GO) get $$m; \
163+
$(GO) get -d $$m; \
158164
done
159165
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
160166
ifneq (,$(wildcard vendor))
@@ -198,6 +204,15 @@ else
198204
endif
199205
endif
200206

207+
.PHONY: common-yamllint
208+
common-yamllint:
209+
@echo ">> running yamllint on all YAML files in the repository"
210+
ifeq (, $(shell which yamllint))
211+
@echo "yamllint not installed so skipping"
212+
else
213+
yamllint .
214+
endif
215+
201216
# For backward-compatibility.
202217
.PHONY: common-staticcheck
203218
common-staticcheck: lint

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0
1+
1.4.2

api/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"net/http"
1919
"time"
2020

21-
"github.com/go-kit/kit/log"
22-
"github.com/go-kit/kit/log/level"
21+
"github.com/go-kit/log"
22+
"github.com/go-kit/log/level"
2323
"github.com/prometheus/common/route"
2424

2525
dto "github.com/prometheus/client_model/go"

0 commit comments

Comments
 (0)