Skip to content

Commit

Permalink
Merge pull request #2349 from valkey-io/merge_1.1
Browse files Browse the repository at this point in the history
Merge release 1.1.0
  • Loading branch information
ikolomi committed Sep 24, 2024
2 parents 4f7c72c + 1a56474 commit e599742
Show file tree
Hide file tree
Showing 43 changed files with 643 additions and 287 deletions.
2 changes: 1 addition & 1 deletion .github/json_matrices/engine-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
},
{
"type": "valkey",
"version": "8.0.0-rc1"
"version": "8.0.0"
}
]
1 change: 0 additions & 1 deletion .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ runs:
if: "${{ inputs.os == 'macos' }}"
run: |
brew update
brew upgrade || true
brew install git gcc pkgconfig openssl coreutils
- name: Install software dependencies for Ubuntu GNU
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,10 @@ jobs:
fail-fast: false
matrix:
host: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}

runs-on: ${{ matrix.host.RUNNER }}
steps:
- name: Start Valkey server
uses: ./.github/actions/install-valkey
with:
engine-version: "7.2.5"
target: ${{ matrix.host.TARGET }}

- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -244,6 +238,7 @@ jobs:
uses: ./.github/workflows/install-shared-dependencies
with:
os: ${{ matrix.host.OS }}
engine-version: "7.2.5"
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -253,17 +248,26 @@ jobs:
version: "26.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Start standalone Valkey server
working-directory: utils
id: port
run: |
PORT=$(python3 ./cluster_manager.py start -r 0 2>&1 | grep CLUSTER_NODES | cut -d = -f 2 | cut -d , -f 1 | cut -d : -f 2)
echo "PORT=$PORT" >> $GITHUB_OUTPUT
- name: Test deployment
working-directory: java
env:
PORT: ${{ steps.port.outputs.PORT }}
run: |
export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderName="Authorization"
export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderValue="Bearer $(echo "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" | base64)"
export GLIDE_RELEASE_VERSION=${{ env.RELEASE_VERSION }}
./gradlew :benchmarks:run --args="--minimal --clients glide"
./gradlew :benchmarks:run --args="--minimal --clients glide --port ${{ env.PORT }}"
publish-release-to-maven:
if: ${{ inputs.maven_publish == true || github.event_name == 'push' }}
needs: [test-deployment-on-all-architectures]
needs: [publish-to-maven-central-deployment, test-deployment-on-all-architectures]
runs-on: ubuntu-latest
environment: AWS_ACTIONS
env:
Expand All @@ -287,4 +291,3 @@ jobs:
curl --request DELETE \
-u "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" \
"https://central.sonatype.com/api/v1/publisher/deployment/${{ env.DEPLOYMENT_ID }}"
17 changes: 14 additions & 3 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
if ${{ env.EVENT_NAME == 'pull_request' }}; then
R_VERSION="255.255.255"
elif ${{ env.EVENT_NAME == 'workflow_dispatch' }}; then
echo "${{env.EVENT_NAME}}"
R_VERSION="${{ env.INPUT_VERSION }}"
else
R_VERSION=${GITHUB_REF:11}
Expand Down Expand Up @@ -229,8 +230,16 @@ jobs:
working-directory: ./node/npm/glide
run: |
export pkg_name=valkey-glide
echo "${GITHUB_REF:11}"
export package_version=${GITHUB_REF:11}
echo "The workflow is: ${{env.EVENT_NAME}}"
if ${{ env.EVENT_NAME == 'workflow_dispatch' }}; then
R_VERSION="${{ env.INPUT_VERSION }}"
else
R_VERSION=${GITHUB_REF:11}
fi
echo "RELEASE_VERSION=${R_VERSION}" >> $GITHUB_ENV
export package_version=${R_VERSION}
export scope=`if [ "$NPM_SCOPE" != '' ]; then echo "$NPM_SCOPE/"; fi`
mv package.json package.json.tmpl
envsubst < package.json.tmpl > "package.json"
Expand All @@ -239,6 +248,8 @@ jobs:
sed -i "s|@scope/|${scope}|g" index.ts
env:
NPM_SCOPE: ${{ vars.NPM_SCOPE }}
EVENT_NAME: ${{ github.event_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}

- name: Build Node wrapper
uses: ./.github/workflows/build-node-wrapper
Expand All @@ -251,7 +262,7 @@ jobs:
- name: Check if RC and set a distribution tag for the package
shell: bash
run: |
if [[ "${GITHUB_REF:11}" == *"rc"* ]]
if [[ ${{ env.RELEASE_VERSION }} == *"rc"* ]]
then
echo "This is a release candidate"
export npm_tag="next"
Expand Down
73 changes: 66 additions & 7 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ jobs:
if: github.repository_owner == 'valkey-io'
name: Publish packages to PyPi
runs-on: ${{ matrix.build.RUNNER }}
timeout-minutes: 25
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
build: ${{fromJson( needs.load-platform-matrix.outputs.PLATFORM_MATRIX )}}
build: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}
steps:
- name: Setup self-hosted runner access
if: ${{ contains(matrix.build.RUNNER, 'self-hosted') }}
Expand Down Expand Up @@ -118,8 +118,7 @@ jobs:
if: startsWith(matrix.build.NAMED_OS, 'darwin')
run: |
brew update
brew upgrade || true
brew install python@3.9
brew install python@3.8 python@3.9
- name: Setup Python for self-hosted Ubuntu runners
if: contains(matrix.build.OS, 'ubuntu') && contains(matrix.build.RUNNER, 'self-hosted')
Expand Down Expand Up @@ -191,9 +190,9 @@ jobs:

