Skip to content

Commit 3616059

Browse files
committed
Drop support for Valkey in favor of the libvmod-valkey project
1 parent d03159f commit 3616059

File tree

5 files changed

+13
-37
lines changed

5 files changed

+13
-37
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
db_engine:
14-
- redis
15-
- valkey
1613
cc:
1714
- gcc
1815
- clang
@@ -22,8 +19,7 @@ jobs:
2219
configure_flags:
2320
- ''
2421
include:
25-
- db_engine: redis
26-
cc: gcc
22+
- cc: gcc
2723
make_target: lcov
2824
configure_flags: --enable-code-coverage
2925

@@ -70,22 +66,12 @@ jobs:
7066
sudo ldconfig
7167
popd
7268
73-
- name: Install Valkey
74-
run: |
75-
wget --no-check-certificate https://github.com/valkey-io/valkey/archive/refs/tags/8.0.1.tar.gz -O valkey-8.0.1.tar.gz
76-
tar zxvf valkey-*.tar.gz
77-
pushd valkey-*/
78-
make BUILD_TLS=yes
79-
sudo make BUILD_TLS=yes PREFIX='/usr/local' USE_REDIS_SYMLINKS=no install
80-
sudo ldconfig
81-
popd
82-
8369
- name: Build & test VMOD
8470
run: |
8571
./autogen.sh
8672
CC='${{ matrix.cc }}' ./configure --prefix=/usr ${{ matrix.configure_flags }}
8773
make -j4
88-
DB_ENGINE='${{ matrix.db_engine }}' make ${{ matrix.make_target }} -j1
74+
make ${{ matrix.make_target }} -j1
8975
9076
- name: Push code coverage
9177
if: ${{ matrix.make_target == 'lcov' }}

Dockerfile

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,5 @@ RUN cd /tmp \
7070
&& make BUILD_TLS=yes PREFIX='/usr/local' install \
7171
&& ldconfig
7272

73-
RUN cd /tmp \
74-
&& wget --no-check-certificate https://github.com/valkey-io/valkey/archive/refs/tags/8.0.1.tar.gz -O valkey-8.0.1.tar.gz \
75-
&& tar zxvf valkey-*.tar.gz \
76-
&& rm -f valkey-*.tar.gz \
77-
&& cd valkey-* \
78-
&& make BUILD_TLS=yes \
79-
&& make BUILD_TLS=yes PREFIX='/usr/local' USE_REDIS_SYMLINKS=no install \
80-
&& ldconfig
81-
8273
COPY ./docker-entrypoint.sh /
8374
ENTRYPOINT ["/docker-entrypoint.sh"]

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
:alt: Codecov badge
77
:target: https://codecov.io/gh/carlosabalde/libvmod-redis
88

9-
VMOD using the `synchronous hiredis library API <https://github.com/redis/hiredis>`_ to access Redis servers from VCL.
9+
VMOD using the `synchronous hiredis library API <https://github.com/redis/hiredis>`_ to access Redis servers from VCL. For a libvalkey + Valkey alternative, please, chec the `libvmod-redis VMOD <https://github.com/carlosabalde/libvmod-valkey>`_ project.
1010

1111
Highlights:
1212

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $ ./autogen.sh
99
# $ ./configure
1010
# $ make
11-
# $ DB_ENGINE=valkey make check
11+
# $ make check
1212
# $ docker compose down --volumes --remove-orphans
1313
#
1414

src/tests/runner.sh

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
##
66
IPV6=0
77

