Skip to content

Commit 4c4e215

Browse files
authored
Merge branch 'main' into examples-best-practices
2 parents fd683b8 + 6a90048 commit 4c4e215

Some content is hidden

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

42 files changed

+1365
-295
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ArthurSens @bwplotka @kakkoyun @vesari

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ jobs:
4646

4747
steps:
4848
- name: Checkout repository
49-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5050

5151
# Initializes the CodeQL tools for scanning.
5252
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
53+
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
5454
with:
5555
languages: ${{ matrix.language }}
5656
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -61,7 +61,7 @@ jobs:
6161
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6262
# If this step fails, then you should remove it and run the build manually (see below)
6363
- name: Autobuild
64-
uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
64+
uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
6565

6666
# ℹ️ Command-line programs to run using the OS shell.
6767
# 📚 https://git.io/JvXDl
@@ -75,4 +75,4 @@ jobs:
7575
# make release
7676

7777
- name: Perform CodeQL Analysis
78-
uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
78+
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0

.github/workflows/container_description.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
1919
steps:
2020
- name: git checkout
21-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2222
- name: Set docker hub repo name
2323
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
2424
- name: Push README to Dockerhub
@@ -40,7 +40,7 @@ jobs:
4040
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
4141
steps:
4242
- name: git checkout
43-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4444
- name: Set quay.io org name
4545
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
4646
- name: Set quay.io repo name

.github/workflows/dagger-golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
- name: Lint
28-
uses: dagger/dagger-for-github@fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb # v6.11.0
28+
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
2929
with:
3030
version: "latest"
3131
verb: call

.github/workflows/go.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
2525
steps:
2626
- name: Checkout code
27-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
- name: Read supported_go_versions.txt
2929
id: matrix
3030
run: |
@@ -43,17 +43,17 @@ jobs:
4343

4444
steps:
4545
- name: Checkout code
46-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4747

4848
- name: Run tests and check license
49-
uses: dagger/dagger-for-github@fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb # v6.11.0
49+
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
5050
with:
5151
version: "latest"
5252
verb: call
5353
args: -vvv --src . make --go-version ${{matrix.go_version}} --args 'check_license test'
5454

5555
- name: Run style and unused
56-
uses: dagger/dagger-for-github@fc945fa66fc7bfa72bc80f85b1a1ef4bd1d30cbb # v6.11.0
56+
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
5757
if: ${{ matrix.go_version == '1.21' }}
5858
with:
5959
version: "latest"

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout repository
27-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
- name: Install Go
29-
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
29+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
3030
with:
3131
go-version: 1.23.x
3232
- name: Install snmp_exporter/generator dependencies
3333
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
3434
if: github.repository == 'prometheus/snmp_exporter'
3535
- name: Lint
36-
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
36+
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
3737
with:
3838
args: --verbose
39-
version: v1.60.2
39+
version: v1.61.0

.github/workflows/update-go-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717

1818
- name: Execute bash script
1919
run: bash update-go-version.bash

.golangci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ linters:
2525
- ineffassign
2626
- misspell
2727
- nolintlint
28+
- perfsprint
2829
- predeclared
2930
- revive
3031
- staticcheck
3132
- unconvert
3233
- unused
34+
- usestdlibvars
3335
- wastedassign
3436

3537
issues:
@@ -66,6 +68,17 @@ linters-settings:
6668
local-prefixes: github.com/prometheus/client_golang
6769
gofumpt:
6870
extra-rules: true
71+
perfsprint:
72+
# Optimizes even if it requires an int or uint type cast.
73+
int-conversion: true
74+
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
75+
err-error: true
76+
# Optimizes `fmt.Errorf`.
77+
errorf: true
78+
# Optimizes `fmt.Sprintf` with only one argument.
79+
sprintf1: true
80+
# Optimizes into strings concatenation.
81+
strconcat: true
6982
revive:
7083
rules:
7184
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Unreleased
22

3+
## 1.20.5 / 2024-10-15
4+
5+
* [BUGFIX] testutil: Reverted #1424; functions using compareMetricFamilies are (again) only failing if filtered metricNames are in the expected input.
6+
7+
## 1.20.4 / 2024-09-07
8+
39
* [BUGFIX] histograms: Fix possible data race when appending exemplars vs metrics gather. #1623
410

511
## 1.20.3 / 2024-09-05
@@ -28,7 +34,7 @@
2834
* [FEATURE] promlint: Add duplicated metric lint rule. #1472
2935
* [BUGFIX] promlint: Relax metric type in name linter rule. #1455
3036
* [BUGFIX] promhttp: Make sure server instrumentation wrapping supports new and future extra responseWriter methods. #1480
31-
* [BUGFIX] testutil: Functions using compareMetricFamilies are now failing if filtered metricNames are not in the input. #1424
37+
* [BUGFIX] **breaking** testutil: Functions using compareMetricFamilies are now failing if filtered metricNames are not in the input. #1424 (reverted in 1.20.5)
3238

3339
## 1.19.0 / 2024-02-27
3440

MAINTAINERS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Arianna Vespri <[email protected]> @vesari
12
* Arthur Silva Sens <[email protected]> @ArthurSens
23
* Bartłomiej Płotka <[email protected]> @bwplotka
34
* Kemal Akkoyun <[email protected]> @kakkoyun

0 commit comments

Comments
 (0)