Skip to content

Commit

Permalink
Merge branch 'main' into script-show
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamazon authored Sep 9, 2024
2 parents 738322c + b3b91cc commit 89d69ae
Show file tree
Hide file tree
Showing 58 changed files with 8,849 additions and 3,911 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.cjs

This file was deleted.

6 changes: 5 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ body:
options:
- TypeScript
- Python
- Java
- Rust
- Go
- .Net
validations:
required: true

Expand All @@ -111,7 +115,7 @@ body:
attributes:
label: Cluster information
description: |
Cluster information, cluster topology, number of shards, number of replicas, used data types.
Cluster information, cluster topology, number of shards, number of replicas, used data types.
validations:
required: false

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
fail-fast: false
matrix:
go:
# - '1.18.10'
- '1.22.0'
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
host:
Expand Down Expand Up @@ -130,7 +129,6 @@ jobs:
fail-fast: false
matrix:
go:
- 1.18.10
- 1.22.0
runs-on: ubuntu-latest
container: amazonlinux:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Install dependencies
run: |
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier prettier
npm install eslint-plugin-import @eslint/compat globals @eslint/js @eslint/eslintrc @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-config-prettier prettier
- name: Run linting and prettier
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-ts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ runs:
steps:
- uses: actions/checkout@v4

- run: cp .eslintrc.cjs ${{ inputs.package-folder }}
- run: cp eslint.config.mjs ${{ inputs.package-folder }}
shell: bash

- run: |
npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-plugin-import@latest eslint-config-prettier
npm install eslint-plugin-import @eslint/compat globals @eslint/js @eslint/eslintrc @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-tsdoc eslint typescript eslint-config-prettier
npm i
npx eslint . --max-warnings=0
working-directory: ${{ inputs.package-folder }}
Expand Down
70 changes: 34 additions & 36 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ name: PyPI - Continuous Deployment

on:
pull_request:
paths:
- .github/workflows/pypi-cd.yml
- .github/workflows/build-python-wrapper/action.yml
- .github/workflows/start-self-hosted-runner/action.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
paths:
- .github/workflows/pypi-cd.yml
- .github/workflows/build-python-wrapper/action.yml
- .github/workflows/start-self-hosted-runner/action.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
push:
tags:
- "v*.*"
workflow_dispatch:
inputs:
version:
description: 'The release version of GLIDE, formatted as *.*.* or *.*.*-rc*'
required: true
inputs:
version:
description: "The release version of GLIDE, formatted as *.*.* or *.*.*-rc*"
required: true

concurrency:
group: pypi-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
id-token: write
id-token: write

jobs:
load-platform-matrix:
Expand All @@ -40,24 +40,23 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS | contains(["pypi"])))' < .github/json_matrices/build-matrix.json | jq -c .)"
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
# Get the matrix from the matrix.json file, without the object that has the IMAGE key
export "PLATFORM_MATRIX=$(jq 'map(select(.PACKAGE_MANAGERS | contains(["pypi"])))' < .github/json_matrices/build-matrix.json | jq -c .)"
echo "PLATFORM_MATRIX=${PLATFORM_MATRIX}" >> $GITHUB_OUTPUT
start-self-hosted-runner:
if: github.repository_owner == 'valkey-io'
runs-on: ubuntu-latest
environment: AWS_ACTIONS
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Start self hosted EC2 runner
uses: ./.github/workflows/start-self-hosted-runner
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
ec2-instance-id: ${{ secrets.AWS_EC2_INSTANCE_ID }}
- name: Checkout
uses: actions/checkout@v4
- name: Start self hosted EC2 runner
uses: ./.github/workflows/start-self-hosted-runner
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
ec2-instance-id: ${{ secrets.AWS_EC2_INSTANCE_ID }}

