Skip to content

Commit fefd008

Browse files
authored
Merge branch 'master' into deepsource
2 parents 9648801 + d7da608 commit fefd008

File tree

397 files changed

+18758
-6976
lines changed

Some content is hidden

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

397 files changed

+18758
-6976
lines changed

.github/workflows/codeql.yml

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

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@v5
31+
uses: actions/checkout@v6
3232
with:
3333
# We must fetch at least the immediate parents so that if this is
3434
# a pull request then we can checkout the head.

.github/workflows/docker-ghcrio.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- prepare
6363
steps:
6464
- name: Check out code
65-
uses: actions/checkout@v5
65+
uses: actions/checkout@v6
6666
with:
6767
fetch-tags: true
6868

@@ -71,10 +71,10 @@ jobs:
7171
uses: docker/metadata-action@v5
7272
with:
7373
images: ghcr.io/${{ github.repository }}
74-
74+
7575
- name: Set up Docker Buildx
7676
uses: docker/setup-buildx-action@v3
77-
77+
7878
- name: Build
7979
uses: docker/build-push-action@v6
8080
with:
@@ -111,14 +111,14 @@ jobs:
111111
112112
- name: Check out code
113113
if: github.event_name == 'workflow_dispatch'
114-
uses: actions/checkout@v5
114+
uses: actions/checkout@v6
115115
with:
116116
ref: ${{ inputs.ref }}
117117
fetch-tags: true
118118

119119
- name: Check out code
120120
if: github.event_name != 'workflow_dispatch'
121-
uses: actions/checkout@v5
121+
uses: actions/checkout@v6
122122
with:
123123
fetch-tags: true
124124

@@ -127,17 +127,17 @@ jobs:
127127
uses: docker/metadata-action@v5
128128
with:
129129
images: ghcr.io/${{ github.repository }}
130-
130+
131131
- name: Set up QEMU
132132
uses: docker/setup-qemu-action@v3
133133
if: ${{ matrix.platform.qemu }}
134134
with:
135135
platforms: ${{ matrix.platform.qemu }}
136136
cache-image: false
137-
137+
138138
- name: Set up Docker Buildx
139139
uses: docker/setup-buildx-action@v3
140-
140+
141141
- name: Login to GitHub Container Registry
142142
if: needs.prepare.outputs.publish_image
143143
uses: docker/login-action@v3
@@ -230,5 +230,3 @@ jobs:
230230
231231
- name: Inspect image
232232
run: docker buildx imagetools inspect ghcr.io/${{ needs.prepare.outputs.github_repository }}:${{ steps.meta.outputs.version }}
233-
234-

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
matrix: ${{ steps.build.outputs.matrix }}
1818
steps:
1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@v6
2121
with:
2222
go-version: ^1
2323

24-
- uses: actions/checkout@v5
24+
- uses: actions/checkout@v6
2525
name: Checkout
2626

2727
- name: Test

.github/workflows/tests.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,24 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
7-
branches: [ master ]
7+
branches: [master]
88

99
jobs:
1010
tests:
1111
name: Test code
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
go: [ 1.22.x, 1.23.x, 1.24.x, tip ]
15+
go: [oldstable, stable]
1616

