Skip to content
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

Fix import behavior #461

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Fix import behavior #461

merged 2 commits into from
Jan 29, 2025

Conversation

tstirrat15
Copy link
Contributor

@tstirrat15 tstirrat15 commented Jan 29, 2025

Fixes #460

Description

This is something that broke in #455 because the interfaces didn't line up. This fixes the behavior of zed import.

Changes

  • Pass in the correct type in the import command's invocation of decodeUrl
  • Add some defensiveness to the unmarshal logic so that it doesn't panic
  • Add a test for the happy path that exercised the failure

Testing

Review. Do a go run ./cmd/zed/... import path/to/some/validationfile.yaml and see that it either succeeds or fails on the gRPC call (if you aren't running a SpiceDB instance) rather than panicking on the parsing.

Copy link
Member

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tstirrat15 tstirrat15 merged commit b37fe84 into main Jan 29, 2025
11 checks passed
@tstirrat15 tstirrat15 deleted the fix-issue-with-zed-import branch January 29, 2025 20:36
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

validation file referencing schema using schemaFile cannot be imported
2 participants