Skip to content

Commit 950ff92

Browse files
Merge branch 'master' into vmalert-proxy
2 parents 254bc7a + 57b2b9d commit 950ff92

File tree

461 files changed

+3689
-25218
lines changed

Some content is hidden

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

461 files changed

+3689
-25218
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ name: build
33
on:
44
push:
55
branches:
6-
- cluster
76
- master
87
paths:
98
- '**.go'
10-
- '**/Dockerfile*' # The trailing * is for app/vmui/Dockerfile-*.
9+
- '**/Dockerfile'
1110
- '**/Makefile'
11+
- '!app/vmui/Makefile'
12+
- '.github/workflows/build.yml'
1213
pull_request:
1314
branches:
14-
- cluster
1515
- master
1616
paths:
1717
- '**.go'
18-
- '**/Dockerfile*' # The trailing * is for app/vmui/Dockerfile-*.
18+
- '**/Dockerfile'
1919
- '**/Makefile'
20+
- '!app/vmui/Makefile'
21+
- '.github/workflows/build.yml'
2022

2123
permissions:
2224
contents: read

.github/workflows/codeql-analysis-go.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ name: 'CodeQL Go'
33
on:
44
push:
55
branches:
6-
- cluster
76
- master
87
paths:
98
- '**.go'
109
pull_request:
1110
branches:
12-
- cluster
1311
- master
1412
paths:
1513
- '**.go'

.github/workflows/codeql-analysis-js-ts.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ name: 'CodeQL JS/TS'
33
on:
44
push:
55
branches:
6-
- cluster
76
- master
87
paths:
98
- '**.js'
109
- '**.ts'
1110
- '**.tsx'
1211
pull_request:
1312
branches:
14-
- cluster
1513
- master
1614
paths:
1715
- '**.js'

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
5252
if [[ -n $(git status --porcelain) ]]; then
5353
git add .
54-
git commit -S -m "sync docs with VictoriaMetrics/VictoriaMetrics commit: ${{ steps.update.outputs.SHORT_SHA }}"
54+
git commit -S -m "sync docs with VictoriaMetrics/VictoriaLogs commit: ${{ steps.update.outputs.SHORT_SHA }}"
5555
git push
5656
fi
5757
working-directory: __vm-docs

.github/workflows/main-vmui.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: main-vmui
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'app/vmui/packages/vmui/**'
9+
pull_request:
10+
branches:
11+
- master
12+
paths:
13+
- 'app/vmui/packages/vmui/**'
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
cancel-in-progress: true
20+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
21+
22+
jobs:
23+
vmui-checks:
24+
name: VMUI Checks (lint, test, typecheck)
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Code checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: '24.x'
34+
35+
- name: Cache node-modules
36+
uses: actions/cache@v4
37+
with:
38+
path: |
39+
app/vmui/packages/vmui/node_modules
40+
key: vmui-artifacts-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
41+
restore-keys: vmui-artifacts-${{ runner.os }}-
42+
43+
- name: Run lint
44+
id: lint
45+
run: make vmui-lint
46+
continue-on-error: true
47+
48+
- name: Run tests
49+
id: test
50+
run: make vmui-test
51+
continue-on-error: true
52+
53+
- name: Run typecheck
54+
id: typecheck
55+
run: make vmui-typecheck
56+
continue-on-error: true
57+
58+
- name: Check overall status
59+
run: |
60+
echo "Lint status: ${{ steps.lint.outcome }}"
61+
echo "Test status: ${{ steps.test.outcome }}"
62+
echo "Typecheck status: ${{ steps.typecheck.outcome }}"
63+
64+
if [[ "${{ steps.lint.outcome }}" == "failure" || "${{ steps.test.outcome }}" == "failure" || "${{ steps.typecheck.outcome }}" == "failure" ]]; then
65+
echo "One or more checks failed"
66+
exit 1
67+
else
68+
echo "All checks passed"
69+
fi

