Skip to content

Commit

Permalink
[Backport 1.3) Merge release 1.3 to main (valkey-io#3202)
Browse files Browse the repository at this point in the history
Backport 1.3 to main

---------

Signed-off-by: Joe Brinkman <[email protected]>
  • Loading branch information
jbrinkman authored Feb 18, 2025
1 parent 4de9ae4 commit ae6a53c
Show file tree
Hide file tree
Showing 105 changed files with 2,564 additions and 1,619 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/go-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Filter entries with pkg_go_dev in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
# Filter entries with pkg_go_dev in PACKAGE_MANAGERS and replace "ephemeral" with "persistent" in RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pkg_go_dev"])))
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pkg_go_dev"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end))
else (if . == "ephemeral" then "persistent" else . end)
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
Expand Down Expand Up @@ -148,13 +148,14 @@ jobs:
cp protobuf/* $GITHUB_WORKSPACE/go/protobuf/
- name: Commit and push tag
run: |
RELEASE_VERSION=${{ needs.validate-release-version.outputs.RELEASE_VERSION }}
git config user.name github-actions
git config user.email [email protected]
git add -f .
git commit -m "Automated commit from GitHub Actions"
git tag go/${{ needs.validate-release-version.outputs.RELEASE_VERSION }}
git push origin go/${{ needs.validate-release-version.outputs.RELEASE_VERSION }}
GOPROXY=proxy.golang.org go list -m github.com/valkey-io/valkey-glide/go@${{ needs.validate-release-version.outputs.RELEASE_VERSION }}
git tag go/$RELEASE_VERSION
git push origin go/$RELEASE_VERSION
GOPROXY=proxy.golang.org go list -m github.com/valkey-io/valkey-glide/go@$RELEASE_VERSION
extra-post-commit-test:
needs:
Expand Down Expand Up @@ -204,13 +205,13 @@ jobs:
working-directory: go/benchmarks
run: |
# change go/benchmarks/go.mod on the fly
export ESCAPED_VERSION=$(echo "${{ needs.validate-release-version.outputs.RELEASE_VERSION }}" | sed 's/\./\\./g')
RELEASE_VERSION=${{ needs.validate-release-version.outputs.RELEASE_VERSION }}
if [[ "${{ matrix.host.OS }}" == "macos" ]]; then
sed -i '' '/replace github\.com\/valkey-io\/valkey-glide\/go/d' go.mod
sed -i '' "s/github\.com\/valkey-io\/valkey-glide\/go v0\.0\.0/github.com\/valkey-io\/valkey-glide\/go $ESCAPED_VERSION/g" go.mod
sed -i '' '\|replace github\.com/valkey-io/valkey-glide/go|d' go.mod
sed -i '' "s|github\.com/valkey-io/valkey-glide/go v.*|github.com/valkey-io/valkey-glide/go $RELEASE_VERSION|g" go.mod
else
sed -i '/replace github\.com\/valkey-io\/valkey-glide\/go/d' go.mod
sed -i "s/github\.com\/valkey-io\/valkey-glide\/go v0\.0\.0/github.com\/valkey-io\/valkey-glide\/go $ESCAPED_VERSION/g" go.mod
sed -i '\|replace github\.com/valkey-io/valkey-glide/go|d' go.mod
sed -i "s|github\.com/valkey-io/valkey-glide/go v.*|github.com/valkey-io/valkey-glide/go $RELEASE_VERSION|g" go.mod
fi
go mod tidy
go run . -minimal -clients glide -concurrentTasks 10 -port ${{ env.PORT }}
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
if: (github.repository_owner == 'valkey-io' && github.event_name == 'workflow_dispatch') || github.event.pull_request.head.repo.owner.login == 'valkey-io'
environment: AWS_ACTIONS
name: Modules Tests
runs-on: [self-hosted, linux, ARM64]
runs-on: [self-hosted, linux, ARM64, persistent]
timeout-minutes: 15
steps:
- name: Setup self-hosted runner access
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/install-engine/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
# TODO: self-hosted runners are actually cloning the repo, using the cache from the previous run
# will not work as expected. We need to find a way to cache the valkey repo on the runner itself.
steps:
- name: Cache Valkey
- name: Cache Valkey for non self hosted runners
if: ${{!contains(inputs.target, 'aarch64-unknown') }}
uses: actions/cache@v4
id: cache-valkey
Expand All @@ -35,18 +35,21 @@ runs:
~/valkey
key: valkey-${{ inputs.engine-version }}-${{ inputs.target }}

# if no cache hit, build the engine
- name: Build Valkey
- name: Prepare Valkey sources
if: ${{ steps.cache-valkey.outputs.cache-hit != 'true' }}
shell: bash
run: |
echo "Building valkey ${{ inputs.engine-version }}"
cd ~
echo "Cloning and checking out Valkey ${{ inputs.engine-version }}"
cd ~/
if [[ -d valkey ]]; then
echo "Removing existing valkey directory..."
rm -fR valkey
fi
git clone https://github.com/valkey-io/valkey.git
cd valkey
git checkout ${{ inputs.engine-version }}
- name: Install engine
- name: Build and install engine
shell: bash
run: |
cd ~/valkey
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Filter entries with maven in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
# Filter entries with maven in PACKAGE_MANAGERS and replace "ephemeral" with "persistent" in RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["maven"])))
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["maven"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end))
else (if . == "ephemeral" then "persistent" else . end)
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ jobs:
if: (github.repository_owner == 'valkey-io' && github.event_name == 'workflow_dispatch') || github.event.pull_request.head.repo.owner.login == 'valkey-io'
environment: AWS_ACTIONS
name: Modules Tests
runs-on: [self-hosted, linux, ARM64]
runs-on: [self-hosted, linux, ARM64, persistent]
timeout-minutes: 15
steps:
- name: Setup self-hosted runner access
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ jobs:
if: (github.repository_owner == 'valkey-io' && github.event_name == 'workflow_dispatch') || github.event.pull_request.head.repo.owner.login == 'valkey-io'
environment: AWS_ACTIONS
name: Running Module Tests
runs-on: [self-hosted, linux, ARM64]
runs-on: [self-hosted, linux, ARM64, persistent]
timeout-minutes: 15

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Filter entries with npm in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
# Filter entries with npm in PACKAGE_MANAGERS and replace "ephemeral" with "persistent" in RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["npm"])))
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["npm"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end))
else (if . == "ephemeral" then "persistent" else . end)
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
id: load-platform-matrix
shell: bash
run: |
# Filter entries with pypi in PACKAGE_MANAGERS and remove "ephemeral" from RUNNER
# Filter entries with pypi in PACKAGE_MANAGERS and replace "ephemeral" with "persistent" in RUNNER
export PLATFORM_MATRIX=$(jq 'map(
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pypi"])))
select(.PACKAGE_MANAGERS != null and (.PACKAGE_MANAGERS | contains(["pypi"])))
| .RUNNER = (
if (.RUNNER | type == "array")
then (.RUNNER | map(select(. != "ephemeral")))
else .RUNNER
then (.RUNNER | map(if . == "ephemeral" then "persistent" else . end))
else (if . == "ephemeral" then "persistent" else . end)
end
)
)' < .github/json_matrices/build-matrix.json | jq -c .)
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
PROTOC_ARCH="x86_64"
elif [[ $ARCH == 'aarch64' ]]; then
PROTOC_ARCH="aarch_64"
export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_gnu=gcc
export CFLAGS_aarch64_unknown_linux_gnu="-march=armv8-a"
else
echo "Running on unsupported architecture: $ARCH. Expected one of: ['x86_64', 'aarch64']"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
if: (github.repository_owner == 'valkey-io' && github.event_name == 'workflow_dispatch') || github.event.pull_request.head.repo.owner.login == 'valkey-io'
environment: AWS_ACTIONS
name: Running Module Tests
runs-on: [self-hosted, linux, ARM64]
runs-on: [self-hosted, linux, ARM64, persistent]
timeout-minutes: 15

steps:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
],
"rust-analyzer.cargo.features": "all",
"dotnet.defaultSolution": "csharp/csharp.sln",
"java.compile.nullAnalysis.mode": "automatic"
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "interactive"
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

#### Changes

* Java: Add support to AzAffinityReplicasAndPrimary read strategy ([#3083](https://github.com/valkey-io/valkey-glide/pull/3083))
* Python: Add support to AzAffinityReplicasAndPrimary read strategy ([#3071](https://github.com/valkey-io/valkey-glide/pull/3071))
* Node: Add support to AzAffinityReplicasAndPrimary read strategy ([#3063](https://github.com/valkey-io/valkey-glide/pull/3063))
* Core: Add support to AzAffinityReplicasAndPrimary read strategy ([#2986](https://github.com/valkey-io/valkey-glide/pull/2986))
* Java, Node, Python: Add transaction commands for JSON module ([#2862](https://github.com/valkey-io/valkey-glide/pull/2862))
* Java: bump `netty` version ([#2795](https://github.com/valkey-io/valkey-glide/pull/2795))
* Java: Bump protobuf (protoc) version ([#2796](https://github.com/valkey-io/valkey-glide/pull/2796), [#2800](https://github.com/valkey-io/valkey-glide/pull/2800))
Expand Down
2 changes: 1 addition & 1 deletion glide-core/THIRD_PARTY_LICENSES_RUST
Original file line number Diff line number Diff line change

----

Package: smallvec:1.13.2
Package: smallvec:1.14.0

The following copyrights and licenses were found in the source code of this package:

2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/aio/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ where
async fn setup_connection<C>(
connection_info: &RedisConnectionInfo,
con: &mut C,
// This parameter is set to 'true' if ReadFromReplica strategy is set to AZAffinity.
// This parameter is set to 'true' if ReadFromReplica strategy is set to AZAffinity or AZAffinityReplicasAndPrimary.
// An INFO command will be triggered in the connection's setup to update the 'availability_zone' property.
discover_az: bool,
) -> RedisResult<()>
Expand Down
2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct GlideConnectionOptions {
#[cfg(feature = "aio")]
/// Passive disconnect notifier
pub disconnect_notifier: Option<Box<dyn DisconnectNotifier>>,
/// If ReadFromReplica strategy is set to AZAffinity, this parameter will be set to 'true'.
/// If ReadFromReplica strategy is set to AZAffinity or AZAffinityReplicasAndPrimary, this parameter will be set to 'true'.
/// In this case, an INFO command will be triggered in the connection's setup to update the connection's 'availability_zone' property.
pub discover_az: bool,
/// Connection timeout duration.
Expand Down
Loading

0 comments on commit ae6a53c

Please sign in to comment.