Skip to content

Commit d7d2a8b

Browse files
authored
Merge branch 'prometheus:main' into main
2 parents 8605fa1 + 8cc27af commit d7d2a8b

File tree

250 files changed

+29206
-40336
lines changed

Some content is hidden

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

250 files changed

+29206
-40336
lines changed

.circleci/config.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: 2.1
33

44
orbs:
5-
prometheus: prometheus/prometheus@0.15.0
5+
prometheus: prometheus/prometheus@0.16.0
66
go: circleci/[email protected]
77
win: circleci/[email protected]
88

@@ -11,10 +11,10 @@ executors:
1111
# should also be updated.
1212
golang:
1313
docker:
14-
- image: quay.io/prometheus/golang-builder:1.17-base
14+
- image: quay.io/prometheus/golang-builder:1.18-base
1515
golang_oldest:
1616
docker:
17-
- image: quay.io/prometheus/golang-builder:1.16-base
17+
- image: quay.io/prometheus/golang-builder:1.17-base
1818

1919
jobs:
2020
test_go:
@@ -58,10 +58,13 @@ jobs:
5858
keys:
5959
- v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
6060
- v3-npm-deps-
61-
- run: make ui-install
61+
- run: make assets-tarball
6262
- run: make ui-lint
63-
- run: make ui-build-module
6463
- run: make ui-test
64+
- persist_to_workspace:
65+
root: .
66+
paths:
67+
- .tarballs
6568
- save_cache:
6669
key: v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
6770
paths:
@@ -82,8 +85,6 @@ jobs:
8285
command: refreshenv
8386
- run:
8487
command: |
85-
$env:GOARCH=""; $env:GOOS=""; cd web/ui; go generate
86-
cd ../..
8788
$TestTargets = go list ./... | Where-Object { $_ -NotMatch "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"}
8889
go test $TestTargets -vet=off -v
8990
environment:
@@ -116,7 +117,6 @@ jobs:
116117
steps:
117118
- checkout
118119
- run: ./scripts/sync_repo_files.sh
119-
- run: ./scripts/sync_codemirror.sh
120120

121121
workflows:
122122
version: 2
@@ -148,7 +148,7 @@ workflows:
148148
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
149149
filters:
150150
tags:
151-
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
151+
ignore: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
152152
branches:
153153
ignore: /^(main|release-.*|.*build-all.*)$/
154154
- prometheus/build:
@@ -158,7 +158,7 @@ workflows:
158158
branches:
159159
only: /^(main|release-.*|.*build-all.*)$/
160160
tags:
161-
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
161+
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
162162
- prometheus/publish_main:
163163
context: org-context
164164
requires:
@@ -177,7 +177,7 @@ workflows:
177177
- build_all
178178
filters:
179179
tags:
180-
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
180+
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
181181
branches:
182182
ignore: /.*/
183183
image: circleci/golang:1-node

.github/ISSUE_TEMPLATE/bug_report.md