- name: Upload Python wheels
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.build.TARGET }}
path: python/wheels
if-no-files-found: error

Expand All @@ -206,7 +205,8 @@ jobs:
- uses: actions/download-artifact@v4
with:
path: python/wheels
name: wheels
merge-multiple: true

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
Expand All @@ -215,3 +215,62 @@ jobs:
with:
command: upload
args: --skip-existing python/wheels/*

test-release:
if: github.event_name != 'pull_request'
name: Test the release
runs-on: ${{ matrix.build.RUNNER }}
needs: [publish-to-pypi, load-platform-matrix]
strategy:
fail-fast: false
matrix:
build: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}
steps:
- name: Setup self-hosted runner access
if: ${{ matrix.build.TARGET == 'aarch64-unknown-linux-gnu' }}
run: sudo chown -R $USER:$USER /home/ubuntu/actions-runner/_work/valkey-glide

- name: checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12

- name: Install ValKey
uses: ./.github/workflows/install-valkey
with:
version: "8.0.0"

- name: Check if RC and set a distribution tag for the package
shell: bash
run: |
if [[ "${GITHUB_REF:11}" == *"rc"* ]]
then
echo "This is a release candidate"
export pip_pre="--pre"
else
echo "This is a stable release"
export pip_pre=""
fi
echo "PIP_PRE=${pip_pre}" >> $GITHUB_ENV
- name: Run the tests
shell: bash
working-directory: ./utils/release-candidate-testing/python
run: |
python -m venv venv
source venv/bin/activate
pip install -U pip
pip install ${PIP_PRE} valkey-glide
python rc_test.py
# Reset the repository to make sure we get the clean checkout of the action later in other actions.
# It is not required since in other actions we are cleaning before the action, but it is a good practice to do it here as well.
- name: Reset repository
if: ${{ contains(matrix.build.RUNNER, 'self-hosted') }}
shell: bash
run: |
git reset --hard
git clean -xdf
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,6 @@ jobs:
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: smoke-test-report-amazon-linux
name: modules-test-report-${{ matrix.host.TARGET }}-python-${{ matrix.python }}-server-${{ matrix.engine.version }}
path: |
python/python/tests/pytest_report.html
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
os: "ubuntu"
target: "x86_64-unknown-linux-gnu"
engine-version: ${{ matrix.engine.version }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: Swatinem/rust-cache@v2

Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#### Changes
* Node: Fix binary variant for xinfogroups and lrem ([#2324](https://github.com/valkey-io/valkey-glide/pull/2324))
* Node: Fixed missing exports ([#2301](https://github.com/valkey-io/valkey-glide/pull/2301))
* Node: Use `options` struct for all optional arguments ([#2287](https://github.com/valkey-io/valkey-glide/pull/2287))
* Node: Added `invokeScript` API with routing for cluster client ([#2284](https://github.com/valkey-io/valkey-glide/pull/2284))
* Java: Expanded tests for converting non UTF-8 bytes to Strings ([#2286](https://github.com/valkey-io/valkey-glide/pull/2286))
Expand Down Expand Up @@ -139,9 +141,11 @@
* Node: Fix ZADD bug where command could not be called with only the `changed` optional parameter ([#1995](https://github.com/valkey-io/valkey-glide/pull/1995))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920))
* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https://github.com/valkey-io/valkey-glide/pull/2075))
* Python: Add missing exports ([#2341](https://github.com/valkey-io/valkey-glide/pull/2341))
* Node: Add missing exports ([#2342](https://github.com/valkey-io/valkey-glide/pull/2342))

### Operational Enhancements
* CI/CD: Create Workflow to deploy artifacts for all platforms ([#2285](https://github.com/valkey-io/valkey-glide/pull/2285)
* CI/CD: Create Workflow to deploy artifacts for all platforms ([#2285](https://github.com/valkey-io/valkey-glide/pull/2285))
* Node: Get valkey/redis version using client's info command ([#2276](https://github.com/valkey-io/valkey-glide/pull/2276))
* Java: Fetch server version using client's info command ([#2258](https://github.com/valkey-io/valkey-glide/pull/2258))
* CI/CD: Add workflow for automating Maven release ([#2128](https://github.com/valkey-io/valkey-glide/pull/2128))
Expand Down Expand Up @@ -302,7 +306,7 @@
* Python: Added SETRANGE command ([#1453](https://github.com/valkey-io/valkey-glide/pull/1453))

#### Fixes
* Python: Fix typing error "type object is not subscriptable" ([#1203](https://github.com/valkey-io/valkey-glide/pull/1203))
* Python: Fix typing error "'type' object is not subscriptable" ([#1203](https://github.com/valkey-io/valkey-glide/pull/1203))
* Core: Fixed blocking commands to use the specified timeout from the command argument ([#1283](https://github.com/valkey-io/valkey-glide/pull/1283))

### Breaking Changes
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ Valkey General Language Independent Driver for the Enterprise (GLIDE), is an ope
## Supported Engine Versions
Valkey GLIDE is API-compatible with the following engine versions:

| Engine Type | 6.2 | 7.0 | 7.2 |
|-----------------------|-------|-------|-------|
| Valkey | - | - | V |
| Redis | V | V | V |
| Engine Type | 6.2 | 7.0 | 7.2 | 8.0 |
|-----------------------|-------|-------|-------|-------|
| Valkey | - | - | V | V |
| Redis | V | V | V | - |

## Current Status
In this release, Valkey GLIDE is available for Python and Java. Support for Node.js is actively under development, with plans to include more programming languages in the future. We're tracking future features on the [roadmap](https://github.com/orgs/valkey-io/projects/11).
In this release, Valkey GLIDE is available for Python, Java and Node.js. Support for GO is actively under development, with plans to include more programming languages in the future. We're tracking future features on the [roadmap](https://github.com/orgs/valkey-io/projects/11).

## Getting Started
- [Java](./java/README.md)
- [Python](./python/README.md)
- [Node](./node/README.md)
- [Documentation](https://github.com/valkey-io/valkey-glide/wiki)

## Getting Help
Expand Down
7 changes: 5 additions & 2 deletions benchmarks/python/python_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import numpy as np
import redis.asyncio as redispy # type: ignore
from glide import (
BaseClientConfiguration,
GlideClientConfiguration,
GlideClusterClientConfiguration,
GlideClient,
GlideClusterClient,
Logger,
Expand Down Expand Up @@ -289,7 +290,9 @@ async def main(
if clients_to_run == "all" or clients_to_run == "glide":
# Glide Socket
client_class = GlideClusterClient if is_cluster else GlideClient
config = BaseClientConfiguration(
config = GlideClusterClientConfiguration(
[NodeAddress(host=host, port=port)], use_tls=use_tls
) if is_cluster else GlideClientConfiguration(
[NodeAddress(host=host, port=port)], use_tls=use_tls
)
clients = await create_clients(
Expand Down
38 changes: 0 additions & 38 deletions csharp/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import glide.api.GlideClusterClient;
import glide.api.logging.Logger;
import glide.api.models.ClusterValue;
import glide.api.models.commands.InfoOptions;
import glide.api.models.commands.InfoOptions.Section;
import glide.api.models.configuration.GlideClusterClientConfiguration;
import glide.api.models.configuration.NodeAddress;
import glide.api.models.exceptions.ClosingException;
Expand Down Expand Up @@ -76,7 +76,7 @@ public static void appLogic(GlideClusterClient client)
// Send INFO REPLICATION with routing option to all nodes
ClusterValue<String> infoResponse =
client
.info(InfoOptions.builder().section(InfoOptions.Section.REPLICATION).build(), ALL_NODES)
.info(new Section[] {Section.REPLICATION}, ALL_NODES)
.get();
log(
INFO,
Expand Down
Loading

0 comments on commit e599742

Please sign in to comment.