Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanl-bq committed Mar 6, 2024
2 parents 2fe5bdd + 25a30bd commit 6289bfb
Show file tree
Hide file tree
Showing 98 changed files with 5,251 additions and 876 deletions.
45 changes: 34 additions & 11 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,88 @@ on:
- glide-core/src/**
- submodules/**
- .github/workflows/csharp.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
pull_request:
paths:
- csharp/**
- glide-core/src/**
- submodules/**
- .github/workflows/csharp.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml

permissions:
contents: read

jobs:
run-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis:
- 6.2.14
- 7.2.3
dotnet:
- 6.0
- 8.0
- '6.0'
- '8.0'
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}

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

- name: Install redis
# TODO: make this step macos compatible: https://github.com/aws/glide-for-redis/issues/781
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/workflows/install-redis
with:
redis-version: ${{ matrix.redis }}

- name: Install protoc (protobuf)
uses: arduino/setup-protoc@v3
- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
version: "25.1"
os: ${{ matrix.os }}
target: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-unknown-linux-gnu' || 'x86_64-apple-darwin' }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up dotnet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Start redis server
run: redis-server &

- name: Format
working-directory: ./csharp
run: dotnet format --verify-no-changes --verbosity diagnostic

- name: Test dotnet ${{ matrix.dotnet }}
working-directory: ./csharp
run: dotnet test --framework net${{ matrix.dotnet }} /warnaserror
run: dotnet test --framework net${{ matrix.dotnet }} "-l:html;LogFileName=TestReport.html" --results-directory . -warnaserror

- uses: ./.github/workflows/test-benchmark
with:
language-flag: -csharp

- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-dotnet-${{ matrix.dotnet }}-redis-${{ matrix.redis }}-${{ matrix.os }}
path: |
csharp/TestReport.html
benchmarks/results/*
utils/clusters/**
lint-rust:
timeout-minutes: 10
runs-on: ubuntu-latest
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
fail-fast: false
matrix:
go:
- '1.18'
- '1.21'
- '1.18.10'
- '1.22.0'
redis:
- 6.2.14
- 7.2.3
Expand Down Expand Up @@ -60,21 +60,21 @@ jobs:
with:
redis-version: ${{ matrix.redis }}

- name: Install client dependencies
- name: Install tools for Go ${{ matrix.go }}
working-directory: ./go
run: make install-tools
run: make install-tools-go${{ matrix.go }}

- name: Build client
working-directory: ./go
run: make build

- name: Run linters
working-directory: ./go
run: make lint
run: make lint-ci

- name: Run unit tests
- name: Run tests
working-directory: ./go
run: make unit-test-report
run: make test-and-report

- name: Upload test reports
if: always()
Expand All @@ -83,7 +83,7 @@ jobs:
with:
name: test-reports-go-${{ matrix.go }}-redis-${{ matrix.redis }}-${{ matrix.os }}
path: |
go/reports/unit-test-report.html
go/reports/test-report.html
build-amazonlinux-latest:
if: github.repository_owner == 'aws'
Expand All @@ -93,7 +93,7 @@ jobs:
matrix:
go:
- 1.18.10
- 1.21.6
- 1.22.0
runs-on: ubuntu-latest
container: amazonlinux:latest
timeout-minutes: 15
Expand Down Expand Up @@ -135,29 +135,29 @@ jobs:
echo "/usr/local/go/bin" >> $GITHUB_PATH
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Install client dependencies
- name: Install tools for Go ${{ matrix.go }}
working-directory: ./go
run: make install-tools
run: make install-tools-go${{ matrix.go }}

- name: Build client
working-directory: ./go
run: make build

- name: Run linters
working-directory: ./go
run: make lint
run: make lint-ci

- name: Run unit tests
- name: Run tests
working-directory: ./go
run: make unit-test-report
run: make test-and-report

- name: Upload test reports
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: test-reports-go-${{ matrix.go }}-amazon-linux-latest
path: go/reports/unit-test-report.html
path: go/reports/test-report.html

lint-rust:
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-shared-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash
if: "${{ inputs.os == 'macos-latest' }}"
run: |
brew install git gcc pkgconfig openssl redis
brew install git gcc pkgconfig openssl redis coreutils
- name: Install software dependencies for Ubuntu
shell: bash
Expand Down
56 changes: 0 additions & 56 deletions .github/workflows/java-benchmark.yml

This file was deleted.

21 changes: 17 additions & 4 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ on:
paths:
- glide-core/src/**
- submodules/**
- "java/**"
- ".github/workflows/java.yml"
- java/**
- .github/workflows/java.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml
pull_request:
paths:
- glide-core/src/**
- submodules/**
- "java/**"
- ".github/workflows/java.yml"
- java/**
- .github/workflows/java.yml
- .github/workflows/install-shared-dependencies/action.yml
- .github/workflows/install-redis/action.yml
- .github/workflows/test-benchmark/action.yml
- .github/workflows/lint-rust/action.yml

jobs:
build-and-test-java-client:
Expand Down Expand Up @@ -67,6 +75,10 @@ jobs:
working-directory: java
run: ./gradlew spotlessDiagnose | grep 'All formatters are well behaved for all files'

- uses: ./.github/workflows/test-benchmark
with:
language-flag: -java

- name: Upload test reports
if: always()
continue-on-error: true
Expand All @@ -77,6 +89,7 @@ jobs:
java/client/build/reports/**
java/integTest/build/reports/**
utils/clusters/**
benchmarks/results/**
build-amazonlinux-latest:
if: github.repository_owner == 'aws'
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 @@ -112,7 +112,7 @@ jobs:
run: |
# Remove the "cpu" and "os" fileds so the base package would be able to install it on ubuntu
SED_FOR_MACOS=`if [[ "${{ matrix.build.OS }}" =~ .*"macos".* ]]; then echo "''"; fi`
sed -i $SED_FOR_MACOS '/"cpu":/d' ./package.json && sed -i $SED_FOR_MACOS '/"os":/d' ./package.json
sed -i $SED_FOR_MACOS '/"\/\/\/cpu": \[/,/]/d' ./package.json && sed -i $SED_FOR_MACOS '/"\/\/\/os": \[/,/]/d' ./package.json
mkdir -p bin
npm pack --pack-destination ./bin
ls ./bin
Expand Down
28 changes: 18 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
#### Changes

- Node: Allow routing Cluster requests by address. ([#1021](https://github.com/aws/glide-for-redis/pull/1021))
* Python Node: Allow routing Cluster requests by address. ([#1021](https://github.com/aws/glide-for-redis/pull/1021))
* Python: Added HSETNX command. ([#954](https://github.com/aws/glide-for-redis/pull/954))
* Python: Added SISMEMBER command ([#971](https://github.com/aws/glide-for-redis/pull/971))
* Python, Node: Added TYPE command ([#945](https://github.com/aws/glide-for-redis/pull/945), [#980](https://github.com/aws/glide-for-redis/pull/980))
* Python, Node: Added HLEN command ([#944](https://github.com/aws/glide-for-redis/pull/944), [#981](https://github.com/aws/glide-for-redis/pull/981))
* Python, Node: Added ZCOUNT command ([#878](https://github.com/aws/glide-for-redis/pull/878)) ([#909](https://github.com/aws/glide-for-redis/pull/909))
* Python: Added ECHO command ([#953](https://github.com/aws/glide-for-redis/pull/953))
* Python, Node: Added ZPOPMIN command ([#975](https://github.com/aws/glide-for-redis/pull/975), [#1008](https://github.com/aws/glide-for-redis/pull/1008))
* Node: Added STRLEN command ([#993](https://github.com/aws/glide-for-redis/pull/993))
* Node: Added LINDEX command ([#999](https://github.com/aws/glide-for-redis/pull/999))
* Python, Node: Added ZPOPMAX command ([#996](https://github.com/aws/glide-for-redis/pull/996), [#1009](https://github.com/aws/glide-for-redis/pull/1009))
* Python: Added ZRANGE command ([#906](https://github.com/aws/glide-for-redis/pull/906))
* Python, Node: Added PTTL command ([#1036](https://github.com/aws/glide-for-redis/pull/1036), [#1082](https://github.com/aws/glide-for-redis/pull/1082))

#### Features

* Python: Allow chaining function calls on transaction. ([#987](https://github.com/aws/glide-for-redis/pull/987))

## 0.2.0 (2024-02-11)

Expand All @@ -13,18 +29,10 @@
* Python, Node: Added RPOPCOUNT and LPOPCOUNT to transaction ([#874](https://github.com/aws/glide-for-redis/pull/874))
* Standalone client: Improve connection errors. ([#854](https://github.com/aws/glide-for-redis/pull/854))
* Python, Node: When recieving LPOP/RPOP with count, convert result to Array. ([#811](https://github.com/aws/glide-for-redis/pull/811))
* Python, Node: Added TYPE command ([#945](https://github.com/aws/glide-for-redis/pull/945), [#980](https://github.com/aws/glide-for-redis/pull/980))
* Python, Node: Added HLEN command ([#944](https://github.com/aws/glide-for-redis/pull/944), [#981](https://github.com/aws/glide-for-redis/pull/981))
* Node: Added ZCOUNT command ([#909](https://github.com/aws/glide-for-redis/pull/909))
* Python: Added ECHO command ([#953](https://github.com/aws/glide-for-redis/pull/953))
* Python, Node: Added ZPOPMIN command ([#975](https://github.com/aws/glide-for-redis/pull/975), [#1008](https://github.com/aws/glide-for-redis/pull/1008))
* Node: Added STRLEN command ([#993](https://github.com/aws/glide-for-redis/pull/993))
* Node: Added LINDEX command ([#999](https://github.com/aws/glide-for-redis/pull/999))
* Python, Node: Added ZPOPMAX command ([#996](https://github.com/aws/glide-for-redis/pull/996), [#1009](https://github.com/aws/glide-for-redis/pull/1009))

#### Features
* Python, Node: Added support in Lua Scripts ([#775](https://github.com/aws/glide-for-redis/pull/775), [#860](https://github.com/aws/glide-for-redis/pull/860))
* Python, Node: Allow chaining function calls on transaction. ([#902](https://github.com/aws/glide-for-redis/pull/902)), ([#987](https://github.com/aws/glide-for-redis/pull/987))
* Node: Allow chaining function calls on transaction. ([#902](https://github.com/aws/glide-for-redis/pull/902))

#### Fixes
* Core: Fixed `Connection Refused` error not to close the client ([#872](https://github.com/aws/glide-for-redis/pull/872))
Expand Down
6 changes: 1 addition & 5 deletions benchmarks/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ chosenClients="all"
host="localhost"
port=6379
tlsFlag="--tls"
javaTlsFlag="-tls"

function runPythonBenchmark(){
# generate protobuf files
Expand Down Expand Up @@ -74,7 +73,7 @@ function runCSharpBenchmark(){

function runJavaBenchmark(){
cd ${BENCH_FOLDER}/../java
./gradlew :benchmarks:run --args="-resultsFile \"${BENCH_FOLDER}/$1\" -dataSize \"$2\" -concurrentTasks \"$concurrentTasks\" -clients \"$chosenClients\" -host $host $javaPortFlag -clientCount \"$clientCount\" $javaTlsFlag $javaClusterFlag"
./gradlew :benchmarks:run --args="-resultsFile \"${BENCH_FOLDER}/$1\" --dataSize \"$2\" --concurrentTasks \"$concurrentTasks\" --clients \"$chosenClients\" --host $host $portFlag --clientCount \"$clientCount\" $tlsFlag $clusterFlag $minimalFlag"
}

function runRustBenchmark(){
Expand Down Expand Up @@ -218,15 +217,12 @@ do
-no-csv) writeResultsCSV=0 ;;
-no-tls)
tlsFlag=
javaTlsFlag=
;;
-is-cluster)
clusterFlag="--clusterModeEnabled"
javaClusterFlag="-clusterModeEnabled"
;;
-port)
portFlag="--port "$2
javaPortFlag="-port "$2
shift
;;
-minimal)
Expand Down
1 change: 1 addition & 0 deletions csharp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ClientBin/
*~
*.dbmdl
*.[Pp]ublish.xml
*.html

*.publishsettings

Expand Down
Loading

0 comments on commit 6289bfb

Please sign in to comment.