8-
DB_ENGINE=${DB_ENGINE:-redis}
98
DB_STANDALONE_MASTER_SERVERS=2
109
DB_STANDALONE_SLAVE_SERVERS=2
1110
DB_STANDALONE_SENTINEL_SERVERS=3
@@ -64,8 +63,8 @@ trap "cleanup $TMP" EXIT
6463
##
6564
## Check CLI is available & get DB version. Fail test if DB is not available.
6665
##
67-
if [ -x "$(command -v $DB_ENGINE-cli)" ]; then
68-
VERSION=$($DB_ENGINE-cli --version | sed "s/^$DB_ENGINE-cli \([^ ]*\).*$/\1/" | awk -F. '{ printf("%d%03d%03d\n", $1, $2, $3) }')
66+
if [ -x "$(command -v redis-cli)" ]; then
67+
VERSION=$(redis-cli --version | sed "s/^redis-cli \([^ ]*\).*$/\1/" | awk -F. '{ printf("%d%03d%03d\n", $1, $2, $3) }')
6968
CONTEXT="\
7069
$CONTEXT \
7170
-Dredis_version=$VERSION \
@@ -116,7 +115,7 @@ EOF
116115
enable-debug-command local
117116
EOF
118117
fi
119-
$DB_ENGINE-server "$TMP/db-master$MASTER_INDEX.conf"
118+
redis-server "$TMP/db-master$MASTER_INDEX.conf"
120119
CONTEXT="\
121120
$CONTEXT \
122121
-Dredis_master${MASTER_INDEX}_ip=$MASTER_IP \
@@ -145,7 +144,7 @@ EOF
145144
tls-ca-cert-file $ROOT/assets/tls-ca-certificate.crt
146145
EOF
147146
fi
148-
$DB_ENGINE-server "$TMP/db-slave${MASTER_INDEX}_$SLAVE_INDEX.conf"
147+
redis-server "$TMP/db-slave${MASTER_INDEX}_$SLAVE_INDEX.conf"
149148
CONTEXT="\
150149
$CONTEXT \
151150
-Dredis_slave${MASTER_INDEX}_${SLAVE_INDEX}_ip=$SLAVE_IP \
@@ -184,7 +183,7 @@ EOF
184183
tls-ca-cert-file $ROOT/assets/tls-ca-certificate.crt
185184
EOF
186185
fi
187-
$DB_ENGINE-server "$TMP/db-sentinel$INDEX.conf" --sentinel
186+
redis-server "$TMP/db-sentinel$INDEX.conf" --sentinel
188187
CONTEXT="\
189188
$CONTEXT \
190189
-Dredis_sentinel${INDEX}_ip=$SENTINEL_IP \
@@ -224,7 +223,7 @@ EOF
224223
tls-ca-cert-file $ROOT/assets/tls-ca-certificate.crt
225224
EOF
226225
fi
227-
$DB_ENGINE-server "$TMP/db-server$INDEX.conf"
226+
redis-server "$TMP/db-server$INDEX.conf"
228227
CONTEXT="\
229228
$CONTEXT \
230229
-Dredis_server${INDEX}_ip=$IP \
@@ -237,15 +236,15 @@ EOF
237236
# Wait for all nodes to bootstrap and then set up the cluster.
238237
sleep 1
239238
if [ "$VERSION" -ge '5000000' ]; then
240-
yes yes | $DB_ENGINE-cli --cluster create $SERVERS --cluster-replicas $DB_CLUSTER_REPLICAS > /dev/null
239+
yes yes | redis-cli --cluster create $SERVERS --cluster-replicas $DB_CLUSTER_REPLICAS > /dev/null
241240
else
242241
yes yes | redis-trib.rb create --replicas $DB_CLUSTER_REPLICAS $SERVERS > /dev/null
243242
fi
244243

245244
# Wait for cluster formation in a rudementary way.
246245
[[ $IPV6 = 1 ]] && HOST=::1 || HOST=127.0.0.1
247246
[[ $IPV6 = 1 ]] && PATTERN=::1 || PATTERN=127[.]0[.]0[.]
248-
while [ $($DB_ENGINE-cli -h $HOST -p $((DB_CLUSTER_START_PORT+1)) CLUSTER SLOTS | grep "$PATTERN" | wc -l) -lt $DB_CLUSTER_SERVERS ]; do
247+
while [ $(redis-cli -h $HOST -p $((DB_CLUSTER_START_PORT+1)) CLUSTER SLOTS | grep "$PATTERN" | wc -l) -lt $DB_CLUSTER_SERVERS ]; do
249248
sleep 1
250249
done
251250
sleep 1
@@ -263,7 +262,7 @@ EOF
263262
-Dredis_master${INDEX}_port=$(echo $LINE | cut -f 2 -d ' ' | cut -f 1 -d '@' | rev | cut -f 1 -d ':' | rev) \
264263
-Dredis_key_in_master${INDEX}=$(grep "^$(echo $LINE | cut -f 9 -d ' ' | cut -f 1 -d '-'): " $ROOT/assets/hashslot-keys.txt | cut -f 2 -d ' ')"
265264
INDEX=$(( INDEX + 1 ))
266-
done <<< "$($DB_ENGINE-cli -h $HOST -p $((DB_CLUSTER_START_PORT+1)) CLUSTER NODES | grep master | sort -k 9 -n)"
265+
done <<< "$(redis-cli -h $HOST -p $((DB_CLUSTER_START_PORT+1)) CLUSTER NODES | grep master | sort -k 9 -n)"
267266
fi
268267

269268
##

0 commit comments

Comments
 (0)