Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1b9a84c
start index
matthewpeterkort May 27, 2025
6a4672c
start indexing
matthewpeterkort May 30, 2025
20b78bd
Add custom processor for grids indexing
matthewpeterkort May 30, 2025
de2d996
update test
matthewpeterkort Jun 2, 2025
64d4cdc
start make indexing work with data in grids
matthewpeterkort Jun 3, 2025
5770297
most tests passing
matthewpeterkort Jun 9, 2025
2c1890c
delete index working
matthewpeterkort Jun 10, 2025
8261f69
adds indexing
matthewpeterkort Jun 10, 2025
96c12b1
fix bug in grids driver
matthewpeterkort Jun 11, 2025
ed8d464
cleanup
matthewpeterkort Jun 11, 2025
dcc3271
fix small benchtop issues
matthewpeterkort Jun 12, 2025
b6b69b4
fix bugs
matthewpeterkort Jun 12, 2025
575ac6c
adds support for nested fields and compound filters
matthewpeterkort Jun 16, 2025
581d70f
censor password
matthewpeterkort Jun 16, 2025
352daca
seperate nested index tests
matthewpeterkort Jun 16, 2025
bf47130
bug fixes
matthewpeterkort Jun 18, 2025
e59cd79
nuke 'grids' storage style. Optimize for performance
matthewpeterkort Jun 25, 2025
9962b04
many optimizations on grids driver
matthewpeterkort Jun 26, 2025
00a1ed6
checkpoint. tests are passing
matthewpeterkort Jul 1, 2025
2a6b21c
run good
matthewpeterkort Jul 7, 2025
26de517
fix grids processor so that indexed query optimizations only happen w…
matthewpeterkort Jul 11, 2025
0e2524c
add unique mongo index name
matthewpeterkort Jul 11, 2025
c1892d4
update grids driver with various bug fixes
matthewpeterkort Jul 14, 2025
900bd8c
add grids disclaimer message
matthewpeterkort Aug 18, 2025
31b52c3
filter logic updates
matthewpeterkort Aug 18, 2025
7835cf4
upgrade deps
matthewpeterkort Aug 18, 2025
95a7861
Dealing with module name change in benchtop
kellrott Aug 21, 2025
705343b
update rest of names
matthewpeterkort Aug 21, 2025
83f67ae
Merge pull request #330 from bmeg/feature/benchtop-module-rename
kellrott Aug 22, 2025
fd18235
Fixes bugs with bulk delete function. Improves bulk delete function t…
matthewpeterkort Aug 26, 2025
9a28fee
update benchtop version to merged version
matthewpeterkort Aug 27, 2025
4c6e54d
Merge pull request #331 from bmeg/fix/bulk-delete
kellrott Aug 27, 2025
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
18 changes: 5 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
name: gripBin
path: grip


unitTests:
needs: build
name: Unit tests
Expand Down Expand Up @@ -65,7 +66,6 @@ jobs:
sleep 5
python conformance/run_kafka.py


badgerTest:
needs: build
name: Badger Conformance
Expand All @@ -86,7 +86,6 @@ jobs:
sleep 5
make test-conformance


pebbleTest:
needs: build
name: Pebble Conformance
Expand All @@ -107,7 +106,6 @@ jobs:
sleep 5
make test-conformance


mongoTest:
needs: build
name: Mongo Test
Expand All @@ -127,8 +125,7 @@ jobs:
make start-mongo
./grip server --rpc-port 18202 --http-port 18201 --config ./test/mongo.yml &
sleep 5
make test-conformance

python conformance/run_conformance.py http://localhost:18201 --exclude nested_index

mongoCoreTest:
needs: build
Expand Down Expand Up @@ -171,8 +168,7 @@ jobs:
sleep 15
./grip server --rpc-port 18202 --http-port 18201 --config ./test/psql.yml &
sleep 5
python conformance/run_conformance.py http://localhost:18201 --exclude index aggregations

python conformance/run_conformance.py http://localhost:18201 --exclude aggregations

sqliteTest:
needs: build
Expand All @@ -192,8 +188,7 @@ jobs:
chmod +x grip
./grip server --rpc-port 18202 --http-port 18201 --config ./test/sqlite.yml &
sleep 5
python conformance/run_conformance.py http://localhost:18201 --exclude index aggregations

python conformance/run_conformance.py http://localhost:18201 --exclude aggregations

gripperTest:
needs: build
Expand All @@ -218,8 +213,7 @@ jobs:
sleep 5
./grip server --rpc-port 18202 --http-port 18201 --config ./gripper/test-graph/config.yaml --er tableServer=localhost:50051 &
sleep 5
python conformance/run_conformance.py http://localhost:18201 --readOnly swapi --exclude pivot

python conformance/run_conformance.py http://localhost:18201 --readOnly swapi --exclude index pivot

authTest:
needs: build
Expand Down Expand Up @@ -251,8 +245,6 @@ jobs:
# run specialized role based tests
make test-authorization ARGS="--grip_config_file_path test/pebble-auth.yml"



