Skip to content

Redis 8.2 m01 #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/actions/build-and-tag-locally/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,25 @@ runs:

- name: Run container
shell: bash
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
run: |
docker run -d --name sanity-test-${{ steps.platform.outputs.display_name }} ${{ github.sha }}:${{ steps.platform.outputs.display_name }}

- name: Container Logs
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker logs sanity-test-${{ steps.platform.outputs.display_name }}

- name: Sanity Tests
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli ping
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli info server

- name: Verify installed modules
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
modules=$(docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli module list)
Expand All @@ -150,7 +150,7 @@ runs:
fi

- name: Test RedisBloom
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli BF.ADD popular_keys "redis:hash"
Expand All @@ -160,7 +160,7 @@ runs:
echo "RedisBloom test passed successfully"

- name: Test RediSearch
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli FT.CREATE redis_commands ON HASH PREFIX 1 cmd: SCHEMA name TEXT SORTABLE description TEXT
Expand All @@ -175,7 +175,7 @@ runs:
fi

- name: Test RedisTimeSeries
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli TS.CREATE redis:cpu:usage RETENTION 86400
Expand All @@ -191,7 +191,7 @@ runs:
fi

- name: Test ReJSON
if: ${{ contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: |
docker exec sanity-test-${{ steps.platform.outputs.display_name }} redis-cli JSON.SET redis:config $ '{"maxmemory":"2gb","maxmemory-policy":"allkeys-lru"}'
Expand All @@ -206,7 +206,7 @@ runs:

- name: Test the entrypoint
id: test_entrypoint
if: ${{ contains(fromJSON('["amd64", "i386"]'), steps.platform.outputs.display_name) }}
if: ${{ contains(fromJSON('["amd64", "i386", "arm64"]'), steps.platform.outputs.display_name) }}
shell: bash
run: >
cd test && env
Expand All @@ -226,7 +226,7 @@ runs:

- name: Push image
uses: docker/build-push-action@v6
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64", "arm64"]'), steps.platform.outputs.display_name) }}
with:
context: ${{ inputs.distribution }}
push: true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
build-and-test:
runs-on: ${{ contains(matrix.platform, 'arm64') && 'ubuntu24-arm64-2-8' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
distribution:
- debian
Expand Down
13 changes: 9 additions & 4 deletions alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions alpine/docker-entrypoint.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions debian/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions test/run-entrypoint-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#
##

# Container initialization wait time in seconds
CONTAINER_INIT_WAIT=3

if [ -z "$REDIS_IMG" ]; then
echo "REDIS_IMG may not be empty"
exit 1
Expand All @@ -38,6 +41,7 @@ get_container_user_uid_gid_on_the_host() {
container_user="$1"
dir=$(mktemp -d -p .)
docker run --rm -v "$(pwd)/$dir":/w -w /w --entrypoint=/bin/sh "$REDIS_IMG" -c "chown $container_user ."
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
stat -c "%u %g" "$dir"
sudo rm -rf "$dir"
}
Expand Down Expand Up @@ -177,6 +181,7 @@ run_docker_and_test_ownership() {
fi

docker_output=$($docker_run 2>&1)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize

if [ "$TEST_VERBOSE" ]; then
echo "After:"
Expand Down Expand Up @@ -265,6 +270,7 @@ run_redis_docker_and_check_uid_gid() {
docker_cmd="$*"
# shellcheck disable=SC2086
container=$(docker run $docker_flags -d "$REDIS_IMG" $docker_cmd)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
ret=$?

assertTrue "Container '$docker_flags $REDIS_IMG $docker_cmd' created" "[ $ret -eq 0 ]"
Expand Down Expand Up @@ -296,6 +302,7 @@ run_redis_docker_and_check_modules() {
docker_cmd="$1"
# shellcheck disable=SC2086
container=$(docker run --rm -d "$REDIS_IMG" $docker_cmd)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
info=$(docker exec "$container" redis-cli info)

[ "$PLATFORM" ] && [ "$PLATFORM" != "amd64" ] && startSkipping
Expand All @@ -322,6 +329,7 @@ assert_redis_v8() {

test_redis_version() {
ret=$(docker run --rm "$REDIS_IMG" -v|tail -n 1)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
assert_redis_v8 "$ret"
}

Expand Down Expand Up @@ -545,6 +553,7 @@ test_redis_server_persistence_with_bind_mount() {
chmod 0444 "$dir"

container=$(docker run --rm -d -v "$(pwd)/$dir":/data "$REDIS_IMG" --appendonly yes)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize

result=$(echo save | docker exec -i "$container" redis-cli)
assertEquals "OK" "$result"
Expand All @@ -559,6 +568,7 @@ test_redis_server_persistence_with_bind_mount() {
sudo chown -R "$HOST_OWNER" "$dir"

container2=$(docker run --rm -d -v "$(pwd)/$dir":/data "$REDIS_IMG")
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
value=$(echo "GET FOO" | docker exec -i "$container2" redis-cli)
assertEquals "$container" "$value"

Expand All @@ -576,6 +586,7 @@ test_redis_server_persistence_with_volume() {
docker run --rm -v test_redis:/data --entrypoint=/bin/sh "$REDIS_IMG" -c 'chown -R 0:0 /data'

container=$(docker run --rm -d -v test_redis:/data "$REDIS_IMG" --appendonly yes)
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize

result=$(echo save | docker exec -i "$container" redis-cli)
assertEquals "OK" "$result"
Expand All @@ -590,6 +601,7 @@ test_redis_server_persistence_with_volume() {
docker run --rm -v test_redis:/data --entrypoint=/bin/sh "$REDIS_IMG" -c 'chown -R 0:0 /data && chmod 0000 -R /data'

container2=$(docker run --rm -d -v test_redis:/data "$REDIS_IMG")
sleep $CONTAINER_INIT_WAIT # Wait for container to fully initialize
value=$(echo "GET FOO" | docker exec -i "$container2" redis-cli)
assertEquals "$container" "$value"

Expand Down