Skip to content

fix: import with schema=false#510

Merged
tstirrat15 merged 1 commit intomainfrom
fix-import-with-schema-false
Apr 7, 2026
Merged

fix: import with schema=false#510
tstirrat15 merged 1 commit intomainfrom
fix-import-with-schema-false

Conversation

@tstirrat15
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 commented May 8, 2025

Fixes #509

Description

There's a couple of misbehaviors around zed import that we want to fix:

  • The command fails if the validation file doesn't have a schema even if schema=false is passed
  • The command overwrites the schema if a schema is provided and schema=false is passed

Neither of these is desirable. This PR adds tests for those.

Changes

Added a flag mustDefineSchema inside the decoder that the import command sets to false.

Testing

Included as unit tests.

@miparnisari miparnisari force-pushed the fix-import-with-schema-false branch from 47940be to cca8aaf Compare April 2, 2026 18:06
@miparnisari miparnisari changed the title Fix import with schema=false fix: import with schema=false Apr 2, 2026
@miparnisari miparnisari force-pushed the fix-import-with-schema-false branch 3 times, most recently from 7a5ac6c to 4df7cb9 Compare April 2, 2026 18:22
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.03%. Comparing base (80de266) to head (aa73a5d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #510   +/-   ##
=======================================
  Coverage   43.03%   43.03%           
=======================================
  Files          38       38           
  Lines        6098     6098           
=======================================
  Hits         2624     2624           
  Misses       3208     3208           
  Partials      266      266           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@miparnisari miparnisari marked this pull request as ready for review April 2, 2026 19:41
@miparnisari miparnisari marked this pull request as draft April 2, 2026 19:47
@miparnisari miparnisari force-pushed the fix-import-with-schema-false branch 3 times, most recently from fdd7b17 to fa8f103 Compare April 2, 2026 19:59
@tstirrat15 tstirrat15 marked this pull request as ready for review April 7, 2026 16:13
@tstirrat15 tstirrat15 force-pushed the fix-import-with-schema-false branch from fa8f103 to aa73a5d Compare April 7, 2026 16:13
Copy link
Copy Markdown
Contributor Author

@tstirrat15 tstirrat15 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 enabled auto-merge (squash) April 7, 2026 16:24
@tstirrat15 tstirrat15 merged commit ea23a30 into main Apr 7, 2026
13 checks passed
@tstirrat15 tstirrat15 deleted the fix-import-with-schema-false branch April 7, 2026 16:33
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 7, 2026
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.

Unable to import relationships without a schema file

3 participants