Skip to content

Commit 627581f

Browse files
committed
Merge branch 'main' into stream_acl_user_updates
2 parents 90b623f + 63eb219 commit 627581f

File tree

5 files changed

+71
-42
lines changed

5 files changed

+71
-42
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AllowShortLoopsOnASingleLine: false
99
AllowShortFunctionsOnASingleLine: false
1010
AllowShortIfStatementsOnASingleLine: false
1111
AlwaysBreakTemplateDeclarations: false
12-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
12+
PackConstructorInitializers: NextLine
1313
DerivePointerAlignment: false
1414
PointerAlignment: Left
1515
BasedOnStyle: Google

.github/workflows/bullmq-tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# These tests are disabled until Dragonfly works well with BullMQ.
2+
name: bullmq-tests
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
name: Build
10+
11+
timeout-minutes: 60
12+
container:
13+
image: ghcr.io/romange/alpine-dev:latest
14+
credentials:
15+
username: ${{ github.repository_owner }}
16+
password: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
submodules: true
22+
- name: Install NodeJs
23+
run: |
24+
apk add --no-cache nodejs npm yarn
25+
node --version
26+
npm --version
27+
yarn --version
28+
mkdir -p ${{github.workspace}}/build
29+
- name: Configure/Build
30+
working-directory: ${{github.workspace}}/build
31+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
32+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
33+
run: |
34+
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja
35+
ninja dragonfly
36+
./dragonfly --alsologtostderr &
37+
38+
- name: Clone and build BullMQ
39+
run: |
40+
git clone https://github.com/taskforcesh/bullmq.git
41+
cd bullmq
42+
pwd
43+
yarn install --ignore-engines --frozen-lockfile --non-interactive
44+
yarn build
45+
- name: Test BullMQ
46+
working-directory: ${{github.workspace}}/bullmq
47+
run: |
48+
# yarn test -i -g "should process delayed jobs with several workers respecting delay"

.github/workflows/daily-builds.yml

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,21 @@ jobs:
1313
# cross-platform coverage.
1414
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
1515
runs-on: ubuntu-latest
16-
name: Build with ${{ matrix.flags }} flags
16+
name: Build ${{ matrix.name }}
1717
strategy:
1818
matrix:
19-
# Build with these flags
20-
flags: ["-DMARCH_OPT=-march=x86-64"]
19+
include:
20+
# Build with these flags
21+
- name: generic
22+
container: alpine-dev
23+
flags: "-DMARCH_OPT=-march=x86-64"
24+
- name: fedora
25+
container: fedora:30
26+
2127
timeout-minutes: 45
2228

2329
container:
24-
image: ghcr.io/romange/alpine-dev:latest
30+
image: ghcr.io/romange/${{ matrix.container }}
2531
credentials:
2632
username: ${{ github.repository_owner }}
2733
password: ${{ secrets.GITHUB_TOKEN }}
@@ -30,49 +36,19 @@ jobs:
3036
- uses: actions/checkout@v3
3137
with:
3238
submodules: true
33-
- name: Install NodeJs
34-
run: |
35-
apk add --no-cache nodejs npm yarn
36-
node --version
37-
npm --version
38-
yarn --version
3939
- name: Install dependencies
4040
run: |
41-
uname -a
4241
cmake --version
4342
mkdir -p ${{github.workspace}}/build
44-
- name: Cache build deps
45-
id: cache-deps
46-
uses: actions/cache@v3
47-
with:
48-
path: |
49-
~/.ccache
50-
${{github.workspace}}/build/_deps
51-
key: ${{ runner.os }}-deps-${{ github.base_ref }}-${{ github.sha }}
52-
restore-keys: |
53-
${{ runner.os }}-deps-${{ github.base_ref }}-
5443
55-
- name: Configure CMake
44+
- name: Configure & Build
5645
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5746
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
47+
working-directory: ${{github.workspace}}/build
5848
run: |
59-
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ matrix.flags }}
60-
cd ${{github.workspace}}/build && pwd
61-
du -hcs _deps/
62-
- name: Build & Run
63-
run: |
64-
cd ${{github.workspace}}/build
49+
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ matrix.flags }}
6550
ninja src/all
66-
ccache --show-stats
67-
./dragonfly --alsologtostderr --default_lua_flags=allow-undeclared-keys &
68-
- name: Clone and build BullMQ
69-
run: |
70-
cd ${{github.workspace}}
71-
git clone https://github.com/taskforcesh/bullmq.git
72-
cd bullmq
73-
yarn install --ignore-engines --frozen-lockfile --non-interactive
74-
yarn build
75-
- name: Test BullMQ with dragonfly
51+
- name: Test
52+
working-directory: ${{github.workspace}}/build
7653
run: |
77-
cd ${{github.workspace}}/bullmq
78-
# yarn test -i -g "should process delayed jobs with several workers respecting delay"
54+
ctest -V -L DFLY

src/server/zset_family.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ zlexrangespec GetLexRange(bool reverse, const ZSetFamily::LexInterval& li) {
8484
range.min = GetLexStr(interval.first);
8585
range.max = GetLexStr(interval.second);
8686
range.minex = (interval.first.type == ZSetFamily::LexBound::OPEN);
87-
range.maxex = (li.second.type == ZSetFamily::LexBound::OPEN);
87+
range.maxex = (interval.second.type == ZSetFamily::LexBound::OPEN);
8888

8989
return range;
9090
}

src/server/zset_family_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ TEST_F(ZSetFamilyTest, ZRevRangeByLex) {
183183
resp = Run({"zrevrangebylex", "key", "+", "[a"});
184184
ASSERT_THAT(resp, ArgType(RespExpr::ARRAY));
185185
ASSERT_THAT(resp.GetVec(), ElementsAre("foo", "elephant", "down", "cool", "bar", "alpha"));
186+
187+
Run({"zadd", "myzset", "0", "a", "0", "b", "0", "c", "0", "d", "0", "e", "0", "f", "0", "g"});
188+
resp = Run({"zrevrangebylex", "myzset", "(c", "-"});
189+
ASSERT_THAT(resp, ArgType(RespExpr::ARRAY));
190+
EXPECT_THAT(resp.GetVec(), ElementsAre("b", "a"));
186191
}
187192

188193
TEST_F(ZSetFamilyTest, ZRange) {

0 commit comments

Comments
 (0)