zed/internal/cmd/import.go at main 路 aut...
# spicedb
e
Hey, on service startup we import the schema into spicedb, this has been working great for a long time, but all of a sudden today we get error like `failed to write schema: rpc error: code = InvalidArgument desc = cannot delete object definition
group
, as a relationship exists under it`. The code is basically doing the same as
zed import
(https://github.com/authzed/zed/blob/main/internal/cmd/import.go#L109C6-L109C18).We sporadically saw this error in the logs, but today it just happens on every start of the service. The error is always
cannot delete object definition
with with a seemingly random type. We're a bit behind with updates (1.33.1). Any idea why the system believe we want to update an object definiton? The schema has all the definitons as before, so far we only ever added things
y
what backing datastore are you using? what's its topology?
e
oh noes, we just found it. We use [go:embedfs ](https://pkg.go.dev/embed) for the schema and due to some refactor the path changed and the file that was actully embedded was empty
Took only a day to figure, sorry for the false alarm.
y
ahhh sneaky
good find
e
big thanks for adding the check that there are relations. Otherwise the db of my test system would have been emptied 馃檪
y
for sure! operational safety is one of our big design considerations
8 Views