Skip to content

Commit cb5831d

Browse files
authored
Merge branch 'master' into master
2 parents cb54d4d + 0438865 commit cb5831d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1417
-555
lines changed

.github/workflows/stale-issues.yml

Lines changed: 88 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,95 @@
1-
name: "Close stale issues"
1+
name: "Stale Issue Management"
22
on:
33
schedule:
4-
- cron: "0 0 * * *"
4+
# Run daily at midnight UTC
5+
- cron: "0 0 * * *"
6+
workflow_dispatch: # Allow manual triggering
7+
8+
env:
9+
# Default stale policy timeframes
10+
DAYS_BEFORE_STALE: 365
11+
DAYS_BEFORE_CLOSE: 30
12+
13+
# Accelerated timeline for needs-information issues
14+
NEEDS_INFO_DAYS_BEFORE_STALE: 30
15+
NEEDS_INFO_DAYS_BEFORE_CLOSE: 7
516

6-
permissions: {}
717
jobs:
818
stale:
9-
permissions:
10-
issues: write # to close stale issues (actions/stale)
11-
pull-requests: write # to close stale PRs (actions/stale)
12-
1319
runs-on: ubuntu-latest
1420
steps:
15-
- uses: actions/stale@v9
16-
with:
17-
repo-token: ${{ secrets.GITHUB_TOKEN }}
18-
stale-issue-message: 'This issue is marked stale. It will be closed in 30 days if it is not updated.'
19-
stale-pr-message: 'This pull request is marked stale. It will be closed in 30 days if it is not updated.'
20-
days-before-stale: 365
21-
days-before-close: 30
22-
stale-issue-label: "Stale"
23-
stale-pr-label: "Stale"
24-
operations-per-run: 10
25-
remove-stale-when-updated: true
21+
# First step: Handle regular issues (excluding needs-information)
22+
- name: Mark regular issues as stale
23+
uses: actions/stale@v9
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
# Default stale policy
28+
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
29+
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
30+
31+
# Explicit stale label configuration
32+
stale-issue-label: "stale"
33+
stale-pr-label: "stale"
34+
35+
stale-issue-message: |
36+
This issue has been automatically marked as stale due to inactivity.
37+
It will be closed in 30 days if no further activity occurs.
38+
If you believe this issue is still relevant, please add a comment to keep it open.
39+
40+
close-issue-message: |
41+
This issue has been automatically closed due to inactivity.
42+
If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
43+
44+
# Exclude needs-information issues from this step
45+
exempt-issue-labels: 'no-stale,needs-information'
46+
47+
# Remove stale label when issue/PR becomes active again
48+
remove-stale-when-updated: true
49+
50+
# Apply to pull requests with same timeline
51+
days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }}
52+
days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }}
53+
54+
stale-pr-message: |
55+
This pull request has been automatically marked as stale due to inactivity.
56+
It will be closed in 30 days if no further activity occurs.
57+
58+
close-pr-message: |
59+
This pull request has been automatically closed due to inactivity.
60+
If you would like to continue this work, please reopen the PR or create a new one.
61+
62+
# Only exclude no-stale PRs (needs-information PRs follow standard timeline)
63+
exempt-pr-labels: 'no-stale'
64+
65+
# Second step: Handle needs-information issues with accelerated timeline
66+
- name: Mark needs-information issues as stale
67+
uses: actions/stale@v9
68+
with:
69+
repo-token: ${{ secrets.GITHUB_TOKEN }}
70+
71+
# Accelerated timeline for needs-information
72+
days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
73+
days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
74+
75+
# Explicit stale label configuration
76+
stale-issue-label: "stale"
77+
78+
# Only target ISSUES with needs-information label (not PRs)
79+
only-issue-labels: 'needs-information'
80+
81+
stale-issue-message: |
82+
This issue has been marked as stale because it requires additional information
83+
that has not been provided for 30 days. It will be closed in 7 days if the
84+
requested information is not provided.
85+
86+
close-issue-message: |
87+
This issue has been closed because the requested information was not provided within the specified timeframe.
88+
If you can provide the missing information, please reopen this issue or create a new one.
89+
90+
# Disable PR processing for this step
91+
days-before-pr-stale: -1
92+
days-before-pr-close: -1
93+
94+
# Remove stale label when issue becomes active again
95+
remove-stale-when-updated: true

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
node-version: ["18", "20", "22"]
25-
redis-version: ["rs-7.4.0-v1", "8.0.2", "8.2", "8.2.1-pre"]
25+
redis-version: ["rs-7.4.0-v1", "8.0.2", "8.2", "8.4-M01-pre"]
2626
steps:
2727
- uses: actions/checkout@v4
2828
with:

doctests/dt-bitmap.js

Lines changed: 124 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
// EXAMPLE: bitmap_tutorial
2-
// HIDE_START
2+
// REMOVE_START
33
import assert from 'assert';
4-
import { createClient } from 'redis';
4+
// REMOVE_END
5+
import { createClient, RESP_TYPES } from 'redis';
56

6-
const client = createClient();
7+
const client = createClient({
8+
commandOptions: {
9+
typeMapping: {
10+
[RESP_TYPES.BLOB_STRING]: Buffer
11+
}
12+
}
13+
});
714
await client.connect();
8-
// HIDE_END
915

