Skip to content
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

remove runtime tests, remove extra prints #575

Merged
merged 45 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
213e152
remove runtime tests, remove extra prints
swilly22 Feb 14, 2024
f81c5ef
Merge branch 'master' into clean-flowtest
swilly22 Feb 14, 2024
3e63878
update tests requirements
swilly22 Feb 14, 2024
5820c29
remove pathos requierment, switch to python asyncio
swilly22 Feb 17, 2024
f6b0c89
switch to asyncio.run
swilly22 Feb 18, 2024
195213d
Merge branch 'master' into clean-flowtest
swilly22 Feb 18, 2024
b4c9f8a
install RLTest directly from github repo
swilly22 Feb 19, 2024
aef0369
Merge branch 'master' into clean-flowtest
swilly22 Feb 19, 2024
863f8fa
update dockerfile compiler
swilly22 Feb 19, 2024
addd26a
install redis
AviAvni Feb 19, 2024
3f97a3d
remove sudu
AviAvni Feb 19, 2024
105b3fd
remove sudo
AviAvni Feb 19, 2024
9ac88a1
fix setup redis
AviAvni Feb 19, 2024
de25493
fix install redis
AviAvni Feb 19, 2024
124c957
use venv
AviAvni Feb 19, 2024
0f29161
set venv in path
AviAvni Feb 19, 2024
1354c16
fix sanitizer
AviAvni Feb 19, 2024
904e21b
fix sanitizer build
AviAvni Feb 19, 2024
e5bc8a9
fix sanitier build
AviAvni Feb 19, 2024
ea58192
fix sanitizer build
AviAvni Feb 19, 2024
0a81779
fix sanitizer build
AviAvni Feb 19, 2024
9652cb2
add clang to sanitizer
AviAvni Feb 19, 2024
02cadd1
add libc6-dbg
AviAvni Feb 19, 2024
d25813a
.
AviAvni Feb 19, 2024
3ec26a0
add libomp
AviAvni Feb 19, 2024
828ddca
fix sanitizer
AviAvni Feb 19, 2024
223ed89
fix redis install
AviAvni Feb 19, 2024
fffd8ac
fix redis
AviAvni Feb 19, 2024
2d3bddc
reduce flow test parallelism
swilly22 Feb 19, 2024
49e5b6c
create connection pool inside async func and make sure to close it
swilly22 Feb 19, 2024
7620d13
close async connection
swilly22 Feb 20, 2024
90930e9
remove flushall
swilly22 Feb 21, 2024
0cad99f
Merge branch 'master' into clean-flowtest
swilly22 Feb 21, 2024
332c525
specify port for connection pool
swilly22 Feb 21, 2024
4cd040a
address PR comments
swilly22 Feb 22, 2024
b7ea7bf
Update build.yml
swilly22 Feb 22, 2024
2ce3c82
Update test_cache.py
swilly22 Feb 22, 2024
cb7348e
Update test_concurrent_query.py
swilly22 Feb 22, 2024
741d5c3
Update test_concurrent_query.py
swilly22 Feb 22, 2024
8a39826
Update test_edge_index_scans.py
swilly22 Feb 22, 2024
96d9d46
Update test_encode_decode.py
swilly22 Feb 22, 2024
ecf3aec
Update test_graph_deletion.py
swilly22 Feb 22, 2024
1b64d96
Update test_graph_deletion.py
swilly22 Feb 22, 2024
1ccd192
Update test_path_filter.py
swilly22 Feb 22, 2024
d1052a8
address PR comments
swilly22 Feb 22, 2024
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
17 changes: 13 additions & 4 deletions .github/workflows/sanitize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
sanitize-test:
runs-on: ubuntu-latest
container: falkordb/falkordb-build:latest
container: falkordb/falkordb-build:ubuntu
steps:

- name: Safe dir
Expand Down Expand Up @@ -40,7 +40,12 @@ jobs:
key: search-sanitizer-${{ hashFiles('./deps/RediSearch/src/version.h') }}

- name: Build
run: make CLANG=1 SAN=address NPROC=16
run: |
apt-get install -y clang libomp-dev libc6-dbg python3-venv
python3 -m venv venv
. venv/bin/activate
pip install -r tests/requirements.txt
make CLANG=1 SAN=address NPROC=16

- name: Unit tests
id: unit_tests
Expand All @@ -55,7 +60,9 @@ jobs:

