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

Disallow inserting nodes that contain no properties #407

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

mpoffald
Copy link
Contributor

@mpoffald mpoffald commented Mar 2, 2023

Closes #402

Updates staging pipeline to throw an error when it sees a node that is either empty, or contains only an @id, eg:

"Invalid transaction, transaction node contains no properties for @id: http://example.org/ns/alice."

I tried to inspect the nodes for validity as early as was feasible without introducing an extra traversal over them, which afaict was in stage-flakes, so the error message will show the expanded id.

If it's important that the error show the compacted id (per the example in this comment on the original issue), I can try to revise the approach.

- illustrate rejecting otherwise valid txn that contains an empty node
@mpoffald mpoffald requested a review from a team March 2, 2023 20:52
Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

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

✉️

@mpoffald mpoffald merged commit 8775f13 into main Mar 3, 2023
@mpoffald mpoffald deleted the fix/disallow-insufficient-txns branch March 3, 2023 17:13
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.

A single transaction item with just an @id is accepted but causes fatal invalid-commit errors
2 participants