1016
// REMOVE_START
1117
await client.flushDb();
@@ -35,5 +41,119 @@ console.log(res4) // >>> 1
3541
// STEP_END
3642
// REMOVE_START
3743
assert.equal(res4, 1)
44+
// REMOVE_END
45+
46+
// STEP_START bitop_setup
47+
await client.setBit("A", 0, 1)
48+
await client.setBit("A", 1, 1)
49+
await client.setBit("A", 3, 1)
50+
await client.setBit("A", 4, 1)
51+
52+
const res5 = await client.get("A")
53+
console.log(res5.readUInt8(0).toString(2).padStart(8, '0'))
54+
// >>> 11011000
55+
56+
await client.setBit("B", 3, 1)
57+
await client.setBit("B", 4, 1)
58+
await client.setBit("B", 7, 1)
59+
60+
const res6 = await client.get("B")
61+
console.log(res6.readUInt8(0).toString(2).padStart(8, '0'))
62+
// >>> 00011001
63+
64+
await client.setBit("C", 1, 1)
65+
await client.setBit("C", 2, 1)
66+
await client.setBit("C", 4, 1)
67+
await client.setBit("C", 5, 1)
68+
69+
const res7 = await client.get("C")
70+
console.log(res7.readUInt8(0).toString(2).padStart(8, '0'))
71+
// >>> 01101100
72+
// STEP_END
73+
// REMOVE_START
74+
assert.equal(res5.readUInt8(0), 0b11011000)
75+
assert.equal(res6.readUInt8(0), 0b00011001)
76+
assert.equal(res7.readUInt8(0), 0b01101100)
77+
// REMOVE_END
78+
79+
// STEP_START bitop_and
80+
await client.bitOp("AND", "R", ["A", "B", "C"])
81+
const res8 = await client.get("R")
82+
console.log(res8.readUInt8(0).toString(2).padStart(8, '0'))
83+
// >>> 00001000
84+
// STEP_END
85+
// REMOVE_START
86+
assert.equal(res8.readUInt8(0), 0b00001000)
87+
// REMOVE_END
88+
89+
// STEP_START bitop_or
90+
await client.bitOp("OR", "R", ["A", "B", "C"])
91+
const res9 = await client.get("R")
92+
console.log(res9.readUInt8(0).toString(2).padStart(8, '0'))
93+
// >>> 11111101
94+
// STEP_END
95+
// REMOVE_START
96+
assert.equal(res9.readUInt8(0), 0b11111101)
97+
// REMOVE_END
98+
99+
// STEP_START bitop_xor
100+
await client.bitOp("XOR", "R", ["A", "B"]) // XOR uses two keys here
101+
const res10 = await client.get("R")
102+
console.log(res10.readUInt8(0).toString(2).padStart(8, '0'))
103+
// >>> 11000001
104+
// STEP_END
105+
// REMOVE_START
106+
assert.equal(res10.readUInt8(0), 0b11000001)
107+
// REMOVE_END
108+
109+
// STEP_START bitop_not
110+
await client.bitOp("NOT", "R", "A")
111+
const res11 = await client.get("R")
112+
console.log(res11.readUInt8(0).toString(2).padStart(8, '0'))
113+
// >>> 00100111
114+
// STEP_END
115+
// REMOVE_START
116+
assert.equal(res11.readUInt8(0), 0b00100111)
117+
// REMOVE_END
118+
119+
// STEP_START bitop_diff
120+
await client.bitOp("DIFF", "R", ["A", "B", "C"])
121+
const res12 = await client.get("R")
122+
console.log(res12.readUInt8(0).toString(2).padStart(8, '0'))
123+
// >>> 10000000
124+
// STEP_END
125+
// REMOVE_START
126+
assert.equal(res12.readUInt8(0), 0b10000000)
127+
// REMOVE_END
128+
129+
// STEP_START bitop_diff1
130+
await client.bitOp("DIFF1", "R", ["A", "B", "C"])
131+
const res13 = await client.get("R")
132+
console.log(res13.readUInt8(0).toString(2).padStart(8, '0'))
133+
// >>> 00100101
134+
// STEP_END
135+
// REMOVE_START
136+
assert.equal(res13.readUInt8(0), 0b00100101)
137+
// REMOVE_END
138+
139+
// STEP_START bitop_andor
140+
await client.bitOp("ANDOR", "R", ["A", "B", "C"])
141+
const res14 = await client.get("R")
142+
console.log(res14.readUInt8(0).toString(2).padStart(8, '0'))
143+
// >>> 01011000
144+
// STEP_END
145+
// REMOVE_START
146+
assert.equal(res14.readUInt8(0), 0b01011000)
147+
// REMOVE_END
148+
149+
// STEP_START bitop_one
150+
await client.bitOp("ONE", "R", ["A", "B", "C"])
151+
const res15 = await client.get("R")
152+
console.log(res15.readUInt8(0).toString(2).padStart(8, '0'))
153+
// >>> 10100101
154+
// STEP_END
155+
// REMOVE_START
156+
assert.equal(res15.readUInt8(0), 0b10100101)
157+
38158
await client.close();
39159
// REMOVE_END

package-lock.json

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

packages/bloom/lib/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import RedisBloomModules from '.';
44
export default TestUtils.createFromConfig({
55
dockerImageName: 'redislabs/client-libs-test',
66
dockerImageVersionArgument: 'redis-version',
7-
defaultDockerVersion: '8.2.1-pre'
7+
defaultDockerVersion: '8.4-M01-pre'
88
});
99

1010
export const GLOBAL = {

0 commit comments

Comments
 (0)