- name: Flow tests
id: flow_tests
run: make flow-tests CLEAR_LOGS=0 SAN=address
run: |
. venv/bin/activate
make flow-tests CLEAR_LOGS=0 SAN=address
continue-on-error: true

- uses: actions/upload-artifact@v4
Expand All @@ -66,7 +73,9 @@ jobs:

- name: TCK tests
id: tck_tests
run: make tck-tests CLEAR_LOGS=0 SAN=address
run: |
. venv/bin/activate
make tck-tests CLEAR_LOGS=0 SAN=address
continue-on-error: true

- uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions build/docker/Dockerfile.compiler
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG TARGETPLATFORM=linux/amd64

FROM --platform=$TARGETPLATFORM falkordb/falkordb-build:latest as builder
FROM --platform=$TARGETPLATFORM falkordb/falkordb-build:ubuntu as builder

WORKDIR /FalkorDB

COPY . /FalkorDB

RUN make
RUN make
4 changes: 1 addition & 3 deletions demo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ class QueryInfo(object):
This class contains the needed data about a query
"""

def __init__(self, query=None, description=None, max_run_time_ms=None, expected_result=None, reversible=True):
def __init__(self, query=None, description=None, expected_result=None, reversible=True):
Copy link

@coderabbitai coderabbitai bot Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The removal of max_run_time_ms from the QueryInfo constructor has been widely adopted across the project, aligning with the updated constructor signature. However, an exception was found in ./tests/flow/test_graph_deletion.py:175, where max_run_time_ms is still being used. This indicates that while most instances have been updated, there remains at least one instance that does not match the new constructor signature.

Analysis chain

The removal of max_run_time_ms from the QueryInfo constructor simplifies query initialization by eliminating runtime checks. Ensure all instances of QueryInfo across the project are updated to match the new constructor signature.


Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Search for instances of QueryInfo being initialized with the old signature.
ast-grep --lang python --pattern $'QueryInfo($_, $_, $_, $_, $_)'

Length of output: 66



Script:

#!/bin/bash
# Broaden the search for instances of QueryInfo being initialized with any number of parameters to ensure all instances match the updated constructor signature.
ast-grep --lang python --pattern $'QueryInfo($$$)'

Length of output: 50983

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swilly22 check this

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

"""
QueryInfo contructor

:param query: The query itself (string)
:param description: The information about what the query does (string)
:param max_run_time_ms: The max run time of the query in milliseconds (float)
:param expected_result: The expected result of the query (list of lists, where the first list
is the columns names, and the rest is the result)
"""

self.query = query
self.description = description
self.expected_result = expected_result
self.max_run_time_ms = max_run_time_ms
self.reversible = reversible

18 changes: 0 additions & 18 deletions demo/imdb/imdb_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def __init__(self, actors=None, movies=None):
self.number_of_actors_query = QueryInfo(
query="""MATCH (n:actor) RETURN count(n) as actors_count""",
description='How many actors are in the graph?',
max_run_time_ms=0.2,
expected_result=[[1317]]
)

Expand All @@ -28,7 +27,6 @@ def __init__(self, actors=None, movies=None):
query="""MATCH (n:actor{name:"Nicolas Cage"})-[:act]->(m:movie)<-[:act]-(a:actor)
RETURN a.name, m.title ORDER BY a.name""",
description='Which actors played along side Nicolas Cage?',
max_run_time_ms=4,
expected_result=[['Cassi Thomson', 'Left Behind'],
['Chad Michael Murray', 'Left Behind'],
['Gary Grubbs', 'Left Behind'],
Expand All @@ -50,7 +48,6 @@ def __init__(self, actors=None, movies=None):
ORDER BY a.name, m.title
LIMIT 3""",
description='Get 3 actors who have played along side Nicolas Cage?',
max_run_time_ms=4,
expected_result=[['Cassi Thomson', 'Left Behind'],
['Chad Michael Murray', 'Left Behind'],
['Gary Grubbs', 'Left Behind']]
Expand All @@ -65,7 +62,6 @@ def __init__(self, actors=None, movies=None):
query="""MATCH (a:actor)-[:act]->(m:movie {title:"Straight Outta Compton"})
RETURN a.name""",
description='Which actors played in the movie Straight Outta Compton?',
max_run_time_ms=3.5,
expected_result=[['Aldis Hodge'],
['Corey Hawkins'],
['Neil Brown Jr.'],
Expand Down Expand Up @@ -98,7 +94,6 @@ def __init__(self, actors=None, movies=None):
WHERE a.age >= 50 AND m.votes > 10000 AND m.rating > 8.2
RETURN a, m ORDER BY a.name, m.name""",
description='Which actors who are over 50 played in blockbuster movies?',
max_run_time_ms=4.0,
expected_result=expected_result
)

Expand Down Expand Up @@ -133,7 +128,6 @@ def __init__(self, actors=None, movies=None):
RETURN a.name, m
ORDER BY m.rating""",
description='Which actors played in bad drama or comedy?',
max_run_time_ms=4,
expected_result = expected_result
)

