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

[WIP] Develop merge #308

Open
wants to merge 75 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
394e9da
Working on Pebble BulkLoad stutter
kellrott Feb 2, 2024
b2a5c07
Starting to abstract structures in GDBI to better support different d…
kellrott Feb 7, 2024
88aa084
Adding missing files
kellrott Feb 7, 2024
ddf6dee
Fixing reference issues and move old test code
kellrott Feb 7, 2024
37b04e3
Adding verbose output option to server and fixing pebble bulk insert …
kellrott Feb 7, 2024
0f69c26
Simplifying `select` command and removing alternate use, which is bet…
kellrott Feb 7, 2024
531cdb9
Fixing issue with serialization of base traveler. Added a bunch of ru…
kellrott Feb 8, 2024
ee443ff
Debugging output check optimizer and cleaning up debug logging
kellrott Feb 9, 2024
c3798d0
Adjusting unit tests to remove outdated elements
kellrott Feb 9, 2024
d526ab6
Starting to refactor mongo data storage, to eliminate using the `data…
kellrott Feb 9, 2024
e4ba0b1
Fixing hasLabel bug
kellrott Feb 9, 2024
d75e125
Fixing schema sampling
kellrott Feb 9, 2024
e5bb94c
Adding missing file
kellrott Feb 9, 2024
0ab3ae1
Fixing various issues in the engines
kellrott Feb 9, 2024
5cabbd1
Working on issues conformance test issues
kellrott Feb 16, 2024
610803b
Fixing more conformance testing issues
kellrott Feb 16, 2024
eaef88e
Fixing various issues to get the key/value graph store to work
kellrott Feb 17, 2024
f52dce8
Fixing small issues around gripper driver testing
kellrott Feb 17, 2024
c60a321
Merge pull request #302 from bmeg/mongo-remap
kellrott Feb 17, 2024
5357f73
Fixing issues around mongo engine
kellrott Feb 17, 2024
69c4867
Fixing additional issues to clear errors in mongo engine
kellrott Feb 18, 2024
942105b
Adding path conversion unit tests
kellrott Feb 18, 2024
0f84a35
Improving command line job submission utilities and fixing mongo core…
kellrott Feb 19, 2024
166f1f7
Fixing compiler options so job system can override data loading optim…
kellrott Feb 19, 2024
e1b19ad
Merge pull request #303 from bmeg/mongo-remap
kellrott Feb 19, 2024
7121f8d
Merge pull request #301 from bmeg/grids-update
kellrott Mar 15, 2024
370ca21
Upgrading Goja and adding some callback methods into javascript client
kellrott Mar 15, 2024
39ea894
Functions for js query engine
kellrott Mar 18, 2024
f725c92
Adding verbose option to query command
kellrott Mar 19, 2024
4df877b
Adding configuration for endpoints
kellrott Mar 20, 2024
ac185a0
Fixing go mod links
kellrott Mar 21, 2024
87975df
Merge pull request #307 from bmeg/feature/endpoint-config
kellrott Apr 4, 2024
804b1a5
Adding context variable to go client traversal
kellrott Apr 11, 2024
e350317
Merge branch 'develop' into feature/grip-client-context
kellrott Apr 11, 2024
09f1a55
Merge pull request #309 from bmeg/feature/grip-client-context
kellrott Apr 15, 2024
3b618e0
Adds jobC to gripql client
matthewpeterkort May 14, 2024
405906b
Adding pivot method to query engine
kellrott Jun 15, 2024
0cd94d3
Adding test files
kellrott Jun 15, 2024
ca228fc
Working on support for mongo engine compiler
kellrott Jun 15, 2024
eddeade
Switching pivot to key/value storage based system
kellrott Jun 20, 2024
27afef6
update to golangv1.21.12
matthewpeterkort Jul 12, 2024
93139c0
adds broken grip deps for reproducing error
matthewpeterkort Jul 15, 2024
a236329
update to 1.22.5
matthewpeterkort Jul 15, 2024
5a6ef93
protoc, lint updates
matthewpeterkort Jul 15, 2024
dc77113
Fix code, tests to work with updated cast package
matthewpeterkort Jul 16, 2024
f0f1023
fixes
matthewpeterkort Jul 16, 2024
2148c7b
fix Mongo test
matthewpeterkort Jul 17, 2024
c245cf6
fix
matthewpeterkort Jul 17, 2024
d391505
bugfix
matthewpeterkort Jul 17, 2024
0d2e05c
Address feedback
matthewpeterkort Jul 18, 2024
aeb30de
Merge pull request #313 from bmeg/update/golang
kellrott Jul 18, 2024
eea63a6
Merge remote-tracking branch 'origin/develop' into feature/pivot
kellrott Jul 19, 2024
b008c92
Working on the docs
kellrott Jul 19, 2024
cf1d997
Adding `_id` field to pivot outputs
kellrott Jul 30, 2024
40967a7
Fixing _id output
kellrott Jul 30, 2024
8a922de
Adding bulk delete
matthewpeterkort Aug 2, 2024
6e1d980
Adding server functions
matthewpeterkort Aug 2, 2024
afaf151
package up
matthewpeterkort Aug 5, 2024
1d18818
debug statements
matthewpeterkort Aug 5, 2024
b172cf7
Merge pull request #312 from bmeg/feature/pivot
kellrott Aug 5, 2024
d0b3a78
Make bulk del a unary operation
matthewpeterkort Aug 6, 2024
ee9be35
fix bulk delete
matthewpeterkort Aug 6, 2024
b0392dd
adds test
matthewpeterkort Aug 6, 2024
29752ea
Merge branch 'develop' into feature/BulkDelete
matthewpeterkort Aug 7, 2024
f93ecbb
update test
matthewpeterkort Aug 7, 2024
9bf7ca1
fix proto
matthewpeterkort Aug 7, 2024
ab51dee
Optimize Mongo bulk delete
matthewpeterkort Aug 8, 2024
2d5367d
fix protoc body
matthewpeterkort Aug 12, 2024
2d17195
fix mongo test
matthewpeterkort Aug 12, 2024
359a032
add suggested args
matthewpeterkort Aug 12, 2024
99c314b
Merge pull request #315 from bmeg/feature/BulkDelete
kellrott Aug 12, 2024
73a7584
Adds support for sqlite
matthewpeterkort Sep 17, 2024
6ce3de0
update test workflow
matthewpeterkort Sep 17, 2024
529684b
fix action test names
matthewpeterkort Sep 17, 2024
b163abb
Merge pull request #317 from bmeg/feature/sqlite
kellrott Oct 3, 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
103 changes: 61 additions & 42 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.18
go-version: ^1.22.6

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build
run: go build -v ./

- name: Store grip
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: gripBin
path: grip
Expand All @@ -35,28 +35,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ^1.18
go-version: ^1.22.6
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: run unit tests
run: |
go test ./test/... -config badger.yml




badgerTest:
needs: build
name: Badger Conformance
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Badger Test
Expand All @@ -65,19 +64,19 @@ jobs:
./grip server --rpc-port 18202 --http-port 18201 --config ./test/badger.yml &
sleep 5
make test-conformance


pebbleTest:
needs: build
name: Pebble Conformance
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Pebble Test
Expand All @@ -86,19 +85,19 @@ jobs:
./grip server --rpc-port 18202 --http-port 18201 --config ./test/pebble.yml &
sleep 5
make test-conformance


mongoTest:
needs: build
name: Mongo Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Mongo Conformance
Expand All @@ -108,41 +107,41 @@ jobs:
./grip server --rpc-port 18202 --http-port 18201 --config ./test/mongo.yml &
sleep 5
make test-conformance


mongoCoreTest:
needs: build
name: Mongo Core Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Mongo Conformance
- name: Mongo Core Conformance
run: |
chmod +x grip
make start-mongo
./grip server --rpc-port 18202 --http-port 18201 --config ./test/mongo-core-processor.yml &
sleep 5
make test-conformance


elasticTest:
needs: build
name: Elastic Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Elastic Conformance
Expand All @@ -153,19 +152,19 @@ jobs:
./grip server --rpc-port 18202 --http-port 18201 --config ./test/elastic.yml &
sleep 5
make test-conformance


portgresTest:

postgresTest:
needs: build
name: Portgres Test
name: Postgres Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Postgres Conformance
Expand All @@ -176,21 +175,42 @@ jobs:
./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



sqliteTest:
needs: build
name: Sqlite Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy
- name: Download grip
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Sqlite Conformance
run: |
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


gripperTest:
needs: build
name: Gripper Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Update pip
run: pip install --upgrade pip
- name: Python Dependencies for Conformance
run: pip install -U requests numpy grpcio-tools protobuf
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Gripper Conformance
Expand All @@ -210,11 +230,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Python Dependencies for Conformance
run: pip install requests numpy PyYAML
- name: Download grip
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: gripBin
- name: Auth Test
Expand All @@ -224,30 +244,29 @@ jobs:
./grip server --rpc-port 18202 --http-port 18201 --config ./test/badger-auth.yml &
sleep 5
# simple auth
# run tests without credentials, should fail
# run tests without credentials, should fail
if make test-conformance
then
echo "ERROR: Conformance tests ran without credentials." ; exit 1
else
echo "Got expected auth error"
fi
echo "Got expected auth error"
fi
# run specialized role based tests
make test-authorization ARGS="--grip_config_file_path test/badger-auth.yml"






#gridsTest:
# needs: build
# name: GRIDs Conformance
# runs-on: ubuntu-latest
# steps:
# - name: Check out code
# uses: actions/checkout@v2
# uses: actions/checkout@v4
# - name: Python Dependencies for Conformance
# run: pip install requests numpy
# - name: Download grip
# uses: actions/download-artifact@v2
# uses: actions/download-artifact@v4
# with:
# name: gripBin
# - name: GRIDs unit tests
Expand Down
15 changes: 8 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ proto:
--go_opt paths=source_relative \
--go-grpc_out ./ \
--go-grpc_opt paths=source_relative \
--grpc-gateway_out ./ \
--grpc-gateway_out allow_delete_body=true:./ \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt paths=source_relative \
--grpc-rest-direct_out . \
Expand All @@ -66,11 +66,12 @@ proto:

proto-depends:
@git submodule update --init --recursive
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.11.1
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.11.1
@go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.1
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
@go install github.com/akuity/grpc-gateway-client/protoc-gen-grpc-gateway-client
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
@go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
@go install github.com/ckaznocha/protoc-gen-lint@v0.2.4
@go install github.com/ckaznocha/protoc-gen-lint@latest
@go install github.com/bmeg/protoc-gen-grpc-rest-direct@latest
@go install github.com/ckaznocha/protoc-gen-lint@latest

Expand All @@ -91,7 +92,7 @@ lint:
flake8 gripql/python/ conformance/

lint-depends:
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.35.2
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
go install golang.org/x/tools/cmd/goimports

# ---------------------
Expand Down Expand Up @@ -129,7 +130,7 @@ test-authorization:
# ---------------------
start-mongo:
@docker rm -f grip-mongodb-test > /dev/null 2>&1 || echo
docker run -d --name grip-mongodb-test -p 27017:27017 docker.io/mongo:3.6.4 > /dev/null
docker run -d --name grip-mongodb-test -p 27017:27017 mongo:7.0.13-rc0-jammy > /dev/null

start-elastic:
@docker rm -f grip-es-test > /dev/null 2>&1 || echo
Expand Down
1 change: 1 addition & 0 deletions accounts/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var MethodMap = map[string]Operation{
"/gripql.Edit/AddVertex": Write,
"/gripql.Edit/AddEdge": Write,
"/gripql.Edit/BulkAdd": Write,
"/gripql.Edit/BulkDelete": Write,
"/gripql.Edit/AddGraph": Write,
"/gripql.Edit/DeleteGraph": Write,
"/gripql.Edit/DeleteVertex": Write,
Expand Down
5 changes: 5 additions & 0 deletions accounts/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ func streamAuthInterceptor(auth Authenticate, access Access) grpc.StreamServerIn
//stream URL formatting, each write request can
//reference a different graph
return handler(srv, &BulkWriteFilter{ss, user, access})
} else if info.FullMethod == "/gripql.Edit/BulkDelete" {
return handler(srv, &BulkWriteFilter{ss, user, access})
} else {
log.Errorf("Unknown input streaming op %#v!!!", info)
return handler(srv, ss)
Expand Down Expand Up @@ -190,6 +192,9 @@ func getUnaryRequestGraph(req interface{}, info *grpc.UnaryServerInfo) (string,
case "/gripql.Edit/SampleSchema":
o := req.(*gripql.GraphID)
return o.Graph, nil
case "/gripql.Edit/BulkDelete":
o := req.(*gripql.DeleteData)
return o.Graph, nil
case "/gripql.Configure/StartPlugin", "/gripql.Configure/ListPlugins", "/gripql.Configure/ListDrivers":
return "*", nil //these operations effect all graphs
}
Expand Down
5 changes: 2 additions & 3 deletions benchmark/kv-query-profile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"log"
"os"
"runtime/pprof"
"strings"
"time"

"github.com/bmeg/grip/engine/pipeline"
Expand All @@ -17,7 +16,7 @@ import (
"github.com/bmeg/grip/kvgraph"
"github.com/bmeg/grip/kvi"
"github.com/dop251/goja"
"github.com/golang/protobuf/jsonpb"
"google.golang.org/protobuf/encoding/protojson"

gripqljs "github.com/bmeg/grip/gripql/javascript"

Expand Down Expand Up @@ -76,7 +75,7 @@ func main() {
}

query := gripql.GraphQuery{}
err = jsonpb.Unmarshal(strings.NewReader(string(queryJSON)), &query)
err = protojson.Unmarshal(queryJSON, &query)
if err != nil {
log.Printf("%s", err)
return
Expand Down
Loading
Loading