Skip to content

Commit 0512ebf

Browse files
authored
Merge branch 'main' into mcarl/lint
Signed-off-by: Julien <[email protected]>
2 parents 420b324 + 1081e33 commit 0512ebf

File tree

483 files changed

+26856
-31109
lines changed

Some content is hidden

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

483 files changed

+26856
-31109
lines changed

.github/CODEOWNERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/web/ui @juliusv
22
/web/ui/module @juliusv @nexucis
3-
/storage/remote @csmarchbanks @cstyan @bwplotka @tomwilkie
4-
/storage/remote/otlptranslator @gouthamve @jesusvazquez
3+
/storage/remote @cstyan @bwplotka @tomwilkie
4+
/storage/remote/otlptranslator @aknuds1 @jesusvazquez
55
/discovery/kubernetes @brancz
66
/tsdb @jesusvazquez
77
/promql @roidelapluie

.github/dependabot.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ updates:
66
interval: "monthly"
77
groups:
88
k8s.io:
9-
patterns:
10-
- "k8s.io/*"
9+
patterns:
10+
- "k8s.io/*"
1111
go.opentelemetry.io:
12-
patterns:
13-
- "go.opentelemetry.io/*"
12+
patterns:
13+
- "go.opentelemetry.io/*"
1414
- package-ecosystem: "gomod"
1515
directory: "/documentation/examples/remote_storage"
1616
schedule:

.github/workflows/buf-lint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212
name: lint
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16-
- uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa # v1.28.1
15+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
16+
- uses: bufbuild/buf-setup-action@517ee23296d5caf38df31c21945e6a54bbc8a89f # v1.30.0
1717
with:
1818
github_token: ${{ secrets.GITHUB_TOKEN }}
19-
- uses: bufbuild/buf-lint-action@bd48f53224baaaf0fc55de9a913e7680ca6dbea4 # v1.0.3
19+
- uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1
2020
with:
2121
input: 'prompb'
22-
- uses: bufbuild/buf-breaking-action@f47418c81c00bfd65394628385593542f64db477 # v1.1.2
22+
- uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4
2323
with:
2424
input: 'prompb'
2525
against: 'https://github.com/prometheus/prometheus.git#branch=main,ref=HEAD,subdir=prompb'

.github/workflows/buf.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.repository_owner == 'prometheus'
1414
steps:
15-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16-
- uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa # v1.28.1
15+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
16+
- uses: bufbuild/buf-setup-action@517ee23296d5caf38df31c21945e6a54bbc8a89f # v1.30.0
1717
with:
1818
github_token: ${{ secrets.GITHUB_TOKEN }}
19-
- uses: bufbuild/buf-lint-action@bd48f53224baaaf0fc55de9a913e7680ca6dbea4 # v1.0.3
19+
- uses: bufbuild/buf-lint-action@06f9dd823d873146471cfaaf108a993fe00e5325 # v1.1.1
2020
with:
2121
input: 'prompb'
22-
- uses: bufbuild/buf-breaking-action@f47418c81c00bfd65394628385593542f64db477 # v1.1.2
22+
- uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4
2323
with:
2424
input: 'prompb'
2525
against: 'https://github.com/prometheus/prometheus.git#branch=main,ref=HEAD~1,subdir=prompb'
26-
- uses: bufbuild/buf-push-action@342fc4cdcf29115a01cf12a2c6dd6aac68dc51e1 # v1.1.1
26+
- uses: bufbuild/buf-push-action@a654ff18effe4641ebea4a4ce242c49800728459 # v1.1.1
2727
with:
2828
input: 'prompb'
2929
buf_token: ${{ secrets.BUF_TOKEN }}

.github/workflows/ci.yml

