Skip to content

Commit b42bfae

Browse files
authored
Merge branch 'master' into fix/close-readonly-connections-for-luascript
2 parents d1c26e1 + fa475cb commit b42bfae

File tree

173 files changed

+27892
-3769
lines changed

Some content is hidden

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

173 files changed

+27892
-3769
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: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.0.x"]="8.0.2"
29+
["7.4.x"]="rs-7.4.0-v5"
30+
["7.2.x"]="rs-7.2.0-v17"
31+
)
32+
33+
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
34+
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
35+
echo "REDIS_IMAGE=redis:${{ inputs.redis-version }}" >> $GITHUB_ENV
36+
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
37+
else
38+
echo "Version not found in the mapping."
39+
exit 1
40+
fi
41+
sleep 10 # wait for redis to start
42+
shell: bash
43+
- name: Set up Docker Compose environment with redis ${{ inputs.redis-version }}
44+
run: |
45+
make docker.start
46+
shell: bash
47+
- name: Run tests
48+
env:
49+
RCE_DOCKER: "true"
50+
RE_CLUSTER: "false"
51+
run: |
52+
make test.ci
53+
shell: bash

.github/wordlist.txt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
ACLs
2+
APIs
23
autoload
34
autoloader
45
autoloading
6+
analytics
57
Autoloading
68
backend
79
backends
@@ -13,6 +15,7 @@ customizable
1315
Customizable
1416
dataset
1517
de
18+
DisableIdentity
1619
ElastiCache
1720
extensibility
1821
FPM
@@ -26,6 +29,7 @@ Lua
2629
MSSQL
2730
namespace
2831
NoSQL
32+
OpenTelemetry
2933
ORM
3034
Packagist
3135
PhpRedis
@@ -43,15 +47,30 @@ RocksDB
4347
runtime
4448
SHA
4549
sharding
50+
SETNAME
51+
SpellCheck
4652
SSL
4753
struct
4854
stunnel
55+
SynDump
4956
TCP
5057
TLS
58+
UnstableResp
5159
uri
5260
URI
5361
url
5462
variadic
5563
RedisStack
5664
RedisGears
57-
RedisTimeseries
65+
RedisTimeseries
66+
RediSearch
67+
RawResult
68+
RawVal
69+
entra
70+
EntraID
71+
Entra
72+
OAuth
73+
Azure
74+
StreamingCredentialsProvider
75+
oauth
76+
entraid

.github/workflows/build.yml

Lines changed: 74 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,96 @@ 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.19.x, 1.20.x, 1.21.x]
20-
21-
services:
22-
redis:
23-
image: redis/redis-stack-server:edge
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.0.x" # Redis CE 8.0
22+
- "7.4.x" # Redis stack 7.4
23+
go-version:
24+
- "1.23.x"
25+
- "1.24.x"
2826

2927
steps:
3028
- name: Set up ${{ matrix.go-version }}
31-
uses: actions/setup-go@v4
29+
uses: actions/setup-go@v5
3230
with:
3331
go-version: ${{ matrix.go-version }}
3432

3533
- name: Checkout code
3634
uses: actions/checkout@v4
3735

38-
- name: Test
39-
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.x"]="8.0.2"
47+
["7.4.x"]="rs-7.4.0-v5"
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
67+
68+
test-redis-ce:
69+
name: test-redis-ce
70+
runs-on: ubuntu-latest
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
redis-version:
75+
- "8.0.x" # Redis CE 8.0
76+
- "7.4.x" # Redis stack 7.4
77+
- "7.2.x" # Redis stack 7.2
78+
go-version:
79+
- "1.23.x"
80+
- "1.24.x"
81+
82+
steps:
83+
- name: Checkout code
84+
uses: actions/checkout@v4
85+
86+
- name: Run tests
87+
uses: ./.github/actions/run-tests
88+
with:
89+
go-version: ${{matrix.go-version}}
90+
redis-version: ${{ matrix.redis-version }}
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: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,22 @@ jobs:
1616

1717
services:
1818
redis-stack:
19-
image: redis/redis-stack-server:latest
20-
options: >-
21-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
19+
image: redislabs/client-libs-test:8.0.2
20+
env:
21+
TLS_ENABLED: no
22+
REDIS_CLUSTER: no
23+
PORT: 6379
2224
ports:
2325
- 6379:6379
2426

2527
strategy:
2628
fail-fast: false
2729
matrix:
28-
go-version: [ "1.18", "1.19", "1.20", "1.21" ]
30+
go-version: ["1.24"]
2931

3032
steps:
3133
- name: Set up ${{ matrix.go-version }}
32-
uses: actions/setup-go@v4
34+
uses: actions/setup-go@v5
3335
with:
3436
go-version: ${{ matrix.go-version }}
3537

@@ -38,4 +40,4 @@ jobs:
3840

3941
- name: Test doc examples
4042
working-directory: ./doctests
41-
run: go test
43+
run: make test

.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@v3
25+
uses: golangci/[email protected]
26+
with:
27+
verify: true
28+

.github/workflows/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
# Drafts your next Release notes as Pull Requests are merged into "master"
19-
- uses: release-drafter/release-drafter@v5
19+
- uses: release-drafter/release-drafter@v6
2020
with:
2121
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
2222
config-name: release-drafter-config.yml

.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.33.1
11+
uses: rojopolis/spellcheck-github-actions@0.51.0
1212
with:
1313
config_path: .github/spellcheck-settings.yml
1414
task_name: Markdown

.github/workflows/stale-issues.yml

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

1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/stale@v8
15+
- uses: actions/stale@v9
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
stale-issue-message: 'This issue is marked stale. It will be closed in 30 days if it is not updated.'

0 commit comments

Comments
 (0)