.github/workflows/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ name: main
33
on:
44
push:
55
branches:
6-
- cluster
76
- master
87
paths:
98
- '**.go'
9+
- 'go.*'
10+
- '.github/workflows/main.yml'
1011
pull_request:
1112
branches:
12-
- cluster
1313
- master
1414
paths:
1515
- '**.go'
16+
- 'go.*'
17+
- '.github/workflows/main.yml'
1618

1719
permissions:
1820
contents: read

.golangci.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
1-
run:
2-
timeout: 2m
3-
1+
version: "2"
42
linters:
5-
enable:
6-
- revive
7-
8-
issues:
9-
exclude-rules:
10-
- linters:
11-
- staticcheck
12-
text: "SA(4003|1019|5011):"
13-
include:
14-
- EXC0012
15-
- EXC0014
16-
17-
linters-settings:
18-
errcheck:
19-
exclude-functions:
20-
- "fmt.Fprintf"
21-
- "fmt.Fprint"
22-
- "(net/http.ResponseWriter).Write"
3+
settings:
4+
errcheck:
5+
exclude-functions:
6+
- fmt.Fprintf
7+
- fmt.Fprint
8+
- (net/http.ResponseWriter).Write
9+
exclusions:
10+
generated: lax
11+
presets:
12+
- common-false-positives
13+
- legacy
14+
- std-error-handling
15+
rules:
16+
- linters:
17+
- staticcheck
18+
text: '(SA(4003|1019|5011)|QF1001):'
19+
paths:
20+
- third_party$
21+
- builtin$
22+
- examples$
23+
formatters:
24+
exclusions:
25+
generated: lax
26+
paths:
27+
- third_party$
28+
- builtin$
29+
- examples$

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ ifeq ($(PKG_TAG),)
1111
PKG_TAG := $(BUILDINFO_TAG)
1212
endif
1313

14-
GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TAG)-$(BUILDINFO_TAG)'
14+
GO_BUILDINFO = -X 'github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TAG)-$(BUILDINFO_TAG)'
1515
TAR_OWNERSHIP ?= --owner=1000 --group=1000
1616

17+
GOLANGCI_LINT_VERSION := 2.2.1
18+
1719
.PHONY: $(MAKECMDGOALS)
1820

1921
include app/*/Makefile
@@ -330,7 +332,7 @@ golangci-lint: install-golangci-lint
330332
GOEXPERIMENT=synctest golangci-lint run
331333

332334
install-golangci-lint:
333-
which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.64.7
335+
which golangci-lint && (golangci-lint --version | grep -q $(GOLANGCI_LINT_VERSION)) || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v$(GOLANGCI_LINT_VERSION)
334336

335337
remove-golangci-lint:
336338
rm -rf `which golangci-lint`

app/vlagent/remotewrite/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func TestCalculateRetryDuration(t *testing.T) {
2222
expectMaxDuration := helper(expectMinDuration)
2323
expectMinDuration = expectMinDuration - (1000 * time.Millisecond) // Avoid edge case when calculating time.Until(now)
2424

25-
if !(retryDuration >= expectMinDuration && retryDuration <= expectMaxDuration) {
25+
if retryDuration < expectMinDuration || retryDuration > expectMaxDuration {
2626
t.Fatalf(
2727
"incorrect retry duration, want (ms): [%d, %d], got (ms): %d",
2828
expectMinDuration.Milliseconds(), expectMaxDuration.Milliseconds(),

app/vlinsert/elasticsearch/elasticsearch_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package elasticsearch
33
import (
44
"bytes"
55
"fmt"
6+
"io"
7+
"testing"
8+
69
"github.com/golang/snappy"
710
"github.com/klauspost/compress/gzip"
811
"github.com/klauspost/compress/zlib"
912
"github.com/klauspost/compress/zstd"
10-
"io"
11-
"testing"
1213

1314
"github.com/VictoriaMetrics/VictoriaLogs/app/vlinsert/insertutil"
1415
)

0 commit comments

Comments
 (0)