+64-41
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,56 @@ jobs:
88
test_go:
99
name: Go tests
1010
runs-on: ubuntu-latest
11-
# Whenever the Go version is updated here, .promu.yml
12-
# should also be updated.
1311
container:
14-
image: quay.io/prometheus/golang-builder:1.21-base
12+
# Whenever the Go version is updated here, .promu.yml
13+
# should also be updated.
14+
image: quay.io/prometheus/golang-builder:1.22-base
1515
steps:
16-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
1717
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
1818
- uses: ./.github/promci/actions/setup_environment
19-
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
20-
- run: go test ./tsdb/ -test.tsdb-isolation=false
21-
- run: go test --tags=stringlabels ./...
22-
- run: GOARCH=386 go test ./cmd/prometheus
19+
- run: make GOOPTS=--tags=stringlabels GO_ONLY=1 SKIP_GOLANGCI_LINT=1
20+
- run: go test --tags=stringlabels ./tsdb/ -test.tsdb-isolation=false
2321
- run: make -C documentation/examples/remote_storage
2422
- run: make -C documentation/examples
23+
24+
test_go_more:
25+
name: More Go tests
26+
runs-on: ubuntu-latest
27+
container:
28+
image: quay.io/prometheus/golang-builder:1.22-base
29+
steps:
30+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31+
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
32+
- uses: ./.github/promci/actions/setup_environment
33+
- run: go test --tags=dedupelabels ./...
34+
- run: GOARCH=386 go test ./cmd/prometheus
2535
- uses: ./.github/promci/actions/check_proto
2636
with:
2737
version: "3.15.8"
2838

39+
test_go_oldest:
40+
name: Go tests with previous Go version
41+
runs-on: ubuntu-latest
42+
container:
43+
# The go version in this image should be N-1 wrt test_go.
44+
image: quay.io/prometheus/golang-builder:1.21-base
45+
steps:
46+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
47+
- run: make build
48+
# Don't run NPM build; don't run race-detector.
49+
- run: make test GO_ONLY=1 test-flags=""
50+
2951
test_ui:
3052
name: UI tests
3153
runs-on: ubuntu-latest
3254
# Whenever the Go version is updated here, .promu.yml
3355
# should also be updated.
3456
container:
35-
image: quay.io/prometheus/golang-builder:1.21-base
57+
image: quay.io/prometheus/golang-builder:1.22-base
3658

3759
steps:
38-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
60+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
3961
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
4062
- uses: ./.github/promci/actions/setup_environment
4163
with:
@@ -52,36 +74,24 @@ jobs:
5274
name: Go tests on Windows
5375
runs-on: windows-latest
5476
steps:
55-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
56-
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
77+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
78+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
5779
with:
58-
go-version: 1.21.x
80+
go-version: 1.22.x
5981
- run: |
6082
$TestTargets = go list ./... | Where-Object { $_ -NotMatch "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"}
6183
go test $TestTargets -vet=off -v
6284
shell: powershell
6385
64-
test_golang_oldest:
65-
name: Go tests with previous Go version
66-
runs-on: ubuntu-latest
67-
# The go verson in this image should be N-1 wrt test_go.
68-
container:
69-
image: quay.io/prometheus/golang-builder:1.20-base
70-
steps:
71-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
72-
- run: make build
73-
- run: go test ./tsdb/...
74-
- run: go test ./tsdb/ -test.tsdb-isolation=false
75-
7686
test_mixins:
7787
name: Mixins tests
7888
runs-on: ubuntu-latest
7989
# Whenever the Go version is updated here, .promu.yml
8090
# should also be updated.
8191
container:
82-
image: quay.io/prometheus/golang-builder:1.20-base
92+
image: quay.io/prometheus/golang-builder:1.22-base
8393
steps:
84-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
94+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
8595
- run: go install ./cmd/promtool/.
8696
- run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest
8797
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
@@ -104,7 +114,7 @@ jobs:
104114
matrix:
105115
thread: [ 0, 1, 2 ]
106116
steps:
107-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
117+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
108118
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
109119
- uses: ./.github/promci/actions/build
110120
with:
@@ -127,32 +137,45 @@ jobs:
127137
# Whenever the Go version is updated here, .promu.yml
128138
# should also be updated.
129139
steps:
130-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
140+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
131141
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
132142
- uses: ./.github/promci/actions/build
133143
with:
134144
parallelism: 12
135145
thread: ${{ matrix.thread }}
146+
check_generated_parser:
147+
name: Check generated parser
148+
runs-on: ubuntu-latest
149+
steps:
150+
- name: Checkout repository
151+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
152+
- name: Install Go
153+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
154+
with:
155+
cache: false
156+
go-version: 1.22.x
157+
- name: Run goyacc and check for diff
158+
run: make install-goyacc check-generated-parser
136159
golangci:
137160
name: golangci-lint
138161
runs-on: ubuntu-latest
139162
steps:
140163
- name: Checkout repository
141-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
164+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
142165
- name: Install Go
143-
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
166+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
144167
with:
145168
cache: false
146-
go-version: 1.21.x
169+
go-version: 1.22.x
147170
- name: Install snmp_exporter/generator dependencies
148171
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
149172
if: github.repository == 'prometheus/snmp_exporter'
150173
- name: Lint
151-
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
174+
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
152175
with:
153176
args: --verbose
154177
# Make sure to sync this with Makefile.common and scripts/golangci-lint.yml.
155-
version: v1.55.2
178+
version: v1.56.2
156179
fuzzing:
157180
uses: ./.github/workflows/fuzzing.yml
158181
if: github.event_name == 'pull_request'
@@ -162,10 +185,10 @@ jobs:
162185
publish_main:
163186
name: Publish main branch artifacts
164187
runs-on: ubuntu-latest
165-
needs: [test_ui, test_go, test_windows, golangci, codeql, build_all]
188+
needs: [test_ui, test_go, test_go_more, test_go_oldest, test_windows, golangci, codeql, build_all]
166189
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
167190
steps:
168-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
191+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
169192
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
170193
- uses: ./.github/promci/actions/publish_main
171194
with:
@@ -176,10 +199,10 @@ jobs:
176199
publish_release:
177200
name: Publish release artefacts
178201
runs-on: ubuntu-latest
179-
needs: [test_ui, test_go, test_windows, golangci, codeql, build_all]
202+
needs: [test_ui, test_go, test_go_more, test_go_oldest, test_windows, golangci, codeql, build_all]
180203
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v2.')
181204
steps:
182-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
205+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
183206
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
184207
- uses: ./.github/promci/actions/publish_release
185208
with:
@@ -194,14 +217,14 @@ jobs:
194217
needs: [test_ui, codeql]
195218
steps:
196219
- name: Checkout
197-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
220+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
198221
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0
199222
- name: Install nodejs
200-
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
223+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
201224
with:
202225
node-version-file: "web/ui/.nvmrc"
203226
registry-url: "https://registry.npmjs.org"
204-
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
227+
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
205228
with:
206229
path: ~/.npm
207230
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

