Skip to content

Commit 0c5e620

Browse files
agneumNikolayS
authored andcommitted
chore(deps): bump backend dependencies, add upgrades and CVE fixes implementation plan
1 parent 21abcb5 commit 0c5e620

25 files changed

Lines changed: 704 additions & 374 deletions

docs/plans/20260402-dependency-upgrades-cve-fixes.md

Lines changed: 374 additions & 0 deletions
Large diffs are not rendered by default.

engine/.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ workflow:
99

1010
default:
1111
image:
12-
name: golang:1.24
12+
name: golang:1.26
1313
pull_policy: if-not-present
1414
interruptible: true # All jobs can be cancelled by default
1515

@@ -70,7 +70,7 @@ lint:
7070
build-binary-alpine:
7171
<<: *only_engine
7272
image:
73-
name: golang:1.24-alpine
73+
name: golang:1.26-alpine
7474
pull_policy: if-not-present
7575
stage: build-binary
7676
artifacts:

engine/.golangci.yml

Lines changed: 95 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,122 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
issues-exit-code: 1
44
tests: true
55
output:
66
formats:
7-
- format: colored-line-number
8-
print-issued-lines: true
9-
print-linter-name: true
10-
11-
linters-settings:
12-
errcheck:
13-
check-type-assertions: false
14-
check-blank: false
15-
exclude-functions:
16-
- (*os.File).Close
17-
errorlint:
18-
errorf: true
19-
asserts: true
20-
comparison: true
21-
gofmt:
22-
simplify: true
23-
gofumpt:
24-
extra-rules: false
25-
gosimple:
26-
checks: [ "all" ]
27-
goimports:
28-
local-prefixes: gitlab.com/postgres-ai/database-lab
29-
dupl:
30-
threshold: 120
31-
goconst:
32-
min-len: 3
33-
min-occurrences: 5
34-
lll:
35-
line-length: 140
36-
tab-width: 1
37-
mnd:
38-
ignored-functions:
39-
- strconv.Format*
40-
- os.*
41-
- strconv.Parse*
42-
- strings.SplitN
43-
- bytes.SplitN
44-
revive:
45-
confidence: 0.8
46-
unused:
47-
exported-fields-are-used: false
48-
unparam:
49-
check-exported: false
50-
nakedret:
51-
max-func-lines: 20
52-
prealloc:
53-
simple: true
54-
range-loops: true
55-
for-loops: true
56-
gocritic:
57-
disabled-checks:
58-
- regexpMust
59-
- rangeValCopy
60-
- appendAssign
61-
- hugeParam
62-
enabled-tags:
63-
- performance
64-
disabled-tags:
65-
- experimental
66-
staticcheck:
67-
checks: [ "all" ]
68-
7+
text:
8+
path: stdout
9+
print-linter-name: true
10+
print-issued-lines: true
6911
linters:
7012
enable:
7113
- dupl
7214
- errcheck
7315
- gochecknoinits
7416
- goconst
7517
- gocritic
76-
- goimports
77-
- gosimple
7818
- govet
7919
- ineffassign
8020
- lll
8121
- misspell
8222
- mnd
83-
- prealloc
8423
- revive
8524
- staticcheck
86-
- stylecheck
8725
- unconvert
88-
- unused
8926
- unparam
9027
- wsl
91-
enable-all: false
9228
disable:
9329
- depguard
94-
- gosec
95-
- gocyclo # currently unmaintained
96-
fast: false
97-
30+
- gocyclo
31+
- prealloc # disabled: produces false positives on non-trivial loops
32+
settings:
33+
dupl:
34+
threshold: 120
35+
errcheck:
36+
check-type-assertions: false
37+
check-blank: false
38+
exclude-functions:
39+
- (*os.File).Close
40+
errorlint:
41+
errorf: true
42+
asserts: true
43+
comparison: true
44+
goconst:
45+
min-len: 3
46+
min-occurrences: 5
47+
gocritic:
48+
disabled-checks:
49+
- regexpMust
50+
- rangeValCopy
51+
- appendAssign
52+
- hugeParam
53+
enabled-tags:
54+
- performance
55+
disabled-tags:
56+
- experimental
57+
lll:
58+
line-length: 140
59+
tab-width: 1
60+
mnd:
61+
ignored-functions:
62+
- strconv.Format*
63+
- os.*
64+
- strconv.Parse*
65+
- strings.SplitN
66+
- bytes.SplitN
67+
nakedret:
68+
max-func-lines: 20
69+
prealloc:
70+
simple: true
71+
range-loops: true
72+
for-loops: true
73+
revive:
74+
confidence: 0.8
75+
staticcheck:
76+
checks:
77+
- all
78+
- -QF1001
79+
- -QF1006
80+
- -QF1008
81+
- -QF1012
82+
unparam:
83+
check-exported: false
84+
unused:
85+
exported-fields-are-used: false
86+
exclusions:
87+
generated: lax
88+
rules:
89+
- linters:
90+
- dupl
91+
- errcheck
92+
- gocyclo
93+
- lll
94+
- mnd
95+
- wsl
96+
path: _test\.go
97+
paths:
98+
- vendor
99+
- third_party$
100+
- builtin$
101+
- examples$
98102
issues:
99-
exclude-rules:
100-
- path: _test\.go
101-
linters:
102-
- dupl
103-
- gocyclo
104-
- lll
105-
- errcheck
106-
- wsl
107-
- mnd
108-
exclude-dirs:
109-
- vendor
110-
111-
exclude-use-default: false
112103
max-issues-per-linter: 0
113104
max-same-issues: 0
105+
formatters:
106+
enable:
107+
- goimports
108+
settings:
109+
gofmt:
110+
simplify: true
111+
gofumpt:
112+
extra-rules: false
113+
goimports:
114+
local-prefixes:
115+
- gitlab.com/postgres-ai/database-lab
116+
exclusions:
117+
generated: lax
118+
paths:
119+
- vendor
120+
- third_party$
121+
- builtin$
122+
- examples$

