Skip to content

Commit 99a09c6

Browse files
authored
Merge branch 'master' into master
2 parents 113031f + 4e22885 commit 99a09c6

File tree

143 files changed

+10166
-1677
lines changed

Some content is hidden

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

143 files changed

+10166
-1677
lines changed

.github/actions/run-tests/action.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,33 @@ runs:
2121
CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ inputs.redis-version }}"
2222
run: |
2323
set -e
24-
redis_major_version=$(echo "$REDIS_VERSION" | grep -oP '^\d+')
25-
if (( redis_major_version < 8 )); then
26-
echo "Using redis-stack for module tests"
27-
else
28-
echo "Using redis CE for module tests"
29-
fi
24+
redis_version_np=$(echo "$REDIS_VERSION" | grep -oP '^\d+.\d+')
3025
3126
# Mapping of redis version to redis testing containers
3227
declare -A redis_version_mapping=(
33-
["8.0-M03"]="8.0-M04-pre"
28+
["8.0.1"]="8.0.1-pre"
3429
["7.4.2"]="rs-7.4.0-v2"
3530
["7.2.7"]="rs-7.2.0-v14"
3631
)
3732
3833
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
39-
echo "REDIS_MAJOR_VERSION=${redis_major_version}" >> $GITHUB_ENV
34+
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
4035
echo "REDIS_IMAGE=redis:${{ inputs.redis-version }}" >> $GITHUB_ENV
4136
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
4237
else
4338
echo "Version not found in the mapping."
4439
exit 1
4540
fi
46-
sleep 10 # time to settle
41+
sleep 10 # wait for redis to start
4742
shell: bash
4843
- name: Set up Docker Compose environment with redis ${{ inputs.redis-version }}
49-
run: docker compose --profile all up -d
44+
run: |
45+
make docker.start
5046
shell: bash
5147
- name: Run tests
5248
env:
5349
RCE_DOCKER: "true"
5450
RE_CLUSTER: "false"
5551
run: |
56-
go test \
57-
--ginkgo.skip-file="ring_test.go" \
58-
--ginkgo.skip-file="sentinel_test.go" \
59-
--ginkgo.skip-file="pubsub_test.go" \
60-
--ginkgo.skip-file="gears_commands_test.go" \
61-
--ginkgo.label-filter="!NonRedisEnterprise"
52+
make test.ci
6253
shell: bash

.github/wordlist.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Lua
2929
MSSQL
3030
namespace
3131
NoSQL
32+
OpenTelemetry
3233
ORM
3334
Packagist
3435
PhpRedis
@@ -64,4 +65,12 @@ RedisGears
6465
RedisTimeseries
6566
RediSearch
6667
RawResult
67-
RawVal
68+
RawVal
69+
entra
70+
EntraID
71+
Entra
72+
OAuth
73+
Azure
74+
StreamingCredentialsProvider
75+
oauth
76+
entraid

.github/workflows/build.yml

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,27 @@ name: Go
22

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

99
permissions:
1010
contents: read
1111

1212
jobs:
13-
build:
14-
name: build
13+
14+
benchmark:
15+
name: benchmark
1516
runs-on: ubuntu-latest
1617
strategy:
1718
fail-fast: false
1819
matrix:
19-
go-version: [1.21.x, 1.22.x, 1.23.x]
20+
redis-version:
21+
- "8.0.1" # 8.0.1
22+
- "7.4.2" # should use redis stack 7.4
23+
go-version:
24+
- "1.23.x"
25+
- "1.24.x"
2026

2127
steps:
2228
- name: Set up ${{ matrix.go-version }}
@@ -27,31 +33,53 @@ jobs:
2733
- name: Checkout code
2834
uses: actions/checkout@v4
2935

30-
- name: Test
31-
run: make test
36+
- name: Setup Test environment
37+
env:
38+
REDIS_VERSION: ${{ matrix.redis-version }}
39+
CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ matrix.redis-version }}"
40+
run: |
41+
set -e
42+
redis_version_np=$(echo "$REDIS_VERSION" | grep -oP '^\d+.\d+')
43+
44+
# Mapping of redis version to redis testing containers
45+
declare -A redis_version_mapping=(
46+
["8.0.1"]="8.0.1-pre"
47+
["7.4.2"]="rs-7.4.0-v2"
48+
)
49+
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
50+
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
51+
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
52+
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
53+
else
54+
echo "Version not found in the mapping."
55+
exit 1
56+
fi
57+
shell: bash
58+
- name: Set up Docker Compose environment with redis ${{ matrix.redis-version }}
59+
run: make docker.start
60+
shell: bash
61+
- name: Benchmark Tests
62+
env:
63+
RCE_DOCKER: "true"
64+
RE_CLUSTER: "false"
65+
run: make bench
66+
shell: bash
3267

