Skip to content

Unable to import relationships without a schema file #509

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

Open
heytrav opened this issue May 8, 2025 · 7 comments · May be fixed by #510
Open

Unable to import relationships without a schema file #509

heytrav opened this issue May 8, 2025 · 7 comments · May be fixed by #510

Comments

@heytrav
Copy link

heytrav commented May 8, 2025

I'm attempting to import relationships for an existing schema. I've tried defining the relationships files a few different ways but without any luck.

My relations file is structured like in the examples:

relationships: >-
  document:firstdoc#writer@user:tom

  document:firstdoc#reader@user:fred

  document:seconddoc#reader@user:tom

Because I already have a schema loaded into SpiceDB I would expect that I can import the relationships separately, however I always get an error mesages:

 zed import --schema=false  dev-resources/k8s-data/spicedb-data/relations/documents.yaml

2:01PM ERR terminated with errors error="either schema or schemaFile must be present"

@tstirrat15
Copy link
Contributor

That's unintentional; i'll have a look.

@tstirrat15
Copy link
Contributor

As a workaround in the meantime, you should be able to add an empty schema key

@heytrav
Copy link
Author

heytrav commented May 8, 2025

I have tried that. When I do though it deletes the schema.

@tstirrat15
Copy link
Contributor

Even with schema=false? That's even more surprising. I'm getting a test together.

@heytrav
Copy link
Author

heytrav commented May 8, 2025

Yes even with schema=false. It doesn't give me the error, but afterwards the schema that was loaded is gone.

@heytrav
Copy link
Author

heytrav commented May 8, 2025

If it helps, I do see this error in my logs a lot

the version of SpiceDB being called is out of date. See: [https://github.com/authzed/spicedb/releases/tag/v1.43.0](https://github.com/authzed/spicedb/releases/tag/v1.43.0%22%7D)

I am installing it in my cluster like this:

kubectl apply -o yaml --server-side -f https://github.com/authzed/spicedb-operator/releases/latest/download/bundle.yaml

@tstirrat15 tstirrat15 linked a pull request May 8, 2025 that will close this issue
@tstirrat15
Copy link
Contributor

Yeah, I'm expecting that this is a bug in zed, not in SpiceDB - it's about the calls that zed is making to SpiceDB (or not). Zed will yell if it knows about a newer version of SpiceDB than the one you're on, and the installation method you're using defaults to the stable channel, which is usually a version or two behind the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants