Commit Graph

21 Commits

Author SHA1 Message Date
izzy lyseggen 9fa6b661eb feat(client): stream invites (#202)
* chore: update dev container

* feat(client): add server version request

* docs(client): enhanced server version docstring

* test(client): sever version test

* test(base): type check for union type

* refactor(base): move _ attrs to `RegisteringBase`

* refactor: some light cleanup

* chore(container): add pylint line length

* feat(metrics): add "Invite Action"

* feat(client): pass server version to resources

* feat(models): pending stream collaborator model

* fix(client): do not parse if request res is null

* feat(exceptions): add unsupported exception

to distinguish for new invites as of server 2.6.4

* feat(client): add stream invite queries/mutations

* test(client): test stream invites

* feat(client): incorporate last invites changes
2022-07-26 17:58:46 +01:00
Gergő Jedlicska 52ab27e60f SQLite write batching (#188)
### SUMMARY
**sqlite transport**

This transport now batches and bulk inserts objects when writing resulting in huge performance improvements (100x).

**base object serializer**

Batching in the sqlite transport necessitated some refactoring here in order to safely call end_write when not using operations.send/receive. This has been resolved by turning traverse_base into a wrapper for _traverse_base which can take care of calling begin/end_write and resetting the writer at the top level. This is not breaking since the top level methods to call have not changed names and the original method has just been prepended with a _

Additionally, missing referenced child objects in the read transport used to raise a SpeckleException. However, using the gql client to call objects.get() will return an object with missing references by design thus throwing an error in serialization. This has been resolved by instead raising a SpeckleWarning when child objects can't be found and just returning the reference + id. ((this method of interacting with objects is discouraged so it is not surprising to me that this bug was lurking for so long - but an oopsie nonetheless!))

**ci / dev**

Updates for the ci config and the dev container to work with the recent changes in server.

NOTE: dev container seems to be pulling an older version of server -- not resolved yet

---

* quick and hacky sqlite batching

* feat(transports): batching sqlite inserts

* chore: upgrade gql3

also removed py-spy as it's not used and i was getting install errors :/

* ci: bump node version

* ci: formatting

* update CI versions

* update to new circleci redis baseimage

* update test fixture auth to non deprecated token based method

* add start and finish write method calls to base object serialize

* chore: dev container update

* fix(serialization): move end and begin write

* style: formatting

* fix(serializer): warn but don't throw if ref not found

this is _not_ an issue with the transports, but an issue with using the
graphql api to fetch objects. since you are only receiving one obj and none of
the children, the transport has no way to find them and should simply
return the reference as is. idk why anyone would really use `object.get`
so tbh i'm not surprised no one has found this bug yet lol

* fix(client): don't parse obj create response

* fix(serializer): wrap `traverse_base`

moving `begin` and `end_write` to the seriazlier due to the new
sqlite transport with batched writes necessitates a wrapper around
`traverse_base` so end/begin write can be called once at the top level.
just adding begin/end write to the original traversal method would make
tons of calls to `end_write` since the traversal is recursive

Co-authored-by: izzy lyseggen <izzy.lyseggen@gmail.com>
2022-06-20 12:00:09 +01:00
izzy lyseggen 9b387da77a feat(serialisation): enums (#175)
note that this won't re-serialise dynamic members as enums.
they will come back as ints for consistency w sharp

closes 🃏 Enum serialisation bug #174
2022-03-23 11:49:16 +00:00
izzy lyseggen a553c17c43 fix/test(serialization): null values in dicts (#168) 2022-02-24 11:31:04 +00:00
izzy lyseggen 9297a5df49 feat(metrics): disable in tests 2021-10-11 18:10:53 +01:00
izzy lyseggen f89b07eacb feat(🥣): custom base types and test fixes 2021-08-20 13:09:09 +01:00
Alan Rynne d07bab61e7 ci: Fixes with Izzy 2021-04-21 10:05:18 +02:00
Alan Rynne 3f7290ed12 ci: Reverting 2021-04-20 20:17:01 +02:00
Alan Rynne ed92678a31 ci: Random test with "http" 2021-04-20 20:08:14 +02:00
Alan Rynne 4e26ebfbe2 ci: First coin-flip on Spinning up a Docker server for each test 2021-04-20 19:47:44 +02:00
izzy lyseggen 434ada8bc1 feat: rename speckle to specklepy 2021-04-09 12:25:32 +01:00
izzy lyseggen 501f9b8648 test: update host to use latest.speckle.dev 2021-03-22 15:03:22 +00:00
izzy lyseggen 6e64770380 test(serializer): test detachment within lists 2021-03-17 17:38:05 +00:00
izzy lyseggen 5a66d912ae test: update to use new geo objects 2021-02-26 16:56:49 +00:00
izzy lyseggen 82f7ee6f0a test(objects&serialisation): new base features 2021-01-26 10:04:00 +00:00
izzy lyseggen 661c25c8fb test: smol tidy 2021-01-21 15:24:02 +00:00
izzy lyseggen 12eb88819e test: add additional test user 2021-01-21 11:05:39 +00:00
izzy lyseggen ff44f4ecb1 test: oops forgot to switch to testing.speckle.dev 2021-01-19 17:20:22 +00:00
izzy lyseggen 41e66dda0d chore: requirements & formatting 2021-01-19 12:01:05 +00:00
izzy lyseggen 062808c568 test: move fixtures to conf for sharing 2021-01-19 11:03:03 +00:00
izzy lyseggen 50c6e2c840 test(config): set up tests with local server 2021-01-19 09:30:18 +00:00