-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Problem Statement
WriteSchema
does validation before writing the schema, and it returns an error if the validation fails. Not only does it check if the schema is well-formed, but it also checks the database itself. For example, if the database has existing data for a relation the new schema removes, this is an error in SpiceDB.
I would like to do this validation without actually writing the new schema. This is useful for both manual deployments and automated pipelines. MR pipelines, for example, could test the validity of a modified schema on a real deployment without yet publishing the new schema. If the test fails, additional migrations are needed before this modified schema is ready.
Solution Brainstorm
Allow WriteSchema
to have a dry-run mode, or expose the validation as a separate call. This does everything WriteSchema
normally does, without actually changing the schema in the end.