Expand All @@ -155,7 +149,6 @@ def __init__(self, actors=None, movies=None):
RETURN DISTINCT a.name""",
description='Which actors played in Action, Drama and Comedy movies?',
reversible=False,
max_run_time_ms=1.5,
expected_result = expected_result
)

Expand All @@ -175,7 +168,6 @@ def __init__(self, actors=None, movies=None):
WHERE a.age < 35
RETURN a, m.title ORDER BY m.title""",
description='Which young actors played along side Cameron Diaz?',
max_run_time_ms=5,
expected_result=expected_result
)

Expand All @@ -201,7 +193,6 @@ def __init__(self, actors=None, movies=None):
WHERE a.age < Cameron.age
RETURN a, m.title order by a.name""",
description='Which actors played along side Cameron Diaz and are younger then her?',
max_run_time_ms=7,
expected_result=expected_result
)

Expand All @@ -214,7 +205,6 @@ def __init__(self, actors=None, movies=None):
query="""MATCH (a:actor)-[:act]->(m:movie{title:"Straight Outta Compton"})
RETURN m.title, SUM(a.age), AVG(a.age)""",
description='What is the sum and average age of the Straight Outta Compton cast?',
max_run_time_ms=4,
expected_result=[['Straight Outta Compton', 131, 32.75]]
)

Expand All @@ -227,7 +217,6 @@ def __init__(self, actors=None, movies=None):
query="""MATCH (Cameron:actor{name:"Cameron Diaz"})-[:act]->(m:movie)
RETURN Cameron.name, COUNT(m.title)""",
description='In how many movies did Cameron Diaz played?',
max_run_time_ms=1.2,
expected_result=[['Cameron Diaz', 3]]
)

Expand Down Expand Up @@ -259,7 +248,6 @@ def __init__(self, actors=None, movies=None):
ORDER BY a.age DESC
LIMIT 10""",
description='10 Oldest actors?',
max_run_time_ms=4.5,
expected_result=expected_result
)

Expand Down Expand Up @@ -287,7 +275,6 @@ def __init__(self, actors=None, movies=None):
RETURN *
ORDER BY a.age, a.name""",
description='Actors over 85 on indexed property?',
max_run_time_ms=1.5,
expected_result=expected_result
)

Expand All @@ -302,7 +289,6 @@ def __init__(self, actors=None, movies=None):
RETURN m.title, m.year
ORDER BY m.year""",
description='Multiple filters on indexed property?',
max_run_time_ms=1.5,
expected_result=[['The Evil Dead', 1981],
['Vincent', 1982]]
)
Expand All @@ -317,7 +303,6 @@ def __init__(self, actors=None, movies=None):
RETURN m.title
ORDER BY m.title""",
description='Movies starting with "American"?',
max_run_time_ms=4,
expected_result=[['American Honey'],
['American Pastoral'],
['American Sniper']]
Expand All @@ -337,7 +322,6 @@ def __init__(self, actors=None, movies=None):
LIMIT 10""",
description='List 10 movies released on the same year as "Hunt for the Wilderpeople" that got higher rating than it',
reversible=False,
max_run_time_ms=0.8,
expected_result=[["Hacksaw Ridge", 8.8],
["Moonlight", 8.7],
["La La Land", 8.6],
Expand All @@ -360,7 +344,6 @@ def __init__(self, actors=None, movies=None):
ORDER BY node.name""",
description='All actors named Tim',
reversible=False,
max_run_time_ms=4,
expected_result=[['Tim Roth'],
['Tim Reid'],
['Tim McGraw'],
Expand All @@ -381,7 +364,6 @@ def __init__(self, actors=None, movies=None):

description='All actors in The Grand Budapest Hotel and their other movies',
reversible=False,
max_run_time_ms=4,
expected_result=[['Adrien Brody', None],
['Bill Murray', 'The Jungle Book'],
['F. Murray Abraham', None],
Expand Down
Loading