Skip to content

fix: stop inferring schema prefix from the remote schema - #710

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-603-schema-write-prefix-noop
Open

fix: stop inferring schema prefix from the remote schema#710
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-603-schema-write-prefix-noop

Conversation

@ivanauth

Copy link
Copy Markdown
Contributor

Fixes #603

zed schema write read the existing remote schema and silently re-applied any definition prefix it found, so writing an unprefixed schema over a prefixed one was a no-op reported as success. The schema is now written as given, and zed import loses the same inference.

--schema-definition-prefix still applies an explicit prefix, and schema copy still derives its prefix from the source schema.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cmd/import.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

zed schema write and zed import previously read the existing schema
from the server and silently rewrote the schema being written with any
definition prefix found there. Writing an unprefixed schema over a
prefixed one therefore became a silent no-op. This inference existed to
accommodate the prefix requirement of AuthZed Serverless, which no
longer applies.

The schema is now written as given; the explicit
--schema-definition-prefix flag still applies a prefix when requested,
and schema copy still derives its prefix from the source schema text.

Signed-off-by: ivanauth <ivan@authzed.com>
@ivanauth
ivanauth force-pushed the fix/issue-603-schema-write-prefix-noop branch from 10126a9 to b8b4ac6 Compare July 27, 2026 18:58
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 this pull request may close these issues.

Writing schema with prefixes and then writing same schema without prefixes results in no-op

2 participants