EDIT: I just figured it out! I accidentally used t...
# spicedb
m
EDIT: I just figured it out! I accidentally used the wrong names for the zed envs, it should be just
ZED_TOKEN=...
etc. Definitely a confusing error message to get in this case though. Hello! I'm working on setting up SpiceDB, and I'm having an issue writing my schema to a running spicedb instance. When I run
zed import schema.zed
, I get the following error:
Copy code
error="rpc error: code = InvalidArgument desc = error parsing schema: parse error in `schema`, line 1, column 1: found reference `user` without prefix"
Interestingly this happens no matter what I put in my schema, even if I just have a single definition with no relations or permissions:
Copy code
definition user {}
I'm running spicedb and zed using docker compose files, specifically the import service is running based on this config:
Copy code
services:
  spicedb-prepare:
    image: authzed/zed:v0.27.0-debug
    container_name: spicedb-prepare
    working_dir: /opt/spicedb
    command: import schema.zed
    environment:
      - SPICEDB_ZED_TOKEN=${SPICEDB_GRPC_PRESHARED_KEY}
      - SPICEDB_ZED_ENDPOINT=spicedb:${SPICEDB_PORT}
      - SPICEDB_ZED_INSECURE=true
    volumes:
      - ./config/spicedb:/opt/spicedb/
    depends_on:
      spicedb:
        condition: service_healthy

...
Any help would be greatly appreciated. I am modifying a proof of concept I wrote at least a year ago, and I never had this issue with the same schema files.