Skip to content

Commit

Permalink
Merge branch 'main' into java/integ_acarbo_bug_xrange_xrevrange_negat…
Browse files Browse the repository at this point in the history
…ive_count

Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
  • Loading branch information
acarbonetto authored Jul 23, 2024
2 parents 7140813 + 52a7ed6 commit 9d5b59d
Show file tree
Hide file tree
Showing 57 changed files with 8,235 additions and 309 deletions.
1 change: 1 addition & 0 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

permissions:
contents: read
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ on:
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

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


jobs:
load-engine-matrix:
runs-on: ubuntu-latest
Expand Down
23 changes: 6 additions & 17 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'The release version of GLIDE, formatted as v*.*.* or v*.*.*-rc*'
description: 'The release version of GLIDE, formatted as *.*.* or *.*.*-rc*'
required: true

concurrency:
Expand Down Expand Up @@ -56,26 +56,21 @@ jobs:
OS: ubuntu,
RUNNER: ubuntu-latest,
TARGET: x86_64-unknown-linux-gnu,
CLASSIFIER: linux-x86_64
}
- {
OS: ubuntu,
RUNNER: ["self-hosted", "Linux", "ARM64"],
TARGET: aarch64-unknown-linux-gnu,
CLASSIFIER: linux-aarch_64,
CONTAINER: "2_28"
}
- {
OS: macos,
RUNNER: macos-12,
TARGET: x86_64-apple-darwin,
CLASSIFIER: osx-x86_64
}
- {
OS: macos,
RUNNER: macos-latest,
TARGET: aarch64-apple-darwin,
CLASSIFIER: osx-aarch_64
}

runs-on: ${{ matrix.host.RUNNER }}
Expand All @@ -99,7 +94,7 @@ jobs:
- name: Set the release version
shell: bash
run: |
if ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}; then
if ${{ github.event_name == 'pull_request' }}; then
R_VERSION="255.255.255"
elif ${{ github.event_name == 'workflow_dispatch' }}; then
R_VERSION="${{ env.INPUT_VERSION }}"
Expand Down Expand Up @@ -139,18 +134,12 @@ jobs:
env:
SECRING_GPG: ${{ secrets.SECRING_GPG }}

- name: Replace placeholders and version in build.gradle
shell: bash
working-directory: ./java/client
run: |
SED_FOR_MACOS=`if [[ "${{ matrix.host.os }}" =~ .*"macos".* ]]; then echo "''"; fi`
sed -i $SED_FOR_MACOS 's/placeholder/${{ matrix.host.CLASSIFIER }}/g' build.gradle
sed -i $SED_FOR_MACOS "s/255.255.255/${{ env.RELEASE_VERSION }}/g" build.gradle
- name: Build java client
working-directory: java
run: |
./gradlew :client:publishToMavenLocal -Psigning.secretKeyRingFile=secring.gpg -Psigning.password="${{ secrets.GPG_PASSWORD }}" -Psigning.keyId=${{ secrets.GPG_KEY_ID }}
env:
GLIDE_RELEASE_VERSION: ${{ env.RELEASE_VERSION }}

- name: Bundle JAR
working-directory: java
Expand All @@ -160,12 +149,12 @@ jobs:
jar -cvf bundle.jar *
ls -ltr
cd -
cp $src_folder/bundle.jar .
cp $src_folder/bundle.jar bundle-${{ matrix.host.TARGET }}.jar
- name: Upload artifacts to publish
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: java-${{ matrix.host.TARGET }}
path: |
java/bundle.jar
java/bundle*.jar
17 changes: 8 additions & 9 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ on:
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

concurrency:
group: java-${{ github.head_ref || github.ref }}
Expand Down Expand Up @@ -73,6 +74,8 @@ jobs:
with:
submodules: recursive

- uses: gradle/actions/wrapper-validation@v3

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
Expand All @@ -95,7 +98,7 @@ jobs:

- name: Build java client
working-directory: java
run: ./gradlew --continue build
run: ./gradlew --continue build -x javadoc

- name: Ensure no skipped files by linter
working-directory: java
Expand Down Expand Up @@ -163,22 +166,18 @@ jobs:

- name: Install Java
run: |
yum install -y java-${{ matrix.java }}
- name: Build rust part
working-directory: java
run: cargo build --release
yum install -y java-${{ matrix.java }}-amazon-corretto-devel.x86_64
- name: Build java part
- name: Build java wrapper
working-directory: java
run: ./gradlew --continue build
run: ./gradlew --continue build -x javadoc