gridsTest:
needs: build
name: GRIDs Conformance
Expand Down
6 changes: 4 additions & 2 deletions accounts/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"encoding/base64"
"fmt"
"strings"

"github.com/bmeg/grip/log"
)

// BasicCredential describes a username and password for use with Funnel's basic auth.
Expand All @@ -18,7 +20,7 @@ func (ba BasicAuth) Validate(md MetaData) (string, error) {
var auth []string
var ok bool

fmt.Printf("Running BasicAuth: %#v\n", md)
log.Infof("Running BasicAuth: %#v\n", md)

if auth, ok = md["Authorization"]; !ok {
if auth, ok = md["authorization"]; !ok {
Expand All @@ -28,7 +30,7 @@ func (ba BasicAuth) Validate(md MetaData) (string, error) {

if len(auth) > 0 {
user, password, ok := parseBasicAuth(auth[0])
fmt.Printf("User: %s Password: %s OK: %s\n", user, password, ok)
log.Infof("Authenticating as User: %s OK: %t\n", user, ok)
for _, c := range ba {
if c.User == user && c.Password == password {
return user, nil
Expand Down
1 change: 1 addition & 0 deletions accounts/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var MethodMap = map[string]Operation{
"/gripql.Edit/DeleteVertex": Write,
"/gripql.Edit/DeleteEdge": Write,
"/gripql.Edit/AddIndex": Write,
"/gripql.Edit/DeleteIndex": Write,
"/gripql.Edit/AddSchema": Write,
"/gripql.Edit/AddJsonSchema": Write,
"/gripql.Edit/AddMapping": Write,
Expand Down
7 changes: 5 additions & 2 deletions conformance/run_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,22 @@ def setGraph(self, name):
self._conn.addGraph(self.curGraph)

G = self._conn.graph(self.curGraph)
bulk = G.bulkAdd()

with open(os.path.join(BASE, "graphs", "%s.vertices" % (name))) as handle:
for line in handle:
data = json.loads(line)

G.addVertex(data["_id"], data["_label"], self.collect_fields_dict(data))
bulk.addVertex(data["_id"], data["_label"], self.collect_fields_dict(data))

with open(os.path.join(BASE, "graphs", "%s.edges" % (name))) as handle:
for line in handle:
data = json.loads(line)
G.addEdge(src=data["_from"], dst=data["_to"],
bulk.addEdge(src=data["_from"], dst=data["_to"],
id=data.get("_id", None), label=data["_label"],
data=self.collect_fields_dict(data))

bulk.execute()
self.curName = name
return G

Expand Down
10 changes: 4 additions & 6 deletions conformance/tests/auth_basic.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import absolute_import

import requests


def test_current_user_has_policy(manager):
"""Ensure current user has a policy defined."""
Expand All @@ -18,7 +16,7 @@ def test_current_user_can_query(manager):
account = manager.current_user_account()
assert account, f"Could not find account for {manager.user}"
policies = account.policies
assert len(policies) > 0, f"Should have at least one policy"
assert len(policies) > 0, "Should have at least one policy"
errors = []

if not account.is_admin:
Expand Down Expand Up @@ -56,7 +54,7 @@ def test_current_user_can_read(manager):
account = manager.current_user_account()
assert account, f"Could not find account for {manager.user}"
policies = account.policies
assert len(policies) > 0, f"Should have at least one policy"
assert len(policies) > 0, "Should have at least one policy"
errors = []
# non admin user
if not account.is_admin:
Expand Down Expand Up @@ -92,7 +90,7 @@ def test_current_user_can_write(manager):
account = manager.current_user_account()
assert account, f"Could not find account for {manager.user}"
policies = account.policies
assert len(policies) > 0, f"Should have at least one policy"
assert len(policies) > 0, "Should have at least one policy"
errors = []
# non admin user
if not account.is_admin:
Expand All @@ -109,7 +107,7 @@ def test_current_user_can_write(manager):
try:
manager.test_write('dummy')
errors.append(f"{manager.user} should not be able to write dummy graph")
except AssertionError as e:
except AssertionError:
pass

else:
Expand Down
3 changes: 2 additions & 1 deletion conformance/tests/ot_has.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def test_has_prev(man):
q = q.has(gripql.neq("$1._id", "$._id"))
count = 0
for i in q.render(["$1._id", "$._id"]):
print(i)
if i[0] == i[1]:
errors.append("History based filter failed: %s" % (i[0]) )
count += 1
Expand Down Expand Up @@ -171,6 +170,7 @@ def test_has_neq(man):
"Fail: G.query().V().has(gripql.not_(gripql.eq(\"_label\", \"Character\"))) %s != %s" %
(count, 21))


count = 0
for i in G.query().V().hasLabel("Character").has(gripql.neq("eye_color", "brown")):
count += 1
Expand All @@ -181,6 +181,7 @@ def test_has_neq(man):
"Fail: G.query().V().has(gripql.not_(gripql.eq(\"eye_color\", \"brown\"))) %s != %s" %
(count, 14))


return errors


Expand Down
Loading
Loading