Skip to content

Support a WriteSchema dry-run #2418

@mateenkasim

Description

@mateenkasim

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions