Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paths-ignore:
- "examples/kotlin/*"
- "examples/**"
142 changes: 135 additions & 7 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,173 @@ on:
- release-*
schedule:
- cron: "37 18 * * 6"
workflow_dispatch:

jobs:
# Run CodeQL analysis for each language
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: csharp
build-mode: none
build-mode: manual
- language: go
build-mode: autobuild
build-mode: manual
- language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
build-mode: manual
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: rust
build-mode: none
- language: c-cpp
build-mode: manual
- language: actions
build-mode: none

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: .github/codeql/codeql-config.yml

- if: matrix.build-mode == 'manual'
# C++ Build
- name: Build C++ components
if: matrix.language == 'c-cpp'
shell: bash
run: |
cd glide-core
cargo build --release

# Go Build
- name: Set up Go cache
if: matrix.language == 'go'
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('go/go.mod', 'go/go.sum') }}-protoc-gen-go-v1.33.0
restore-keys: |
${{ runner.os }}-go-

- name: Cache protoc binary
if: matrix.language == 'go'
uses: actions/cache@v4
with:
path: /usr/local/bin/protoc
key: ${{ runner.os }}-protoc-29.1
restore-keys: |
${{ runner.os }}-protoc-

- name: Install protoc-gen-go
if: matrix.language == 'go'
shell: bash
run: |
# Ensure Go bin directory is in PATH
export PATH=$PATH:$(go env GOPATH)/bin
# Check if protoc-gen-go is already installed
if ! command -v protoc-gen-go &> /dev/null; then
echo "Installing protoc-gen-go..."
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.33.0
else
echo "protoc-gen-go already installed: $(protoc-gen-go --version)"
fi

- name: Install protoc compiler
if: matrix.language == 'go'
shell: bash
run: |
# Check if protoc is already installed with correct version
if ! command -v protoc &> /dev/null || ! protoc --version | grep -q "29.1"; then
echo "Installing protoc 29.1..."
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip
sudo unzip protoc-29.1-linux-x86_64.zip -d /usr/local
sudo chmod +x /usr/local/bin/protoc
else
echo "protoc already installed: $(protoc --version)"
fi

- name: Build Go components
if: matrix.language == 'go'
shell: bash
run: |
# Ensure Go bin directory is in PATH
export PATH=$PATH:$(go env GOPATH)/bin

# Create minimal lib.h to satisfy CGO imports for CodeQL analysis
echo "Creating minimal lib.h for CodeQL analysis..."
echo "// Minimal header for CodeQL analysis" > go/lib.h
echo "#ifndef LIB_H" >> go/lib.h
echo "#define LIB_H" >> go/lib.h
echo "// Placeholder definitions for CodeQL analysis" >> go/lib.h
echo "#endif" >> go/lib.h

# Generate protobuf files
cd go
make generate-protobuf

# For CodeQL analysis, we just need the source code available
# Try to build but don't fail if it can't link with Rust library
echo "Attempting Go build for CodeQL analysis..."
go build ./... || echo "Go build failed due to missing Rust dependencies, but source code is available for CodeQL analysis"

# C# Build
- name: Setup .NET
if: matrix.language == 'csharp'
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Build C# components
if: matrix.language == 'csharp'
shell: bash
run: |
cd csharp
dotnet build sources/Valkey.Glide/Valkey.Glide.csproj --configuration Lint --framework net8.0
dotnet build tests/Valkey.Glide.UnitTests/Valkey.Glide.UnitTests.csproj --configuration Debug --framework net8.0

# Java/Kotlin Build
- name: Cache protoc binary for Java
if: matrix.language == 'java-kotlin'
uses: actions/cache@v4
with:
path: /usr/local/bin/protoc
key: ${{ runner.os }}-protoc-29.1
restore-keys: |
${{ runner.os }}-protoc-

