Repository navigation
fix(describe): order the data model the same on every store - #58
Merged
Merged
Conversation
The data model tab listed a class's attributes and its incoming associations in the order the shapes graph returned them, which differs between stores. The enterprise row-rules test compares the page of a store with row rules to one holding only the visible rows, and failed. Attributes now follow sh:order, then path; associations sort by class and property.
Contributor
Author
|
Reviewing. Generated by Claude Code |
Contributor
Author
|
Merged as 6a2fb7f. Thank you for running the enterprise test and fixing forward. What the sort still leaves to the store's order, for a follow-up if it bites:
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Follow-up to #32. The data model tab listed a class's attributes and incoming associations in the order the shapes graph returned them, and that order differs between stores. The enterprise test
describe_pages_and_explain_keep_to_row_rulescompares the describe page of a store that has row rules with the page of a store that holds only the visible rows. It failed (auth.rs:1893) because the attribute order differed (lead, area, label against lead, label, area).Attributes now follow
sh:order, then path IRI. Associations are sorted by class and property. They are read up to 1,000 and cut to the 24 shown only after sorting, so the cut is stable too.How it was tested
cargo test -p tripletrail-server --features enterprise --test auth describe_pages_and_explain_keep_to_row_rulesfailed before the change. After it, the test passes on 3 runs.cargo test -p tripletrail-server --test describe_pages --test linked_datapasses, and clippy with-D warningsis clean.Documentation