1717
steps:
1818
- name: Set up Go stable
19-
if: matrix.go != 'tip'
20-
uses: actions/setup-go@v5
19+
uses: actions/setup-go@v6
2120
with:
2221
go-version: ${{ matrix.go }}
23-
- name: Set up Go tip
24-
if: matrix.go == 'tip'
25-
run: |
26-
curl -o go.tar.gz -L \
27-
https://github.com/AlekSi/golang-tip/releases/download/tip/master.linux-amd64.tar.gz
28-
sudo tar -C /usr/local -xzf go.tar.gz
29-
sudo ln -s /usr/local/go/bin/* /usr/local/bin/
30-
/usr/local/bin/go version
31-
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
22+
check-latest: true
3223

3324
- name: Check out code into the Go module directory
3425
uses: actions/checkout@v5
@@ -55,7 +46,7 @@ jobs:
5546
CGO_ENABLED: 1
5647

5748
- name: Govulncheck
58-
if: ${{ matrix.go == '1.24.x' }} # only do govulncheck when built with latest stable go
49+
if: ${{ matrix.go == 'stable' }} # only do govulncheck when built with latest stable go
5950
id: govulncheck
6051
uses: golang/govulncheck-action@v1
6152
with:
@@ -74,7 +65,7 @@ jobs:
7465
make sum-files
7566
7667
- name: Upload Artifact
77-
if: ${{ matrix.go == '1.24.x' }} # only upload artifact when built with latest stable go
68+
if: ${{ matrix.go == 'stable' }} # only upload artifact when built with latest stable go
7869
id: artifact
7970
uses: actions/upload-artifact@v6
8071
with:
@@ -87,7 +78,7 @@ jobs:
8778
md5sum
8879
8980
- name: Push packages to the autobuilds repo
90-
if: ${{ github.event_name == 'push' && matrix.go == '1.24.x' }} # only when built from master with latest stable go
81+
if: ${{ github.event_name == 'push' && matrix.go == 'stable' }} # only when built from master with latest stable go
9182
run: make DEVEL=1 packagecloud-autobuilds
9283
env:
9384
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

cache/cache.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ import (
1111
"sync/atomic"
1212
"time"
1313

14-
"github.com/cespare/xxhash/v2"
15-
1614
"github.com/go-graphite/go-carbon/helper"
1715
"github.com/go-graphite/go-carbon/points"
1816
"github.com/go-graphite/go-carbon/tags"
@@ -334,8 +332,7 @@ func (c *Cache) Add(p *points.Points) {
334332
if c.newMetricsChan != nil && c.newMetricCf != nil {
335333
// add metric to new metric channel if missed in bloom
336334
// despite what we have it in cache (new behaviour)
337-
hash := xxhash.Sum64([]byte(p.Metric))
338-
if !c.newMetricCf.Has(hash) {
335+
if hash := helper.HashString(p.Metric); !c.newMetricCf.Has(hash) {
339336
sendMetricToNewMetricChan(c, p.Metric)
340337
c.newMetricCf.Add(hash)
341338
}

cache/cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@ func benchmarkStrategy(b *testing.B, strategy string) {
9696
}
9797

9898
func BenchmarkUpdateQueueMax(b *testing.B) { benchmarkStrategy(b, "max") }
99-
func BenchmarkUpdateQueueSort(b *testing.B) { benchmarkStrategy(b, "sort") }
99+
func BenchmarkUpdateQueueSort(b *testing.B) { benchmarkStrategy(b, "sorted") }
100100
func BenchmarkUpdateQueueNoop(b *testing.B) { benchmarkStrategy(b, "noop") }

deploy/go-carbon.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Wants=network-online.target local-fs.target
66

77
[Service]
88
Type=simple
9+
User=carbon
10+
Group=carbon
911
ExecStart=/usr/bin/go-carbon -config /etc/go-carbon/go-carbon.conf
1012
ExecReload=/bin/kill -HUP $MAINPID
1113
KillSignal=USR2

go.mod

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.24.1
77
require (
88
cloud.google.com/go/pubsub v1.50.1
99
github.com/BurntSushi/toml v1.6.0
10-
github.com/IBM/sarama v1.46.0
10+
github.com/IBM/sarama v1.46.3
1111
github.com/NYTimes/gziphandler v1.1.1
1212
github.com/OneOfOne/go-utils v0.0.0-20180319162427-6019ff89a94e
1313
github.com/dgryski/go-expirecache v0.0.0-20170314133854-743ef98b2adb
@@ -20,7 +20,7 @@ require (
2020
github.com/golang/snappy v0.0.4 // indirect
2121
github.com/google/go-cmp v0.7.0
2222
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
23-
github.com/klauspost/compress v1.18.2
23+
github.com/klauspost/compress v1.18.3
2424
github.com/lomik/graphite-pickle v0.0.0-20171221213606-614e8df42119
2525
github.com/lomik/og-rek v0.0.0-20170411191824-628eefeb8d80
2626
github.com/lomik/stop v0.0.0-20161127103810-188e98d969bd
@@ -31,26 +31,26 @@ require (
3131
github.com/syndtr/goleveldb v1.0.0
3232
github.com/vmihailenco/msgpack/v5 v5.4.1
3333
go.uber.org/zap v1.27.1
34-
google.golang.org/api v0.248.0
35-
google.golang.org/grpc v1.75.0
34+
google.golang.org/api v0.264.0
35+
google.golang.org/grpc v1.78.0
3636
)
3737

3838
require (
39-
github.com/cespare/xxhash/v2 v2.3.0
4039
github.com/greatroar/blobloom v0.8.1
41-
github.com/zeebo/xxh3 v1.0.2
42-
golang.org/x/net v0.43.0
40+
github.com/zeebo/xxh3 v1.1.0
41+
golang.org/x/net v0.49.0
4342
google.golang.org/protobuf v1.36.11
4443
)
4544

4645
require (
4746
cloud.google.com/go v0.121.6 // indirect
48-
cloud.google.com/go/auth v0.16.5 // indirect
47+
cloud.google.com/go/auth v0.18.1 // indirect
4948
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
50-
cloud.google.com/go/compute/metadata v0.8.0 // indirect
51-
cloud.google.com/go/iam v1.5.2 // indirect
49+
cloud.google.com/go/compute/metadata v0.9.0 // indirect
50+
cloud.google.com/go/iam v1.5.3 // indirect
5251
cloud.google.com/go/pubsub/v2 v2.0.0 // indirect
5352
github.com/beorn7/perks v1.0.1 // indirect
53+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
5454
github.com/davecgh/go-spew v1.1.1 // indirect
5555
github.com/eapache/go-resiliency v1.7.0 // indirect
5656
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
@@ -60,15 +60,15 @@ require (
6060
github.com/go-logr/stdr v1.2.2 // indirect
6161
github.com/google/s2a-go v0.1.9 // indirect
6262
github.com/google/uuid v1.6.0 // indirect
63-
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
64-
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
63+
github.com/googleapis/enterprise-certificate-proxy v0.3.11 // indirect
64+
github.com/googleapis/gax-go/v2 v2.16.0 // indirect
6565
github.com/hashicorp/go-uuid v1.0.3 // indirect
6666
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
6767
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
6868
github.com/jcmturner/gofork v1.7.6 // indirect
6969
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
7070
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
71-
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
71+
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
7272
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7373
github.com/onsi/ginkgo v1.14.0 // indirect
7474
github.com/onsi/gomega v1.10.1 // indirect
@@ -81,23 +81,23 @@ require (
8181
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
8282
go.einride.tech/aip v0.73.0 // indirect
8383
go.opencensus.io v0.24.0 // indirect
84-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
84+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
8585
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
8686
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
87-
go.opentelemetry.io/otel v1.37.0 // indirect
88-
go.opentelemetry.io/otel/metric v1.37.0 // indirect
89-
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
90-
go.opentelemetry.io/otel/trace v1.37.0 // indirect
87+
go.opentelemetry.io/otel v1.39.0 // indirect
88+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
89+
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
90+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
9191
go.uber.org/multierr v1.11.0 // indirect
9292
go.yaml.in/yaml/v2 v2.4.2 // indirect
93-
golang.org/x/crypto v0.41.0 // indirect
94-
golang.org/x/oauth2 v0.30.0 // indirect
95-
golang.org/x/sync v0.16.0 // indirect
96-
golang.org/x/sys v0.35.0 // indirect
97-
golang.org/x/text v0.28.0 // indirect
98-
golang.org/x/time v0.12.0 // indirect
99-
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
100-
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
101-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
93+
golang.org/x/crypto v0.47.0 // indirect
94+
golang.org/x/oauth2 v0.34.0 // indirect
95+
golang.org/x/sync v0.19.0 // indirect
96+
golang.org/x/sys v0.40.0 // indirect
97+
golang.org/x/text v0.33.0 // indirect
98+
golang.org/x/time v0.14.0 // indirect
99+
google.golang.org/genproto v0.0.0-20251202230838-ff82c1b0f217 // indirect
100+
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
101+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260122232226-8e98ce8d340d // indirect
102102
gopkg.in/yaml.v3 v3.0.1 // indirect
103103
)

0 commit comments

Comments
 (0)