- name: Build Java/Kotlin components
if: matrix.language == 'java-kotlin'
shell: bash
run: |
echo 'TODO: build commands for all java and kotlin codes.'
# Check if protoc is already installed with correct version
if ! command -v protoc &> /dev/null || ! protoc --version | grep -q "29.1"; then
echo "Installing protoc 29.1..."
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v29.1/protoc-29.1-linux-x86_64.zip
sudo unzip protoc-29.1-linux-x86_64.zip -d /usr/local
sudo chmod +x /usr/local/bin/protoc
else
echo "protoc already installed: $(protoc --version)"
fi
# Build only Java components (skip Rust build for CodeQL analysis)
cd java
./gradlew :client:processResources :client:compileJava --exclude-task :client:buildRust

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ jobs:
utils/clusters/**

lint:
if: ${{ false }}
# TODO: re-enable after fixed
# Temporarily disable lint job, until the SER types can be fixed to resolve the lint errors
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
Expand All @@ -231,6 +234,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up dotnet ${{ matrix.dotnet }}
if: always()
uses: actions/setup-dotnet@v4
with:
# install latest dotnet too to use language features
Expand All @@ -239,6 +243,7 @@ jobs:
${{ matrix.dotnet }}

- name: Format
if: always()
working-directory: csharp
run: |
dotnet format --verify-no-changes --verbosity diagnostic
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/full-matrix-tests-sweeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
schedule:
- cron: "0 3 * * *"

permissions:
contents: read

jobs:
trigger-full-matrix-tests:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/full-matrix-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Full Matrix tests

permissions:
contents: read

on:
workflow_dispatch: # note: if started manually, it won't run all matrix
inputs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Go CI
permissions:
contents: read

on:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Java CI

permissions:
contents: read

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint-ts.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: lint-ts

permissions:
contents: read

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint-yaml.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: lint-yaml

permissions:
contents: read

on:
push:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/mkdocs-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Deploy mkdocs website to GitHub Pages

permissions:
contents: read
pages: write

on:
workflow_dispatch:

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Node

permissions:
contents: read

on:
push:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ort-sweeper.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: ORT - Trigger periodic checks for relevant branches

permissions:
contents: read
actions: write

on:
schedule:
- cron: "0 0 * * *" # Runs daily at 00:00 UTC
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ort.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: The OSS Review Toolkit (ORT)

permissions:
contents: read
pull-requests: write
actions: read

on:
pull_request:

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/redis-rs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Redis-rs CI

permissions:
contents: read
actions: write

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Rust tests

permissions:
contents: read

on:
push:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Semgrep

permissions:
contents: read

on:
# Scan changed files in PRs (diff-aware scanning):
pull_request: {}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
* Go: Add Opentelemetry support of creating spans ([#3932](https://github.com/valkey-io/valkey-glide/pull/3932))
* Go: Fix API to use errors idiomatically ([#4090](https://github.com/valkey-io/valkey-glide/pull/4090))
* Go: XInfoStream example fix ([#4185](https://github.com/valkey-io/valkey-glide/pull/4185))
* Node: Validate clientAZ when using AZ affinity strategies ([#4267](https://github.com/valkey-io/valkey-glide/pull/4267))

#### Breaking Changes

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,24 @@ GLIDE's [documentation site](https://valkey.io/valkey-glide/) currently offers d
- [OpenTelemetry](https://github.com/valkey-io/valkey-glide/wiki/General-Concepts#opentelemetry)

**Migration Guides**
- [ioredis](https://github.com/valkey-io/valkey-glide/wiki/Migration-Guide-ioredis)
- [Jedis](https://github.com/valkey-io/valkey-glide/wiki/Migration-Guide-Jedis)

**Community**
- [Contributors meeting](https://github.com/valkey-io/valkey-glide/wiki/Contributors-meeting)

Looking for more? Check out the [Valkey Glide Wiki](https://github.com/valkey-io/valkey-glide/wiki).

## Ecosystem

Valkey GLIDE has a growing ecosystem of integrations and extensions that enhance its functionality across different frameworks and use cases:

- **[node-flexible-rate-limiter](https://www.npmjs.com/package/node-flexible-rate-limiter)** - A flexible rate limiting library for Node.js with Valkey GLIDE backend support
- **[fastify-valkey-glide](https://www.npmjs.com/package/fastify-valkey-glide)** - Fastify plugin for Valkey GLIDE integration, enabling seamless caching and session management
- **[aiocache](https://pypi.org/project/aiocache/)** - Python async caching framework with Valkey GLIDE backend support for high-performance distributed caching
- **[aws-lambda-powertools-typescript](https://github.com/aws-powertools/powertools-lambda-typescript)** - AWS Lambda Powertools for TypeScript with Valkey GLIDE integration in the idempotency feature (more integrations planned)
- **[aws-lambda-powertools-python](https://github.com/aws-powertools/powertools-lambda-python)** - AWS Lambda Powertools for Python with Valkey GLIDE support in the idempotency feature (more integrations planned)

## Getting Help

If you have any questions, feature requests, encounter issues, or need assistance with this project, please don't hesitate to open a GitHub issue. Our community and contributors are here to help you. Before creating an issue, we recommend checking the [existing issues](https://github.com/valkey-io/valkey-glide/issues) to see if your question or problem has already been addressed. If not, feel free to create a new issue, and we'll do our best to assist you. Please provide as much detail as possible in your issue description, including:
Expand Down
7 changes: 4 additions & 3 deletions benchmarks/csharp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

using LinqStatistics;

using StackExchange.Redis;
using SER_Connection = StackExchange.Redis.ConnectionMultiplexer;
using SER_Db = StackExchange.Redis.IDatabase;

using static Valkey.Glide.ConnectionConfiguration;

Expand Down Expand Up @@ -305,8 +306,8 @@ await RunClients(
{
ClientWrapper[] clients = await CreateClients(clientCount, () =>
{
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(GetAddressForStackExchangeRedis(host, port, useTLS));
IDatabase db = connection.GetDatabase();
SER_Connection connection = SER_Connection.Connect(GetAddressForStackExchangeRedis(host, port, useTLS));
SER_Db db = connection.GetDatabase();
return Task.FromResult<(Func<string, Task<string?>>, Func<string, string, Task>, Action)>(
(async (key) => await db.StringGetAsync(key),
async (key, value) => await db.StringSetAsync(key, value),
Expand Down
Loading
Loading