Skip to content

Commit 4296513

Browse files
authored
Merge branch 'master' into pool_recover_panic
2 parents c764368 + 4767d9d commit 4296513

File tree

203 files changed

+42793
-5447
lines changed

Some content is hidden

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

203 files changed

+42793
-5447
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
doctests/* @dmaier-redislabs

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

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: 'Run go-redis tests'
2+
description: 'Runs go-redis tests against different Redis versions and configurations'
3+
inputs:
4+
go-version:
5+
description: 'Go version to use for running tests'
6+
default: '1.23'
7+
redis-version:
8+
description: 'Redis version to test against'
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Set up ${{ inputs.go-version }}
14+
uses: actions/setup-go@v5
15+
with:
16+
go-version: ${{ inputs.go-version }}
17+
18+
- name: Setup Test environment
19+
env:
20+
REDIS_VERSION: ${{ inputs.redis-version }}
21+
CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ inputs.redis-version }}"
22+
run: |
23+
set -e
24+
redis_version_np=$(echo "$REDIS_VERSION" | grep -oP '^\d+.\d+')
25+
26+
# Mapping of redis version to redis testing containers
27+
declare -A redis_version_mapping=(
28+
["8.2.x"]="8.2-rc2-pre"
29+
["8.0.x"]="8.0.2"
30+
["7.4.x"]="rs-7.4.0-v5"
31+
["7.2.x"]="rs-7.2.0-v17"
32+
)
33+
34+
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
35+
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
36+
echo "REDIS_IMAGE=redis:${{ inputs.redis-version }}" >> $GITHUB_ENV
37+
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
38+
else
39+
echo "Version not found in the mapping."
40+
exit 1
41+
fi
42+
sleep 10 # wait for redis to start
43+
shell: bash
44+
- name: Set up Docker Compose environment with redis ${{ inputs.redis-version }}
45+
run: |
46+
make docker.start
47+
shell: bash
48+
- name: Run tests
49+
env:
50+
RCE_DOCKER: "true"
51+
RE_CLUSTER: "false"
52+
run: |
53+
make test.ci
54+
shell: bash

.github/spellcheck-settings.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
matrix:
2+
- name: Markdown
3+
expect_match: false
4+
apsell:
5+
lang: en
6+
d: en_US
7+
ignore-case: true
8+
dictionary:
9+
wordlists:
10+
- .github/wordlist.txt
11+
output: wordlist.dic
12+
pipeline:
13+
- pyspelling.filters.markdown:
14+
markdown_extensions:
15+
- markdown.extensions.extra:
16+
- pyspelling.filters.html:
17+
comments: false
18+
attributes:
19+
- alt
20+
ignores:
21+
- ':matches(code, pre)'
22+
- code
23+
- pre
24+
- blockquote
25+
- img
26+
sources:
27+
- 'README.md'
28+
- 'FAQ.md'
29+
- 'docs/**'

.github/wordlist.txt

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
ACLs
2+
APIs
3+
autoload
4+
autoloader
5+
autoloading
6+
analytics
7+
Autoloading
8+
backend
9+
backends
10+
behaviour
11+
CAS
12+
ClickHouse
13+
config
14+
customizable
15+
Customizable
16+
dataset
17+
de
18+
DisableIdentity
19+
ElastiCache
20+
extensibility
21+
FPM
22+
Golang
23+
IANA
24+
keyspace
25+
keyspaces
26+
Kvrocks
27+
localhost
28+
Lua
29+
MSSQL
30+
namespace
31+
NoSQL
32+
OpenTelemetry
33+
ORM
34+
Packagist
35+
PhpRedis
36+
pipelining
37+
pluggable
38+
Predis
39+
PSR
40+
Quickstart
41+
README
42+
rebalanced
43+
rebalancing
44+
redis
45+
Redis
46+
RocksDB
47+
runtime
48+
SHA
49+
sharding
50+
SETNAME
51+
SpellCheck
52+
SSL
53+
struct
54+
stunnel
55+
SynDump
56+
TCP
57+
TLS
58+
UnstableResp
59+
uri
60+
URI
61+
url
62+
variadic
63+
RedisStack
64+
RedisGears
65+
RedisTimeseries
66+
RediSearch
67+
RawResult
68+
RawVal
69+
entra
70+
EntraID
71+
Entra
72+
OAuth
73+
Azure
74+
StreamingCredentialsProvider
75+
oauth
76+
entraid
77+
MiB

.github/workflows/build.yml

Lines changed: 78 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,99 @@ name: Go
22

33
on:
44
push:
5-
branches: [master, v9]
5+
branches: [master, v9, v9.7, v9.8, 'ndyakov/*', 'ofekshenawa/*', 'htemelski-redis/*', 'ce/*']
66
pull_request:
7-
branches: [master, v9]
7+
branches: [master, v9, v9.7, v9.8, 'ndyakov/*', 'ofekshenawa/*', 'htemelski-redis/*', 'ce/*']
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.18.x, 1.19.x]
20-
21-
services:
22-
redis:
23-
image: redis
24-
options: >-
25-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
26-
ports:
27-
- 6379:6379
20+
redis-version:
21+
- "8.2.x" # Redis CE 8.2
22+
- "8.0.x" # Redis CE 8.0
23+
- "7.4.x" # Redis stack 7.4
24+
go-version:
25+
- "1.23.x"
26+
- "1.24.x"
2827

2928
steps:
3029
- name: Set up ${{ matrix.go-version }}
31-
uses: actions/setup-go@v3
30+
uses: actions/setup-go@v5
3231
with:
3332
go-version: ${{ matrix.go-version }}
3433

3534
- name: Checkout code
36-
uses: actions/checkout@v3
35+
uses: actions/checkout@v4
36+
37+
- name: Setup Test environment
38+
env:
39+
REDIS_VERSION: ${{ matrix.redis-version }}
40+
CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ matrix.redis-version }}"
41+
run: |
42+
set -e
43+
redis_version_np=$(echo "$REDIS_VERSION" | grep -oP '^\d+.\d+')
44+
45+
# Mapping of redis version to redis testing containers
46+
declare -A redis_version_mapping=(
47+
["8.2.x"]="8.2-rc2-pre"
48+
["8.0.x"]="8.0.2"
49+
["7.4.x"]="rs-7.4.0-v5"
50+
)
51+
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
52+
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
53+
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
54+
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
55+
else
56+
echo "Version not found in the mapping."
57+
exit 1
58+
fi
59+
shell: bash
60+
- name: Set up Docker Compose environment with redis ${{ matrix.redis-version }}
61+
run: make docker.start
62+
shell: bash
63+
- name: Benchmark Tests
64+
env:
65+
RCE_DOCKER: "true"
66+
RE_CLUSTER: "false"
67+
run: make bench
68+
shell: bash
69+
70+
test-redis-ce:
71+
name: test-redis-ce
72+
runs-on: ubuntu-latest
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
redis-version:
77+
- "8.2.x" # Redis CE 8.2
78+
- "8.0.x" # Redis CE 8.0
79+
- "7.4.x" # Redis stack 7.4
80+
- "7.2.x" # Redis stack 7.2
81+
go-version:
82+
- "1.23.x"
83+
- "1.24.x"
84+
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v4
88+
89+
- name: Run tests
90+
uses: ./.github/actions/run-tests
91+
with:
92+
go-version: ${{matrix.go-version}}
93+
redis-version: ${{ matrix.redis-version }}
94+
95+
- name: Upload to Codecov
96+
uses: codecov/codecov-action@v5
97+
with:
98+
files: coverage.txt
99+
token: ${{ secrets.CODECOV_TOKEN }}
37100

38-
- name: Test
39-
run: make test

.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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Documentation Tests
2+
3+
on:
4+
push:
5+
branches: [master, examples]
6+
pull_request:
7+
branches: [master, examples]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
doctests:
14+
name: doctests
15+
runs-on: ubuntu-latest
16+
17+
services:
18+
redis-stack:
19+
image: redislabs/client-libs-test:8.0.2
20+
env:
21+
TLS_ENABLED: no
22+
REDIS_CLUSTER: no
23+
PORT: 6379
24+
ports:
25+
- 6379:6379
26+
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
go-version: ["1.24"]
31+
32+
steps:
33+
- name: Set up ${{ matrix.go-version }}
34+
uses: actions/setup-go@v5
35+
with:
36+
go-version: ${{ matrix.go-version }}
37+
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Test doc examples
42+
working-directory: ./doctests
43+
run: make test

0 commit comments

Comments
 (0)