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

Prevent infinite recursion when resolving complex relationships #495

Merged
merged 3 commits into from
Apr 6, 2017

Conversation

rodjek
Copy link
Owner

@rodjek rodjek commented Apr 5, 2017

As raised in #418, when checking the relationships between resources where the relationships are a bit more complex (forward and backward edges between >2 resources), it is possible for RSpec::Puppet::ManifestMatchers::CreateGeneric#relationship_refs to get stuck in an infinite recursion loop.

This PR fixes that behaviour by adding a simple guard to the recursion to prevent relationship_refs from being called on the same resource multiple times.

Closes #418

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 4c69e5a on issue-418 into ** on master**.

@DavidS DavidS merged commit 9649bfa into master Apr 6, 2017
@DavidS DavidS deleted the issue-418 branch April 6, 2017 11:26
@rodjek rodjek added this to the 2.6.0 milestone Aug 13, 2017
@rodjek rodjek added the bugfix label Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certain relationship checks cause "SystemStackError: stack level too deep"
3 participants