Skip to content

Commit a05fecd

Browse files
committed
build: bumped redis from 5.8.3 to 5.9.0
1 parent fa4510f commit a05fecd

File tree

4 files changed

+124
-35
lines changed

4 files changed

+124
-35
lines changed

package-lock.json

Lines changed: 112 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"@koa/router": "14.0.0",
116116
"@redis/client": "5.9.0",
117117
"@redis/client-v4": "npm:@redis/[email protected]",
118+
"@redis/client-v583": "npm:@redis/[email protected]",
118119
"@types/chai": "4.3.0",
119120
"@types/detect-libc": "1.0.0",
120121
"@types/event-loop-lag": "1.0.30",
@@ -228,9 +229,10 @@
228229
"proxyquire": "2.1.3",
229230
"read-pkg-up": "7.0.1",
230231
"recursive-copy": "2.0.14",
231-
"redis": "5.8.3",
232+
"redis": "5.9.0",
232233
"redis-v3": "npm:[email protected]",
233234
"redis-v4": "npm:[email protected]",
235+
"redis-v583": "npm:[email protected]",
234236
"restify": "11.1.0",
235237
"rimraf": "3.0.2",
236238
"semver": "7.5.4",

packages/collector/test/tracing/databases/redis/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ app.get('/blocking', async (req, res) => {
146146
});
147147

148148
app.get('/scan-iterator', async (req, res) => {
149-
if (redisVersion === 'latest') {
150-
// v5: SCAN iterators return collection of keys, enabling multi-key commands like mGet
149+
// v5: SCAN iterators return collection of keys, enabling multi-key commands like mGet
150+
if (redisVersion === 'latest' || redisVersion === 'v583') {
151151
// eslint-disable-next-line no-restricted-syntax
152152
for await (const keys of connection.scanIterator()) {
153153
try {

packages/collector/test/tracing/databases/redis/test.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const globalAgent = require('../../../globalAgent');
2828
// Clustering support was officially introduced in v4
2929
// Redis Sentinel support was added in v5.
3030
const legacyVersion = 'v3';
31+
const versionsSinceV5 = ['latest', 'v583'];
3132

3233
/**
3334
* Supported Redis setups for local testing:
@@ -52,7 +53,7 @@ const allSetupTypes = ['default', 'cluster', 'sentinel'];
5253
const selectedSetupType = false;
5354
const setupTypesToRun = allSetupTypes.includes(selectedSetupType) ? [selectedSetupType] : allSetupTypes;
5455

55-
const allVersions = ['latest', 'v4', 'v3'];
56+
const allVersions = ['latest', 'v583', 'v4', 'v3'];
5657
const selectedVersion = false;
5758
const versionsToRun = allVersions.includes(selectedVersion) ? [selectedVersion] : allVersions;
5859

@@ -68,7 +69,7 @@ setupTypesToRun.forEach(setupType => {
6869

6970
const shouldSkipCluster = setupType === 'cluster' && redisVersion === legacyVersion;
7071
// NOTE: sentinel support added in v5(latest).
71-
const shouldSkipSentinel = setupType === 'sentinel' && redisVersion !== 'latest';
72+
const shouldSkipSentinel = setupType === 'sentinel' && !versionsSinceV5.includes(redisVersion);
7273

7374
if (shouldSkipCluster || shouldSkipSentinel) {
7475
mochaSuiteFn = describe.skip;
@@ -127,7 +128,7 @@ setupTypesToRun.forEach(setupType => {
127128
// In v5, Redis moved “Isolation Pool” into RedisClientPool.
128129
// see: https://github.com/redis/node-redis/blob/master/docs/pool.md
129130
// Only for this test the connection is established via the pool.
130-
if (redisVersion === 'latest' && setupType === 'default') {
131+
if (versionsSinceV5.includes(redisVersion) && setupType === 'default') {
131132
mochaSuiteFn('When connected via clientpool', function () {
132133
globalAgent.setUpCleanUpHooks();
133134
let controls;
@@ -801,8 +802,8 @@ setupTypesToRun.forEach(setupType => {
801802
]);
802803
// NOTE: v5 SCAN iterators yield collection of keys, enabling multi-key commands like MGET.
803804
// See: https://github.com/redis/node-redis/blob/master/docs/v4-to-v5.md#scan-iterators
804-
const expectedSpanCount = redisVersion === 'latest' ? 1 : 4;
805-
const expectedRedisCommand = redisVersion === 'latest' ? 'mGet' : 'get';
805+
const expectedSpanCount = versionsSinceV5.includes(redisVersion) ? 1 : 4;
806+
const expectedRedisCommand = versionsSinceV5.includes(redisVersion) ? 'mGet' : 'get';
806807

807808
expectExactlyNMatching(spans, expectedSpanCount, [
808809
span => expect(span.t).to.equal(entrySpan.t),
@@ -828,7 +829,7 @@ setupTypesToRun.forEach(setupType => {
828829
// The "Isolation Pool" was introduced via RedisClientPool in v5.
829830
// This new pool type requires a different connection mechanism.
830831
// As a result, this test is being skipped.
831-
if (redisVersion !== 'latest') {
832+
if (!versionsSinceV5.includes(redisVersion)) {
832833
it('blocking', () => testBlockingCommand(controls, setupType));
833834
}
834835
}

0 commit comments

Comments
 (0)