33-
- name: Upload to Codecov
34-
uses: codecov/codecov-action@v5
35-
with:
36-
files: coverage.txt
37-
token: ${{ secrets.CODECOV_TOKEN }}
38-
3968
test-redis-ce:
4069
name: test-redis-ce
4170
runs-on: ubuntu-latest
4271
strategy:
4372
fail-fast: false
4473
matrix:
4574
redis-version:
46-
- "8.0-M03" # 8.0 milestone 4
75+
- "8.0.1" # 8.0.1
4776
- "7.4.2" # should use redis stack 7.4
4877
- "7.2.7" # should redis stack 7.2
4978
go-version:
50-
- "1.22.x"
5179
- "1.23.x"
80+
- "1.24.x"
5281

5382
steps:
54-
5583
- name: Checkout code
5684
uses: actions/checkout@v4
5785

@@ -60,4 +88,10 @@ jobs:
6088
with:
6189
go-version: ${{matrix.go-version}}
6290
redis-version: ${{ matrix.redis-version }}
63-
91+
92+
- name: Upload to Codecov
93+
uses: codecov/codecov-action@v5
94+
with:
95+
files: coverage.txt
96+
token: ${{ secrets.CODECOV_TOKEN }}
97+

.github/workflows/codeql-analysis.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [master, v9, v9.7, v9.8]
17+
pull_request:
18+
branches: [master, v9, v9.7, v9.8]
19+
20+
jobs:
21+
analyze:
22+
name: Analyze
23+
runs-on: ubuntu-latest
24+
permissions:
25+
actions: read
26+
contents: read
27+
security-events: write
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
language: [ 'go' ]
33+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
34+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v4
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v3
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v3
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v3

.github/workflows/doctests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
go-version: [ "1.21", "1.22", "1.23" ]
28+
go-version: ["1.24"]
2929

3030
steps:
3131
- name: Set up ${{ matrix.go-version }}
@@ -38,4 +38,4 @@ jobs:
3838

3939
- name: Test doc examples
4040
working-directory: ./doctests
41-
run: go test
41+
run: go test -v

.github/workflows/golangci-lint.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,21 @@ on:
88
- master
99
- main
1010
- v9
11+
- v9.8
1112
pull_request:
1213

1314
permissions:
1415
contents: read
16+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
1517

1618
jobs:
1719
golangci:
18-
permissions:
19-
contents: read # for actions/checkout to fetch code
20-
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
2120
name: lint
2221
runs-on: ubuntu-latest
2322
steps:
2423
- uses: actions/checkout@v4
2524
- name: golangci-lint
26-
uses: golangci/golangci-lint-action@v6
25+
uses: golangci/[email protected]
26+
with:
27+
verify: true
28+

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout
99
uses: actions/checkout@v4
1010
- name: Check Spelling
11-
uses: rojopolis/spellcheck-github-actions@0.45.0
11+
uses: rojopolis/spellcheck-github-actions@0.49.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

.github/workflows/test-redis-enterprise.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: RE Tests
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, v9, v9.7, v9.8]
66
pull_request:
77

88
permissions:
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
go-version: [1.23.x]
18+
go-version: [1.24.x]
1919
re-build: ["7.4.2-54"]
2020

2121
steps:
@@ -47,12 +47,11 @@ jobs:
4747
- name: Test
4848
env:
4949
RE_CLUSTER: true
50-
REDIS_MAJOR_VERSION: 7
50+
REDIS_VERSION: "7.4"
5151
run: |
5252
go test \
5353
--ginkgo.skip-file="ring_test.go" \
5454
--ginkgo.skip-file="sentinel_test.go" \
5555
--ginkgo.skip-file="osscluster_test.go" \
5656
--ginkgo.skip-file="pubsub_test.go" \
57-
--ginkgo.skip-file="gears_commands_test.go" \
5857
--ginkgo.label-filter='!NonRedisEnterprise'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ testdata/*
55
*.tar.gz
66
*.dic
77
redis8tests.sh
8+
coverage.txt
9+
**/coverage.txt
10+
.vscode
11+
tmp/*

.golangci.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1+
version: "2"
12
run:
2-
concurrency: 8
3-
deadline: 5m
3+
timeout: 5m
44
tests: false
5+
linters:
6+
settings:
7+
staticcheck:
8+
checks:
9+
- all
10+
# Incorrect or missing package comment.
11+
# https://staticcheck.dev/docs/checks/#ST1000
12+
- -ST1000
13+
# Omit embedded fields from selector expression.
14+
# https://staticcheck.dev/docs/checks/#QF1008
15+
- -QF1008
16+
- -ST1003
17+
exclusions:
18+
generated: lax
19+
presets:
20+
- comments
21+
- common-false-positives
22+
- legacy
23+
- std-error-handling
24+
paths:
25+
- third_party$
26+
- builtin$
27+
- examples$
28+
formatters:
29+
exclusions:
30+
generated: lax
31+
paths:
32+
- third_party$
33+
- builtin$
34+
- examples$

0 commit comments

Comments
 (0)