-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
fix: adding functionality to handle cycles in expand and check engine #623
Conversation
the cycle checking functionality will stop traversing along that particular path if a cycle is detected
removed unnecessary function
fixing validation errors
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.
Nice, this looks solid. I have some ideas how you can further improve it.
moving graph_utils.go and graph_utils_test.go to internal/x/graph and more changes suggested in the review
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.
Nice, thank you very much 🎉
Children: []*expand.Tree{ | ||
{ | ||
Type: expand.Leaf, | ||
Subject: sendlingerTorSS, |
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.
I don't know if that was on purpose, but I like that we have can see the circle still in the tree. It makes it possible for the client to see circular references as well.
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.
yes, it was on purpose, or it will be confusing for the client and might be flagged as an unexpected behaviour.
Awesome, thanks for the quick review and support, looking for forward to contribute more |
the cycle checking functionality will stop traversing along that particular path if a cycle is detected
Related issue #411 @zepatrik
Proposed changes
Currently there is no mechanism to break a traversal, when a cycle occurs. This leads to indefinite resolution.
We don't have to implement any additional traversal algorithm, we can check for cycles during the existing traversals in the check and expand engines. If a cycle is found the traversal along that particular path will be stopped.
Checklist
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
[email protected]) from the maintainers to push
the changes.
works.