-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor DB as document store, add Postgres, remove mongo #9176
Merged
Merged
Changes from 245 commits
Commits
Show all changes
269 commits
Select commit
Hold shift + click to select a range
19f25bd
Merge branch 'eelco/json_serde' into aziz/sql_json
eelcovdw f83a959
use new json serde, add enum support
eelcovdw 292e5b5
usercode, status, log
eelcovdw c9d647c
organize files
eelcovdw 3529f44
cleaning
eelcovdw 343ed69
add attr_searchable
eelcovdw 05e8306
add order_by for sync stash
eelcovdw e23af54
sync stash
eelcovdw 85f3991
implement code history
abyesilyurt 94a75af
blob store, contains
eelcovdw 13e9a97
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 6243156
key to str
abyesilyurt e47682e
update permissions
eelcovdw 812b4a5
action store WIP
eelcovdw ce75ea7
Merge remote-tracking branch 'origin/aziz/sql_json' into eelco/json_a…
abyesilyurt f771c59
implement action stash
abyesilyurt db703f4
implement storage permissions
abyesilyurt b7aa781
action object fixes
abyesilyurt 43ce9e5
fix get_mock
abyesilyurt 72df3b2
add exclude attrs
eelcovdw b71e5e7
Merge branch 'eelco/json_action_store' of github.com:OpenMined/PySyft…
abyesilyurt 948ef0d
fix deserialize
eelcovdw edd05f7
Merge branch 'eelco/json_action_store' of github.com:OpenMined/PySyft…
abyesilyurt 4d8c159
fix error handling
abyesilyurt b7bd8cb
type hint fixes
abyesilyurt bb84ae6
fix perms
abyesilyurt 5e3666d
fix test
abyesilyurt f25a86a
fix get_perms
abyesilyurt 7b31c9a
fix sync
abyesilyurt 0789e08
Add postgres document store
kiendang 439f400
Add postgres action store
kiendang b0be81a
add project stash
abyesilyurt 858ce52
Merge remote-tracking branch 'origin/dev' into aziz/sql_json
abyesilyurt d27616e
Merge branch 'dev' into postgres
khoaguin 94d80d4
[syft/stores] Update `server.py` to use `PostgreSQL` stores
khoaguin 42aced9
move sqlite connection to Server
eelcovdw 5762e6d
move sqlite connection to Server
eelcovdw 78fe0c7
implement notification stash
abyesilyurt 662c5a6
signature handling improvements
abyesilyurt cc07ef2
Merge branch 'dev' into postgres
khoaguin ad4e38b
[syft/server] replace mongo store config with postgres
khoaguin 5e0a3fc
merge WIP
eelcovdw cfdd3d5
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 48cc473
add stash
eelcovdw f3ea67b
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 72c7c58
fix bugs
abyesilyurt fee78f2
fix first notebook
eelcovdw d68e986
fix settingsstash
eelcovdw 635afbe
fix order
abyesilyurt 4c64595
fix sorting, add get_index
eelcovdw d26128a
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 17156ba
Merge branch 'dev' into postgres
khoaguin 2541fb8
fix bugs
abyesilyurt 93c5e25
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 366e267
bug fix
abyesilyurt d6d5546
Merge branch 'dev' into postgres
madhavajay f6d21a6
add basic postgres support
abyesilyurt eccdb6b
Made some progress on postgreql
madhavajay 1fc12a2
fix sync
abyesilyurt 1c221fa
Merge remote-tracking branch 'origin/aziz/fix_sync' into aziz/postgre…
abyesilyurt add9bb1
Merge branch 'dev' into postgres
shubham3121 ca9896a
Add helm templates for postgres
shubham3121 27ca802
Merge branch 'dev' into postgres
khoaguin bad8e5a
[syft/stores] new exception handlings for some methods in `SQLiteBack…
khoaguin 85f72f4
[syft/store] fix wrong imports and ports for postgres store
khoaguin a0a1f6c
merge dev
eelcovdw abfc2f1
fix
eelcovdw ea3114c
wip
abyesilyurt 156e6f6
Merge remote-tracking branch 'origin' into aziz/postgres_json
abyesilyurt 56bbe96
Merge branch 'aziz/sql_json' into aziz/postgres_json
abyesilyurt d2af027
Merge branch 'dev' into aziz/sql_json
eelcovdw f0a3d19
remove dict document store
abyesilyurt fd89d26
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt ffa9f59
fix settings stash test
abyesilyurt 83a6ab7
add remaining stashes
eelcovdw a7bfef2
fix
eelcovdw 6bf895d
fixes
eelcovdw c615b63
fix notifcation tests
abyesilyurt 03b4e11
fix request stash tests
abyesilyurt cc1b400
fix user stash tests
abyesilyurt 8163587
fix dataset stash tests
abyesilyurt 1aabb41
fix base stash tests
abyesilyurt 37e6a74
json serialize filter
eelcovdw aa1d8b3
fix
eelcovdw b2b9379
Merge pull request #9263 from OpenMined/eelco/remaining_stashes
eelcovdw 87b7d1a
fix notification service tests
abyesilyurt 10ee731
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 2bd627a
fix request service
abyesilyurt d3360e5
fix protocol
eelcovdw 14ed20f
merge dev
eelcovdw 0fdc2b8
remove dataset stash any type
eelcovdw e1c4e85
fix dependencies
eelcovdw 6ca11f8
fix project tests
abyesilyurt 1e2b976
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 38212c7
fix job unittests
eelcovdw 2745350
merge
eelcovdw 668bc3b
simple way to create stashes
abyesilyurt 6156456
fix queue
eelcovdw c6ae446
fix jobservice
eelcovdw 6213fe5
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt cd38c63
make traceback clickable
abyesilyurt 33d654f
postgres bug fixes
abyesilyurt 6e9d8fa
Merge branch 'dev' into postgres
khoaguin ddeab6d
wip postgres integration
abyesilyurt 12a8bc4
comment out postgres
abyesilyurt 01c1599
[k8s] stop creating the mongo pod in the cluster
khoaguin b578c0e
Merge branch 'dev' into postgres
khoaguin 2fb065e
[syft/postgre_store] fix store initialization by adding `CREATE TABLE…
khoaguin 9980c32
[lint] fix some linting issues
khoaguin 6e128cf
[tox] waiting for postgres instead of mongo service in k8s tests
khoaguin c5f0a48
[notebooks] revert api notebook `0-load-data` back to `dev`'s state
khoaguin e00edf7
[postgres] add error handling for getting postgres storage config fro…
khoaguin dc2ca25
Merge remote-tracking branch 'origin/dev' into aziz/sql_json
abyesilyurt 55316a7
fix consumer
eelcovdw dc668f3
[stores] refactor `_execute` to be a static method for both sqlite an…
khoaguin 48c7741
add Query, split table creation
eelcovdw 2ec8371
fix queue stash tests
abyesilyurt 6f7d3e0
remove old methods
eelcovdw 4f884ff
fix action store tests
abyesilyurt 08ba5b2
fix worker pool tests
abyesilyurt 726d8d1
fix some tests
abyesilyurt decebb0
Merge remote-tracking branch 'origin/dev' into aziz/sql_json
abyesilyurt 76f0f51
Merge branch 'dev' into postgres
khoaguin 77c8ac8
scope the use of cursor and db connection
shubham3121 4fd6070
fix lint
shubham3121 da16fcf
fix _delete args in postgres sqlstore
shubham3121 d3e6e2b
fix iter and order
abyesilyurt eb3501b
WIP migrationservice
eelcovdw 9fddca6
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 8b5c98c
merge
eelcovdw 8af186f
fix migrations
eelcovdw a523780
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 151682d
fix test
abyesilyurt c4c1344
fix test
eelcovdw dcbc08e
merge
eelcovdw 1ff2e96
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 72d36d6
add a few log statements
shubham3121 3d6dfff
merge
eelcovdw c51f544
set prepare_threshold to None
shubham3121 ff90871
fix new query
eelcovdw 2609c0d
fix more tests
abyesilyurt c34ade6
Merge pull request #9277 from OpenMined/eelco/split-objectstash
eelcovdw 8a68ff4
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 064bb2d
fix all unit tests
abyesilyurt d92a9f0
refactor get_one, add validation to limit offset
eelcovdw 0a542cc
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 00d69ac
fix dataset get_all
eelcovdw 7ee43e9
implement reset password flow for python and fix it
abyesilyurt 158c2f3
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt b6c2381
fix some linting errors
abyesilyurt 5998d58
fix is_unique, get_role
eelcovdw fc03c41
merge
eelcovdw a094d64
comments
eelcovdw d593a94
fix set type annotation
eelcovdw 963a857
local session management
eelcovdw ef3ba4b
Merge branch 'dev' into postgres
khoaguin c81764b
[clean] remove mongo related tests and fixtures
khoaguin 175a50b
[clean] remove mongo from tox.ini and helm's `base.yaml`
khoaguin 81bf1a3
[clean] delete mongo code from document store
khoaguin 095398f
Merge remote-tracking branch 'origin' into aziz/sql_json
abyesilyurt 6df49c7
[clean] remove mongomock in tests and mongo-related packages
khoaguin fee08de
[clean] remove mongo related api reference
khoaguin 3eabf45
fix lint
abyesilyurt 895e3cd
[script] `reset_k8s.sh` works with postgres
khoaguin 3272d9b
fix session
eelcovdw aea9877
replace DocumentStore with DBManager
abyesilyurt 114a287
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 6d0b4b9
fix env variables in module scope, fix root admin already exists
eelcovdw 17315ab
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 93ac91b
Merge branch 'dev' into postgres
khoaguin 410deb6
Merge branch 'dev' into postgres
khoaguin d5a950a
add a connection pool class
shubham3121 93c886e
Merge branch 'aziz/sql_json' into shubham/postgres-k8s
shubham3121 8606b5c
Merge branch 'dev' into aziz/sql_json
shubham3121 4aa6c2f
Merge branch 'aziz/sql_json' into shubham/postgres-k8s
shubham3121 fd6ef15
add protocol
eelcovdw 90d1ee4
split db manager class
eelcovdw 1aa70c5
rename db_sqlite
eelcovdw 5ff95b9
add partial updates
abyesilyurt 07bba88
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 3b77c22
root admin delete check
eelcovdw 5a96ae9
fix
eelcovdw 7b46813
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw d631b90
fix tests that delete root user
eelcovdw ffc2b52
implement nested queries
abyesilyurt bd0ed78
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt cadba5c
remove duplicate postgres reference in base.yml
shubham3121 8eb48a0
add a test for todo item
abyesilyurt 3451ead
clean up todo notes
abyesilyurt d065151
rename postgres_db to postgres.py
shubham3121 f9caf28
rename base to sqlite_db.py
shubham3121 a849dbe
Merge branch 'dev' into aziz/sql_json
eelcovdw f768b58
Merge branch 'aziz/sql_json' into shubham/postgres-k8s
shubham3121 83a6b3e
Merge branch 'aziz/sql_json' into shubham/postgres-k8s
shubham3121 12c0f17
fix imports
shubham3121 000092d
update postgres version to 16.1
shubham3121 f1cd69a
[deps] scanning postgres:16.1 security
khoaguin 011a1bb
fixes
eelcovdw 8d1d482
fix network service
abyesilyurt f62e497
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 71c0c02
Merge branch 'shubham/postgres-k8s' into aziz/sql_json
abyesilyurt 5d8ecd0
update protocol file
abyesilyurt 7deb517
add db config
abyesilyurt b35a503
fix migration tests
eelcovdw 2f558aa
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw 0708054
- [db] fix failed stack.notebook test since by changing `SQLITE_PATH`…
khoaguin 547e191
Merge branch 'dev' into aziz/sql_json
khoaguin 0ddbc53
add different base to handle two dbs
abyesilyurt 43ca0d3
add get_table to basecls
eelcovdw 1ef6506
fix postgres error
abyesilyurt 8a6921d
fix queries for postgres
abyesilyurt 4d187bf
Merge branches 'aziz/sql_json' and 'aziz/sql_json' of github.com:Open…
abyesilyurt f933469
fix sqlite
abyesilyurt 501861b
fix ordering in postgres
abyesilyurt 0dc509e
fix string casting in postgres
abyesilyurt 66851f4
deduplicate permissions
eelcovdw 270d55f
merge
eelcovdw 638132c
fix getlatest
eelcovdw 72256f7
fix orderby non-json
eelcovdw 86153ae
fix lint CI
eelcovdw 7bf6452
fix lint
eelcovdw 4865ec6
remove uses of find_all
abyesilyurt 5e1882a
fix instrument imports
eelcovdw 3a19577
trying to fix flaky test
abyesilyurt 9afcacb
Merge branch 'dev' into aziz/sql_json
shubham3121 39a06b7
[protocol_version] define old version for `SyftWorkerImage` and `Noti…
khoaguin 1742cf0
reset queue version to 1 and remove migrations for queue and subclasses
shubham3121 cbd320d
fix lint
shubham3121 74f0edb
fix arg to refer to canonical name if exists
shubham3121 3b3023d
[clean] remove `store_client_config` arg using for debug
khoaguin b93f7d7
fix migration logic for worker settings
shubham3121 34a9ca0
fix partial updates
abyesilyurt 2be5322
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 48668e4
fix return statement in queue stash migration
shubham3121 ef4d05f
rename create_root_admin
eelcovdw 8c1c5fc
rename searchable attrs serde
eelcovdw 1040fa5
jsonserde default noop
eelcovdw cc8e976
change sqlite db path in container mode and postgresql mount path in …
khoaguin a6ea3d5
fix class name for APIEndpointQueueItem version 1
shubham3121 7a64588
add sqlalchemy opentelemetry intrumentation package to pypi
shubham3121 5b4c63a
refactor db reset logic
abyesilyurt e352e92
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
abyesilyurt 8a47d99
use in memory sqlite
abyesilyurt 8417653
manage db path externally
abyesilyurt e5ff154
Revert "manage db path externally"
abyesilyurt f489ee4
more logs in custom endpoint notebook
eelcovdw c3eb2df
Merge branch 'aziz/sql_json' of github.com:OpenMined/PySyft into aziz…
eelcovdw f1e8d41
debug partition_by_server
eelcovdw c6d0e0b
wrap DatabaseError
eelcovdw b59fede
error handling for Query db errors
eelcovdw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
docs/source/api_reference/syft.store.mongo_document_store.rst
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ ARG TORCH_VERSION="2.2.2" | |
|
||
# ==================== [BUILD STEP] Python Dev Base ==================== # | ||
|
||
FROM cgr.dev/chainguard/wolfi-base as syft_deps | ||
FROM cgr.dev/chainguard/wolfi-base AS syft_deps | ||
|
||
ARG PYTHON_VERSION | ||
ARG UV_VERSION | ||
|
@@ -45,7 +45,7 @@ RUN --mount=type=cache,target=/root/.cache,sharing=locked \ | |
|
||
# ==================== [Final] Setup Syft Server ==================== # | ||
|
||
FROM cgr.dev/chainguard/wolfi-base as backend | ||
FROM cgr.dev/chainguard/wolfi-base AS backend | ||
|
||
ARG PYTHON_VERSION | ||
ARG UV_VERSION | ||
|
@@ -84,9 +84,10 @@ ENV \ | |
DEFAULT_ROOT_EMAIL="[email protected]" \ | ||
DEFAULT_ROOT_PASSWORD="changethis" \ | ||
STACK_API_KEY="changeme" \ | ||
MONGO_HOST="localhost" \ | ||
MONGO_PORT="27017" \ | ||
MONGO_USERNAME="root" \ | ||
MONGO_PASSWORD="example" | ||
POSTGRESQL_DBNAME="syftdb_postgres" \ | ||
POSTGRESQL_HOST="localhost" \ | ||
POSTGRESQL_PORT="5432" \ | ||
POSTGRESQL_USERNAME="syft_postgres" \ | ||
POSTGRESQL_PASSWORD="example" | ||
|
||
CMD ["bash", "./grid/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shubham3121 I changed this to
/tmp/syft
to solve sqlalchemy can't open database file in/root/data/db
, but not sure it's optimal. Also inpostgres-statefulset.yaml
themountPath
is set to/data/db
, should be change it to be the same to value ofSQLITE_PATH
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error do we get with
/root/data/db
? Does it complain about directory doesn't exists or some sort of permission error ? Earlier we used to dir if doesn't exist, I think sqlalchemy could do that same maybe via some config.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error is like below. I think it's a permission issue. This made the
stack.test.notebook
failed since the backend container was not runningThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its seems like a permission issue to create a directory at the root level. Maybe we can create the director beforehand (while changing ownership of directory to user)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but is there any problem with using
/tmp/syft
since we use it in the local python version?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after discussion changed it to
/tmp/data/db
for both single container and k8s mode in this commit cc8e976