publish-binaries:
needs: [start-self-hosted-runner, load-platform-matrix]
Expand All @@ -68,8 +67,7 @@ jobs:
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 All @@ -92,15 +90,15 @@ jobs:
fi
echo "RELEASE_VERSION=${R_VERSION}" >> $GITHUB_ENV
env:
EVENT_NAME: ${{ github.event_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}
EVENT_NAME: ${{ github.event_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}

- name: Check that the release version dont have typo init
if: ${{ github.event_name != 'pull_request' && contains(env.RELEASE_VERSION, '-') && !contains(env.RELEASE_VERSION, 'rc') }}
run: |
echo "The release version "${{ env.RELEASE_VERSION }}" contains a typo, please fix it"
echo "The release version should be in the format v{major-version}.{minor-version}.{patch-version}-rc{release-candidate-number} when it a release candidate or v{major-version}.{minor-version}.{patch-version} in a stable release."
exit 1
echo "The release version "${{ env.RELEASE_VERSION }}" contains a typo, please fix it"
echo "The release version should be in the format v{major-version}.{minor-version}.{patch-version}-rc{release-candidate-number} when it a release candidate or v{major-version}.{minor-version}.{patch-version} in a stable release."
exit 1
- name: Set the package version for Python
working-directory: ./python
Expand All @@ -112,16 +110,16 @@ jobs:
- name: Set up Python
if: ${{ !contains(matrix.build.RUNNER, 'self-hosted') }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Set up Python older versions for MacOS
if: startsWith(matrix.build.NAMED_OS, 'darwin')
run: |
brew update
brew upgrade || true
brew install [email protected] [email protected]
brew update
brew upgrade || true
brew install [email protected]
- name: Setup Python for self-hosted Ubuntu runners
if: contains(matrix.build.OS, 'ubuntu') && contains(matrix.build.RUNNER, 'self-hosted')
Expand Down Expand Up @@ -205,7 +203,7 @@ jobs:
runs-on: ubuntu-latest
needs: publish-binaries
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: python/wheels
name: wheels
Expand Down
79 changes: 78 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
- .github/json_matrices/engine-matrix.json
- .github/workflows/start-self-hosted-runner/action.yml

pull_request:
paths:
Expand All @@ -31,6 +32,7 @@ on:
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
- .github/json_matrices/engine-matrix.json
- .github/workflows/start-self-hosted-runner/action.yml
workflow_dispatch:

concurrency:
Expand All @@ -39,6 +41,8 @@ concurrency:

permissions:
contents: read
# Allows the GITHUB_TOKEN to make an API call to generate an OIDC token.
id-token: write

jobs:
load-engine-matrix:
Expand Down Expand Up @@ -156,7 +160,7 @@ jobs:
OS: ubuntu,
RUNNER: ubuntu-latest,
TARGET: x86_64-unknown-linux-gnu
}
}
# - {
# OS: macos,
# RUNNER: macos-latest,
Expand Down Expand Up @@ -284,3 +288,76 @@ jobs:
name: smoke-test-report-amazon-linux
path: |
python/python/tests/pytest_report.html
start-self-hosted-runner:
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
runs-on: ubuntu-latest
environment: AWS_ACTIONS
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Start self hosted EC2 runner
uses: ./.github/workflows/start-self-hosted-runner
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
ec2-instance-id: ${{ secrets.AWS_EC2_INSTANCE_ID }}

test-modules:
needs: [start-self-hosted-runner, load-engine-matrix]
name: Running Module Tests
runs-on: ${{ matrix.host.RUNNER }}
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
python:
- "3.12"
host:
- {
OS: "ubuntu",
NAMED_OS: "linux",
RUNNER: ["self-hosted", "Linux", "ARM64"],
TARGET: "aarch64-unknown-linux-gnu",
}

steps:
- name: Setup self-hosted runner access
if: ${{ contains(matrix.host.RUNNER, 'self-hosted') }}
run: sudo chown -R $USER:$USER /home/ubuntu/actions-runner/_work/valkey-glide

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

- name: Setup Python for self-hosted Ubuntu runners
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install python3 python3-venv python3-pip -y
- name: Build Python wrapper
uses: ./.github/workflows/build-python-wrapper
with:
os: ${{ matrix.host.OS }}
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}
engine-version: ${{ matrix.engine.version }}

