Skip to content

Commit 8c1abf4

Browse files
committed
Merge branch 'main' into feature/promsafe
2 parents 1ba5c75 + 2356bb3 commit 8c1abf4

File tree

72 files changed

+2524
-858
lines changed

Some content is hidden

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

72 files changed

+2524
-858
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/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
- package-ecosystem: "gomod"
8+
directory: "/dagger"
9+
schedule:
10+
interval: "monthly"
711
- package-ecosystem: "gomod"
812
directory: "/examples/middleware"
913
schedule:

.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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
26+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
- name: Lint
28-
uses: dagger/dagger-for-github@v5
28+
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
2929
with:
3030
version: "latest"
3131
verb: call

.github/workflows/go.yml

Lines changed: 5 additions & 5 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@v4
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
- name: Read supported_go_versions.txt
2929
id: matrix
3030
run: |
@@ -43,18 +43,18 @@ jobs:
4343

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

4848
- name: Run tests and check license
49-
uses: dagger/dagger-for-github@v5
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@v6
57-
if: ${{ matrix.go_version == '1.20' }}
56+
uses: dagger/dagger-for-github@ad6a4e308a42fb2cf9be8b060f9aba9d57d4c9aa # v6.14.0
57+
if: ${{ matrix.go_version == '1.21' }}
5858
with:
5959
version: "latest"
6060
verb: call

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 5 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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:
31-
go-version: 1.22.x
31+
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.59.1
39+
version: v1.62.0

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

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

1818
- name: Execute bash script
1919
run: bash update-go-version.bash
@@ -22,7 +22,7 @@ jobs:
2222
# no pull request will be created and the action exits silently.
2323
- name: Create a Pull Request
2424
if: github.event_name != 'pull_request'
25-
uses: peter-evans/create-pull-request@v6
25+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
2626
with:
2727
token: ${{ secrets.GITHUB_TOKEN }}
2828
commit-message: "Update Go Collector metrics for new Go version"

.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: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
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+
9+
* [BUGFIX] histograms: Fix possible data race when appending exemplars vs metrics gather. #1623
10+
11+
## 1.20.3 / 2024-09-05
12+
13+
* [BUGFIX] histograms: Fix possible data race when appending exemplars. #1608
14+
315
## 1.20.2 / 2024-08-23
416

517
* [BUGFIX] promhttp: Unset Content-Encoding header when data is uncompressed. #1596
@@ -22,7 +34,7 @@
2234
* [FEATURE] promlint: Add duplicated metric lint rule. #1472
2335
* [BUGFIX] promlint: Relax metric type in name linter rule. #1455
2436
* [BUGFIX] promhttp: Make sure server instrumentation wrapping supports new and future extra responseWriter methods. #1480
25-
* [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)
2638

2739
## 1.19.0 / 2024-02-27
2840

0 commit comments

Comments
 (0)