-57
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: Bug report
3+
description: Create a report to help us improve.
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thank you for opening a bug report for Prometheus.
9+
10+
Please do *NOT* ask support questions in Github issues.
11+
12+
If your issue is not a feature request or bug report use our [community support](https://prometheus.io/community/).
13+
14+
There is also [commercial support](https://prometheus.io/support-training/) available.
15+
- type: textarea
16+
attributes:
17+
label: What did you do?
18+
description: Please provide steps for us to reproduce this issue.
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: What did you expect to see?
24+
- type: textarea
25+
attributes:
26+
label: What did you see instead? Under which circumstances?
27+
validations:
28+
required: true
29+
- type: markdown
30+
attributes:
31+
value: |
32+
## Environment
33+
- type: input
34+
attributes:
35+
label: System information
36+
description: insert output of `uname -srm` here, or operating system version
37+
placeholder: e.g. Linux 5.16.15 x86_64
38+
- type: textarea
39+
attributes:
40+
label: Prometheus version
41+
description: Insert output of `prometheus --version` here.
42+
render: text
43+
placeholder: |
44+
e.g. prometheus, version 2.23.0 (branch: HEAD, revision: 26d89b4b0776fe4cd5a3656dfa520f119a375273)
45+
build user: root@37609b3a0a21
46+
build date: 20201126-10:56:17
47+
go version: go1.15.5
48+
platform: linux/amd64
49+
- type: textarea
50+
attributes:
51+
label: Prometheus configuration file
52+
description: Insert relevant configuration here. Don't forget to remove secrets.
53+
render: yaml
54+
- type: textarea
55+
attributes:
56+
label: Alertmanager version
57+
description: Insert output of `alertmanager --version` here (if relevant to the issue).
58+
render: text
59+
placeholder: |
60+
e.g. alertmanager, version 0.22.2 (branch: HEAD, revision: 44f8adc06af5101ad64bd8b9c8b18273f2922051)
61+
build user: root@b595c7f32520
62+
build date: 20210602-07:50:37
63+
go version: go1.16.4
64+
platform: linux/amd64
65+
- type: textarea
66+
attributes:
67+
label: Alertmanager configuration file
68+
description: Insert relevant configuration here. Don't forget to remove secrets.
69+
render: yaml
70+
- type: textarea
71+
attributes:
72+
label: Logs
73+
description: Insert Prometheus and Alertmanager logs relevant to the issue here.
74+
render: text

.github/workflows/buf-lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
name: lint
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: bufbuild/buf-setup-action@v0.6.0
12+
- uses: actions/checkout@v3
13+
- uses: bufbuild/buf-setup-action@v1.4.0
1414
- uses: bufbuild/buf-lint-action@v1
1515
with:
1616
input: 'prompb'

.github/workflows/buf.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
name: lint and publish
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: bufbuild/buf-setup-action@v0.6.0
11+
- uses: actions/checkout@v3
12+
- uses: bufbuild/buf-setup-action@v1.4.0
1313
- uses: bufbuild/buf-lint-action@v1
1414
with:
1515
input: 'prompb'

.github/workflows/codeql-analysis.yml

+10-37
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
1+
---
122
name: "CodeQL"
133

144
on:
155
push:
166
branches: [main, release-*]
177
pull_request:
18-
# The branches below must be a subset of the branches above
198
branches: [main]
209
schedule:
2110
- cron: "26 14 * * 1"
@@ -24,44 +13,28 @@ jobs:
2413
analyze:
2514
name: Analyze
2615
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
2718

2819
strategy:
2920
fail-fast: false
3021
matrix:
3122
language: ["go", "javascript"]
32-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
33-
# Learn more:
34-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3523

3624
steps:
3725
- name: Checkout repository
38-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
27+
- uses: actions/setup-go@v3
28+
with:
29+
go-version: '>=1.17 <1.18'
3930

40-
# Initializes the CodeQL tools for scanning.
4131
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
32+
uses: github/codeql-action/init@v2
4333
with:
4434
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4935

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
5236
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
54-
55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
57-
58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
61-
62-
#- run: |
63-
# make bootstrap
64-
# make release
37+
uses: github/codeql-action/autobuild@v2
6538

6639
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
40+
uses: github/codeql-action/analyze@v2

.github/workflows/fuzzing.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CIFuzz
22
on:
33
pull_request:
4-
paths:
5-
- "go.sum"
6-
- "go.mod"
7-
- "**.go"
84
jobs:
95
Fuzzing:
106
runs-on: ubuntu-latest
@@ -22,7 +18,7 @@ jobs:
2218
fuzz-seconds: 600
2319
dry-run: false
2420
- name: Upload Crash
25-
uses: actions/upload-artifact@v2.3.1
21+
uses: actions/upload-artifact@v3
2622
if: failure() && steps.build.outcome == 'success'
2723
with:
2824
name: artifacts

.github/workflows/golangci-lint.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,19 @@ on:
99
- ".github/workflows/golangci-lint.yml"
1010
- ".golangci.yml"
1111
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"
1912

2013
jobs:
2114
golangci:
2215
name: lint
2316
runs-on: ubuntu-latest
2417
steps:
2518
- name: Checkout repository
26-
uses: actions/checkout@v2
27-
19+
uses: actions/checkout@v3
20+
- name: install Go
21+
uses: actions/setup-go@v2
22+
with:
23+
go-version: 1.18.x
2824
- name: Lint
29-
uses: golangci/golangci-lint-action@v2
25+
uses: golangci/golangci-lint-action@v3.1.0
3026
with:
31-
version: v1.42.0
27+
version: v1.45.2

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ benchmark.txt
2323

2424
npm_licenses.tar.bz2
2525
/web/ui/static/react
26-
/web/ui/assets_vfsdata.go
2726

2827
/vendor
2928
/.build

.golangci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ linters:
1313
- gofumpt
1414
- goimports
1515
- revive
16+
- misspell
1617

1718
issues:
19+
max-same-issues: 0
1820
exclude-rules:
1921
- path: _test.go
2022
linters:
@@ -28,6 +30,7 @@ linters-settings:
2830
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
2931
- github.com/stretchr/testify/assert: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
3032
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
33+
- io/ioutil: "Use corresponding 'os' or 'io' functions instead."
3134
- regexp: "Use github.com/grafana/regexp instead of regexp"
3235
errcheck:
3336
exclude: scripts/errcheck_excludes.txt

0 commit comments

Comments
 (0)