- name: Test with pytest
working-directory: ./python
run: |
source .env/bin/activate
cd python/tests/
pytest --asyncio-mode=auto --tls --cluster-endpoints=${{ secrets.MEMDB_MODULES_ENDPOINT }} -k server_modules --html=pytest_report.html --self-contained-html
- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: smoke-test-report-amazon-linux
path: |
python/python/tests/pytest_report.html
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
- .github/workflows/rust.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-valkey/action.yml
- .github/workflows/lint-rust/action.yml
- .github/json_matrices/build-matrix.json
- deny.toml
pull_request:
paths:
- logger_core/**
Expand All @@ -21,7 +23,9 @@ on:
- .github/workflows/rust.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-valkey/action.yml
- .github/workflows/lint-rust/action.yml
- .github/json_matrices/build-matrix.json
- deny.toml
workflow_dispatch:

concurrency:
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
#### Changes
* Node: Added FUNCTION DUMP and FUNCTION RESTORE commands ([#2129](https://github.com/valkey-io/valkey-glide/pull/2129))
* Node: Added binary variant to HSCAN command ([#2240](https://github.com/valkey-io/valkey-glide/pull/2240))
* Node: replace decoder by DecoderOption and route by RouteOption in API([#2234](https://github.com/valkey-io/valkey-glide/pull/2234/))
* Node: Added binary variant to sorted set commands ([#2190](https://github.com/valkey-io/valkey-glide/pull/2190), [#2210](https://github.com/valkey-io/valkey-glide/pull/2210))
* Node: Added binary variant for MSET, MSETNX commands ([#2229](https://github.com/valkey-io/valkey-glide/pull/2229))
* Node: Added binary variant to HASH commands ([#2194](https://github.com/valkey-io/valkey-glide/pull/2194))
* Node: Added binary variant to server management commands ([#2179](https://github.com/valkey-io/valkey-glide/pull/2179))
* Node: Added/updated binary variant to connection management commands and WATCH/UNWATCH ([#2160](https://github.com/valkey-io/valkey-glide/pull/2160))
* Java: Fix docs for stream commands ([#2086](https://github.com/valkey-io/valkey-glide/pull/2086))
* Node: Added binary variant to bitmap commands ([#2178](https://github.com/valkey-io/valkey-glide/pull/2178))
* Node: Added binary variant to generic commands ([#2158](https://github.com/valkey-io/valkey-glide/pull/2158))
* Node: Added binary variant to geo commands ([#2149](https://github.com/valkey-io/valkey-glide/pull/2149))
* Node: Added binary variant to HYPERLOGLOG commands ([#2176](https://github.com/valkey-io/valkey-glide/pull/2176))
* Node: Added FUNCTION DUMP and FUNCTION RESTORE commands ([#2129](https://github.com/valkey-io/valkey-glide/pull/2129), [#2173](https://github.com/valkey-io/valkey-glide/pull/2173))
* Node: Added binary variant to FUNCTION commands ([#2172](https://github.com/valkey-io/valkey-glide/pull/2172))
* Node: Added ZUNIONSTORE command ([#2145](https://github.com/valkey-io/valkey-glide/pull/2145))
* Node: Added XREADGROUP command ([#2124](https://github.com/valkey-io/valkey-glide/pull/2124))
* Node: Added XINFO GROUPS command ([#2122](https://github.com/valkey-io/valkey-glide/pull/2122))
Expand Down Expand Up @@ -88,6 +101,10 @@
* Node: Added XGROUP CREATECONSUMER & XGROUP DELCONSUMER commands ([#2088](https://github.com/valkey-io/valkey-glide/pull/2088))
* Node: Added GETEX command ([#2107]((https://github.com/valkey-io/valkey-glide/pull/2107))
* Node: Added ZINTER and ZUNION commands ([#2146](https://github.com/aws/glide-for-redis/pull/2146))
* Node: Added XACK commands ([#2112](https://github.com/valkey-io/valkey-glide/pull/2112))
* Node: Added XGROUP SETID command ([#2135]((https://github.com/valkey-io/valkey-glide/pull/2135))
* Node: Added binary variant to string commands ([#2183](https://github.com/valkey-io/valkey-glide/pull/2183))
* Node: Added binary variant to stream commands ([#2200](https://github.com/valkey-io/valkey-glide/pull/2200), [#2222](https://github.com/valkey-io/valkey-glide/pull/2222))

#### Breaking Changes
* Node: (Refactor) Convert classes to types ([#2005](https://github.com/valkey-io/valkey-glide/pull/2005))
Expand Down
Loading

0 comments on commit 89d69ae

Please sign in to comment.