engine/Dockerfile.dblab-server-debug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# How to start a container: https://postgres.ai/docs/how-to-guides/administration/engine-manage
22

33
# Compile stage
4-
FROM golang:1.24 AS build-env
4+
FROM golang:1.26 AS build-env
55

66
# Build Delve
77
RUN go install github.com/go-delve/delve/cmd/dlv@latest
@@ -12,7 +12,7 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest
1212
# RUN GO111MODULE=on CGO_ENABLED=0 go build -gcflags="all=-N -l" -o /dblab-server-debug ./cmd/database-lab/main.go
1313

1414
# Final stage
15-
FROM docker:27.5.1
15+
FROM docker:29.3.1
1616

1717
# Install dependencies
1818
RUN apk update \

engine/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ help: ## Display the help message
3535
all: clean build ## Build all binary components of the project
3636

3737
install-lint: ## Install the linter to $GOPATH/bin which is expected to be in $PATH
38-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
38+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4
3939

4040
run-lint: ## Run linters
4141
golangci-lint run
42+
golangci-lint fmt --diff
4243

4344
lint: install-lint run-lint ## Install and run linters
4445

engine/cmd/cli/commands/teleport/tctl.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,7 @@ func runTctl(ctx context.Context, tctlPath, identityFile, proxyAddr string, args
6161
ctx, cancel := context.WithTimeout(ctx, tctlCommandTimeout)
6262
defer cancel()
6363

64-
baseArgs := []string{
65-
"--identity", identityFile,
66-
"--auth-server", proxyAddr,
67-
}
64+
baseArgs := []string{"--identity", identityFile, "--auth-server", proxyAddr}
6865
fullArgs := append(baseArgs, args...)
6966

7067
out, err := exec.CommandContext(ctx, tctlPath, fullArgs...).CombinedOutput()

engine/go.mod

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module gitlab.com/postgres-ai/database-lab/v3
22

3-
go 1.24.7
3+
go 1.26.0
44

55
require (
66
github.com/AlekSi/pointer v1.2.0
@@ -11,7 +11,7 @@ require (
1111
github.com/aws/aws-sdk-go-v2/config v1.32.12
1212
github.com/aws/aws-sdk-go-v2/service/rds v1.113.1
1313
github.com/containerd/errdefs v1.0.0
14-
github.com/docker/cli v29.3.0+incompatible
14+
github.com/docker/cli v28.5.2+incompatible
1515
github.com/docker/docker v28.5.2+incompatible
1616
github.com/docker/go-connections v0.6.0
1717
github.com/docker/go-units v0.5.0
@@ -21,8 +21,7 @@ require (
2121
github.com/google/uuid v1.6.0
2222
github.com/gorilla/mux v1.8.0
2323
github.com/gorilla/websocket v1.5.3
24-
github.com/jackc/pgtype v1.14.4
25-
github.com/jackc/pgx/v4 v4.18.3
24+
github.com/jackc/pgx/v5 v5.7.5
2625
github.com/lib/pq v1.10.9
2726
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
2827
github.com/pkg/errors v0.9.1
@@ -38,8 +37,8 @@ require (
3837
github.com/urfave/cli/v2 v2.25.7
3938
github.com/wagslane/go-password-validator v0.3.0
4039
golang.org/x/crypto v0.45.0
41-
golang.org/x/mod v0.29.0
42-
golang.org/x/oauth2 v0.35.0
40+
golang.org/x/mod v0.32.0
41+
golang.org/x/oauth2 v0.36.0
4342
gopkg.in/yaml.v2 v2.4.0
4443
gopkg.in/yaml.v3 v3.0.1
4544
)
@@ -76,12 +75,8 @@ require (
7675
github.com/go-logr/stdr v1.2.2 // indirect
7776
github.com/go-ole/go-ole v1.2.6 // indirect
7877
github.com/google/go-querystring v1.1.0 // indirect
79-
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
80-
github.com/jackc/pgconn v1.14.3 // indirect
81-
github.com/jackc/pgio v1.0.0 // indirect
8278
github.com/jackc/pgpassfile v1.0.0 // indirect
83-
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
84-
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
79+
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
8580
github.com/jmespath/go-jmespath v0.4.0 // indirect
8681
github.com/klauspost/compress v1.18.0 // indirect
8782
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
@@ -110,16 +105,15 @@ require (
110105
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
111106
github.com/yusufpapurcu/wmi v1.2.4 // indirect
112107
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
113-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect
114-
go.opentelemetry.io/otel v1.40.0 // indirect
115-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
116-
go.opentelemetry.io/otel/metric v1.40.0 // indirect
117-
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
118-
go.opentelemetry.io/otel/trace v1.40.0 // indirect
119-
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
108+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect
109+
go.opentelemetry.io/otel v1.42.0 // indirect
110+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 // indirect
111+
go.opentelemetry.io/otel/metric v1.42.0 // indirect
112+
go.opentelemetry.io/otel/trace v1.42.0 // indirect
113+
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
120114
go.yaml.in/yaml/v2 v2.4.2 // indirect
121-
golang.org/x/sys v0.40.0 // indirect
122-
golang.org/x/text v0.31.0 // indirect
115+
golang.org/x/sys v0.41.0 // indirect
116+
golang.org/x/text v0.34.0 // indirect
123117
golang.org/x/time v0.12.0 // indirect
124-
google.golang.org/protobuf v1.36.8 // indirect
118+
google.golang.org/protobuf v1.36.11 // indirect
125119
)

0 commit comments

Comments
 (0)