.github/workflows/codeql-analysis.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,19 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
language: ["go", "javascript"]
23+
language: ["javascript"]
2424

2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28-
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
29-
with:
30-
go-version: 1.21.x
27+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
3128

3229
- name: Initialize CodeQL
33-
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
30+
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
3431
with:
3532
languages: ${{ matrix.language }}
3633

3734
- name: Autobuild
38-
uses: github/codeql-action/autobuild@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
35+
uses: github/codeql-action/autobuild@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
3936

4037
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
38+
uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Push README to Docker Hub
3+
on:
4+
push:
5+
paths:
6+
- "README.md"
7+
- ".github/workflows/container_description.yml"
8+
branches: [ main, master ]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
PushDockerHubReadme:
15+
runs-on: ubuntu-latest
16+
name: Push README to Docker Hub
17+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
18+
steps:
19+
- name: git checkout
20+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
21+
- name: Set docker hub repo name
22+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
23+
- name: Push README to Dockerhub
24+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
25+
env:
26+
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
27+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
28+
with:
29+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
30+
provider: dockerhub
31+
short_description: ${{ env.DOCKER_REPO_NAME }}
32+
readme_file: 'README.md'
33+
34+
PushQuayIoReadme:
35+
runs-on: ubuntu-latest
36+
name: Push README to quay.io
37+
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
38+
steps:
39+
- name: git checkout
40+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
41+
- name: Set quay.io org name
42+
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
43+
- name: Set quay.io repo name
44+
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
45+
- name: Push README to quay.io
46+
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
47+
env:
48+
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
49+
with:
50+
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
51+
provider: quay
52+
readme_file: 'README.md'

.github/workflows/fuzzing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
fuzz-seconds: 600
2222
dry-run: false
2323
- name: Upload Crash
24-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
24+
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
2525
if: failure() && steps.build.outcome == 'success'
2626
with:
2727
name: artifacts

.github/workflows/repo_sync.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
container:
1414
image: quay.io/prometheus/golang-builder
1515
steps:
16-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
1717
- run: ./scripts/sync_repo_files.sh
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.PROMBOT_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)