- name: Upload test & spotbugs reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.java }}
name: test-reports-${{ matrix.java }}-amazon-linux
path: |
java/client/build/reports/**
java/integTest/build/reports/**
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

concurrency:
group: node-${{ github.head_ref || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'The release version of GLIDE, formatted as v*.*.* or v*.*.*-rc*'
description: 'The release version of GLIDE, formatted as *.*.* or *.*.*-rc*'
required: true

concurrency:
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,11 @@ jobs:
with:
repository: "oss-review-toolkit/ort"
path: "./ort"
ref: "20.1.0"
ref: "26.0.0"
submodules: recursive

# Temporary workaround until ORT releases a version newer than 22.1.0 addressing https://github.com/oss-review-toolkit/ort/issues/8571.
# Upon resolution, remove this section and install the updated version instead of "20.1.0".
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.76
with:
targets: ${{ inputs.target }}
uses: dtolnay/rust-toolchain@1.78

- name: Install ORT
if: steps.cache-ort.outputs.cache-hit != 'true'
Expand All @@ -100,7 +96,7 @@ jobs:
ort:
analyzer:
allowDynamicVersions: true
enabledPackageManagers: [Cargo, NPM, PIP]
enabledPackageManagers: [Cargo, NPM, PIP, GradleInspector]
EOF
cat ~/.ort/config/config.yml
Expand Down Expand Up @@ -215,4 +211,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
INPUT_VERSION: ${{ github.event.inputs.version }}


- name: Get current date
id: date
run: |
CURR_DATE=$(date +'%Y-%m-%d-%H')
echo "date=${CURR_DATE}" >> $GITHUB_OUTPUT
- name: Upload the final package list
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: final-package-list-${{ steps.date.outputs.date }}
path: |
utils/final_package_list.txt
retention-days: 30

- name: Upload the skipped package list
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: skipped-package-list-${{ steps.date.outputs.date }}
path: |
utils/skipped_package_list.txt
retention-days: 30
2 changes: 1 addition & 1 deletion .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'The release version of GLIDE, formatted as v*.*.* or v*.*.*-rc*'
description: 'The release version of GLIDE, formatted as *.*.* or *.*.*-rc*'
required: true

concurrency:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ on:
- .github/workflows/lint-rust/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

concurrency:
group: python-${{ github.head_ref || github.ref }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-valkey/action.yml
- .github/json_matrices/build-matrix.json
workflow_dispatch:

concurrency:
group: rust-${{ github.head_ref || github.ref }}
Expand Down Expand Up @@ -102,9 +103,11 @@ jobs:
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./logger_core
github-token: ${{ secrets.GITHUB_TOKEN }}
name: lint logger

- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./benchmarks/rust
github-token: ${{ secrets.GITHUB_TOKEN }}
name: lint benchmark
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
#### Changes
* Node: Added GEOPOS command ([#1991](https://github.com/valkey-io/valkey-glide/pull/1991))
* Node: Added BITCOUNT command ([#1982](https://github.com/valkey-io/valkey-glide/pull/1982))
* Node: Added FLUSHDB command ([#1986](https://github.com/valkey-io/valkey-glide/pull/1986))
* Node: Added GETDEL command ([#1968](https://github.com/valkey-io/valkey-glide/pull/1968))
* Node: Added GETBIT command ([#1989](https://github.com/valkey-io/valkey-glide/pull/1989))
* Node: Added SETBIT command ([#1978](https://github.com/valkey-io/valkey-glide/pull/1978))
* Node: Added LPUSHX and RPUSHX command([#1959](https://github.com/valkey-io/valkey-glide/pull/1959))
* Node: Added LSET command ([#1952](https://github.com/valkey-io/valkey-glide/pull/1952))
* Node: Added SDIFFSTORE command ([#1931](https://github.com/valkey-io/valkey-glide/pull/1931))
* Node: Added ZDIFF command ([#1972](https://github.com/valkey-io/valkey-glide/pull/1972))
* Node: Added ZDIFFSTORE command ([#1985](https://github.com/valkey-io/valkey-glide/pull/1985))
* Node: Added SINTERCARD command ([#1956](https://github.com/valkey-io/valkey-glide/pull/1956))
* Node: Added SINTERSTORE command ([#1929](https://github.com/valkey-io/valkey-glide/pull/1929))
* Node: Added SUNION command ([#1919](https://github.com/valkey-io/valkey-glide/pull/1919))
* Node: Added SMISMEMBER command ([#1955](https://github.com/valkey-io/valkey-glide/pull/1955))
* Node: Added SDIFF command ([#1924](https://github.com/valkey-io/valkey-glide/pull/1924))
* Node: Added ZMSCORE command ([#1987](https://github.com/valkey-io/valkey-glide/pull/1987))
* Node: Added LOLWUT command ([#1934](https://github.com/valkey-io/valkey-glide/pull/1934))
* Node: Added LPOS command ([#1927](https://github.com/valkey-io/valkey-glide/pull/1927))
* Node: Added FUNCTION LOAD command ([#1969](https://github.com/valkey-io/valkey-glide/pull/1969))
* Node: Added FUNCTION DELETE command ([#1990](https://github.com/valkey-io/valkey-glide/pull/1990))
* Node: Added FUNCTION FLUSH command ([#1984](https://github.com/valkey-io/valkey-glide/pull/1984))
* Node: Added ZMPOP command ([#1994](https://github.com/valkey-io/valkey-glide/pull/1994))
* 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))

#### Fixes
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920))
Expand Down Expand Up @@ -91,6 +115,10 @@
* Python: Added FUNCTION STATS command ([#1794](https://github.com/valkey-io/valkey-glide/pull/1794))
* Python: Added XINFO STREAM command ([#1816](https://github.com/valkey-io/valkey-glide/pull/1816))
* Python: Added transaction supports for DUMP, RESTORE, FUNCTION DUMP and FUNCTION RESTORE ([#1814](https://github.com/valkey-io/valkey-glide/pull/1814))
* Node: Added FlushAll command ([#1958](https://github.com/valkey-io/valkey-glide/pull/1958))
* Node: Added DBSize command ([#1932](https://github.com/valkey-io/valkey-glide/pull/1932))
* Node: Added GeoAdd command ([#1980](https://github.com/valkey-io/valkey-glide/pull/1980))
* Node: Added ZRevRank command ([#1977](https://github.com/valkey-io/valkey-glide/pull/1977))

#### Breaking Changes
* Node: Update XREAD to return a Map of Map ([#1494](https://github.com/valkey-io/valkey-glide/pull/1494))
Expand All @@ -101,7 +129,7 @@
#### Fixes
* Python: fixing a bug with transaction exec ([#1796](https://github.com/valkey-io/valkey-glide/pull/1796))

## 0.4.1 (2024-02-06)
## 0.4.1 (2024-06-02)

#### Fixes
* Node: Fix set command bug with expiry option ([#1508](https://github.com/valkey-io/valkey-glide/pull/1508))
Expand Down
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Valkey General Language Independent Driver for the Enterprise (GLIDE), is an open-source Valkey client library. Valkey GLIDE is one of the official client libraries for Valkey, and it supports all Valkey commands. Valkey GLIDE supports Valkey 7.2 and above, and Redis open-source 6.2, 7.0 and 7.2. Application programmers use Valkey GLIDE to safely and reliably connect their applications to Valkey- and Redis OSS- compatible services. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. It is sponsored and supported by AWS, and is pre-configured with best practices learned from over a decade of operating Redis OSS-compatible services used by hundreds of thousands of customers. To help ensure consistency in application development and operations, Valkey GLIDE is implemented using a core driver framework, written in Rust, with language specific extensions. This design ensures consistency in features across languages and reduces overall complexity.

Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
redis-rs code copyright 2022 by redis-rs contributors.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Valkey GLIDE is API-compatible with the following engine versions:

| Engine Type | 6.2 | 7.0 | 7.2 |
|-----------------------|-------|-------|-------|
| Valkey | V | V | V |
| Valkey | - | - | 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/aws/projects/187/).
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).

## Getting Started
- [Java](./java/README.md)
Expand Down
4 changes: 2 additions & 2 deletions csharp/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# C# wrapper

The C# wrapper is currently not in a usable state.
The C# wrapper is currently not in a usable state and is under development.

# Valkey GLIDE

Expand All @@ -12,7 +12,7 @@ Refer to the [Supported Engine Versions table](https://github.com/valkey-io/valk

## Current Status

We've made GLIDE for Redis an open-source project, and are releasing it in Preview to the community to gather feedback, and actively collaborate on the project roadmap. We welcome questions and contributions from all Redis stakeholders.
We've made Valkey GLIDE an open-source project, and are releasing it in Preview to the community to gather feedback, and actively collaborate on the project roadmap. We welcome questions and contributions from all Redis stakeholders.
This preview release is recommended for testing purposes only.

# Getting Started - C# Wrapper
Expand Down
18 changes: 18 additions & 0 deletions examples/java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Run

Ensure that you have an instance of Valkey running on "localhost" on "6379". Otherwise, update glide.examples.ExamplesApp with a configuration that matches your server settings.

To run the example:
```
cd valkey-glide/examples/java
./gradlew :run
```

You should expect to see the output:
```
> Task :run
PING: PONG
PING(found you): found you
SET(apples, oranges): OK
GET(apples): oranges
```
5 changes: 1 addition & 4 deletions java/examples/build.gradle → examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ repositories {
}

dependencies {
implementation project(':client')
implementation 'redis.clients:jedis:4.4.3'
implementation 'io.lettuce:lettuce-core:6.2.6.RELEASE'
implementation 'commons-cli:commons-cli:1.5.0'
implementation "io.valkey:valkey-glide:1.0.1:${osdetector.classifier}"
}

application {
Expand Down
Binary file added examples/java/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions examples/java/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 9d5b59d

Please sign in to comment.