-
Notifications
You must be signed in to change notification settings - Fork 258
Add subscription cycle detection to the snapshot validator #8083
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
Conversation
Dependency Review✅ No vulnerabilities or OpenSSF Scorecard issues found.Scanned FilesNone |
nickgerace
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!
| let prototype_id = AttributePrototypeArgument::prototype_id(ctx, apa_id).await?; | ||
| for av_id in AttributePrototype::attribute_value_ids(ctx, prototype_id).await? { | ||
| let subscriber_component_id = AttributeValue::component_id(ctx, av_id).await?; | ||
| // Don't add self-subscriptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| ) | ||
| .await?; | ||
|
|
||
| assert_eq!(false, SubscriptionGraph::new(ctx).await?.is_cyclic()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert_eq!(false, SubscriptionGraph::new(ctx).await?.is_cyclic()); | |
| assert!(!SubscriptionGraph::new(ctx).await?.is_cyclic()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two ! right next to each other don't make me happy :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No biggie!
Accidentally hit "approve" instead of "comment"!
38c031e to
29d389e
Compare
|
There's a weird error here with attribute prototype arguments not having prototypes which gets hit when constructing the graph. Investigating |
378d8be to
0716a89
Compare
0716a89 to
bc2d21d
Compare
|
/try |
|
Okay, starting a try! I'll update this comment once it's running... |
bc2d21d to
5f53fb9
Compare
5f53fb9 to
cd0bf0c
Compare
95cee0b to
87a31a3
Compare
251c892 to
5dc09eb
Compare
|
/try |
|
Okay, starting a try! I'll update this comment once it's running... |
Construct a DependencyGraph of all components via their ValueSubscription edges and use that to detect subscription cycles when a subscription is set.
Automatic detection is disabled. But when it is re-enabled, it will produce an error like this in the frontend