Skip to content

Conversation

@apetenchea
Copy link
Member

@apetenchea apetenchea commented Feb 11, 2026

This fixes issue #386


Note

Medium Risk
Introduces a small breaking behavior change for callers who previously used schema={} to clear/disable validation; otherwise changes are localized and low complexity.

Overview
Prevents invalid schema validation configs by raising ValueError when schema is not a non-empty dict in db.create_collection(..., schema=...) and collection.configure(schema=...).

Updates docs to state empty schemas are not allowed, adjusts collection tests to expect the new exception, makes backup formatting tolerant of missing Status, adds a short wait after backup restore in tests, and bumps the library version to 8.3.0.

Written by Cursor Bugbot for commit f2984aa. This will update automatically on new commits. Configure here.

@apetenchea apetenchea self-assigned this Feb 11, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

data["waitForSync"] = sync
if schema is not None:
if not isinstance(schema, dict) or len(schema) == 0:
raise ValueError("schema parameter must be a non-empty dict")
Copy link

Choose a reason for hiding this comment

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

Schema removal from collections no longer possible

Medium Severity

The validation rejecting empty dicts removes the previously documented way to clear schema validation from a collection (configure(schema={})). Since schema=None means "don't change," and schema={} now raises ValueError, there's no way for users to remove an existing schema. This is a functional regression with no alternative provided.

Additional Locations (1)

Fix in Cursor Fix in Web

@apetenchea apetenchea merged commit 2655257 into main Feb 11, 2026
12 checks passed
@apetenchea apetenchea deleted the schema branch February 11, 2026 02:24
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.

1 participant