puppetlabs/puppet — pull request #1703 by zaphod42 (2013-06-11 22:56:54+00:00)
Title: (#14652) Add check for self-dependency cycles

With some changes that were made to how the graph is processed, puppet
2.7.0 lost the ability to detect dependency cycles where a resource
requires itself. Instead of erroring, the resource ended up being silently
ignored. This restores the behavior that existed in 2.6 where this was
considered a cyclic dependency.

The erroneous code had considered any single vertex, strongly connected
component to not be a cycle. This was done because by definition any
single vertex is a strongly connected component, no matter what edges are
involved. By always excluding those vertices, the case of a
self-referencing vertex was not handled. This adds a check for a single
vertex SCC that is adjacent to itself in order to find dependency cycles
of a single resource.

Paired-with: Josh Cooper