summaryrefslogtreecommitdiffstats
path: root/lib/puppet/pgraph.rb
Commit message (Collapse)AuthorAgeFilesLines
* Moving the resource container behaviour to the Configuration object, rather ↵Luke Kanies2007-09-121-26/+0
| | | | than the base PGraph class. I expect I will just do away with PGraph, but for now, I am at least going to keep configuration-related code in that class.
* Adding a to_graph method to TransBuckets, so that the buckets can directly ↵Luke Kanies2007-09-121-2/+26
| | | | generate a graph, rather than having to first convert to RAL types and then have them convert to a graph. This allows us to make it so components do not need a @children array at all. This was all done because I am having the "already a parent of" problem again, and I have gotten far enough that it is relatively easy to just make this problem go away once and for all.
* Fixing #507 (behaviour in cycles) by changing the topsort algorithm.luke2007-05-171-20/+25
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2521 980ebf18-57e1-0310-9a29-db15c13687c0
* A slight fix for #507. This should at least provide better information if ↵luke2007-03-191-3/+9
| | | | | | this problem crops up, although I cannot reproduce it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2308 980ebf18-57e1-0310-9a29-db15c13687c0
* Removing the cycle checks from the splice! method in pgraph, which ↵luke2007-03-181-5/+0
| | | | | | *considerably* speeds up splicing of very large graphs. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2293 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing a problem with the splice! method on the graphing. The problem was ↵luke2007-02-281-2/+12
| | | | | | another issue with hash ordering, where it would usually work but sometimes start failing. The solution was to splice the containers in topological-sort order. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2240 980ebf18-57e1-0310-9a29-db15c13687c0
* Redoing some aspects of the graphing in hopes of helping hte performance a bit.luke2007-02-271-10/+9
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2230 980ebf18-57e1-0310-9a29-db15c13687c0
* Moving code from external sources into an external/ directoryluke2007-01-301-3/+3
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2119 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #433. I basically just added checks to all the places where I add ↵luke2007-01-301-1/+1
| | | | | | edges, to make sure automatic relationships lose out to explicit ones. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2117 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #437. Transactions now check whether graphs are cyclic, with a ↵luke2007-01-231-0/+15
| | | | | | somewhat-useful error message if they are. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2079 980ebf18-57e1-0310-9a29-db15c13687c0
* Finally writing unit tests for Transaction#trigger, and drastically ↵luke2006-12-291-7/+1
| | | | | | simplifying the method in the process. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1985 980ebf18-57e1-0310-9a29-db15c13687c0
* *whew* Okay, simplified the splice method a bit, and I am actually somewhat ↵luke2006-12-291-42/+22
| | | | | | confident that the stronger testing is correct. I have had a lot of problems with tests usually passing but sometimes failing, mostly because of ordering problems related to multiple edges. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1984 980ebf18-57e1-0310-9a29-db15c13687c0
* Did a short-cut on the graphing, since we currently only support one type of ↵luke2006-12-291-3/+28
| | | | | | subscription. This solution still will not scale to all that many edges, but it works, although it will fail if we need to support different types of subcriptions. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1983 980ebf18-57e1-0310-9a29-db15c13687c0
* Some tweaks to graph splicing, although I do not think it will be enough to ↵luke2006-12-291-19/+37
| | | | | | handle some of the edge cases. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1981 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing #387, hopefully.luke2006-12-281-27/+26
| | | | git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1978 980ebf18-57e1-0310-9a29-db15c13687c0
* Not downcasing facts any longer, closing #210 (although not using the patch ↵luke2006-12-231-6/+7
| | | | | | from mpalmer, since I had not noticed the patch was there). Also, making all nodes, classes, and definitions case insensitive, closing #344. Finally, I added case insensitivity to the language in general, which should preserve backwards compatibility and probably makes the most sense in the long run anyway. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1964 980ebf18-57e1-0310-9a29-db15c13687c0
* *whew* Fixing the vast majority of the graph-related performance problems. ↵luke2006-12-211-8/+6
| | | | | | I found a simple solution to handling events produced by generated resources, and that basically fixed all of the performance problems. Transaction tests still fail, but I wanted to get the fix in now so I do not forget it. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1961 980ebf18-57e1-0310-9a29-db15c13687c0
* Some more graph optimizations; I think I am now close enough that I am ↵luke2006-12-171-8/+9
| | | | | | basically just going to spend a bit more time making sure the modeling is right in the transactions, and then walk away for now. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1947 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a simpler and *much* faster tree_from_vertex method, and using it ↵luke2006-12-171-3/+43
| | | | | | instead of the default one git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1946 980ebf18-57e1-0310-9a29-db15c13687c0
* Fixing the next round of bugs, mostly little things but I had to modify ↵luke2006-12-131-2/+7
| | | | | | transactions so they are willing to delete implicit resources even if they have dependencies, else we would often not be able to purge files at all. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1917 980ebf18-57e1-0310-9a29-db15c13687c0
* Adding a metatype to manage resources of a specified type. For now, this ↵luke2006-12-121-2/+2
| | | | | | metatype just supports purging unmanaged resources. Also, fixed a few tests here and there git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1912 980ebf18-57e1-0310-9a29-db15c13687c0
* Almost all tests now pass. I have basically reached the point where I was ↵luke2006-12-111-0/+7
| | | | | | before I integrated graphing, except that all of the relationship handling is now inside the transaction, and any kind of recursion (including file) is *tons* easier to model and manage. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1905 980ebf18-57e1-0310-9a29-db15c13687c0
* Most tests now pass in the whole system, but there are still about 8 cases ↵luke2006-12-111-1/+4
| | | | | | that do not work. I am working on those now. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1904 980ebf18-57e1-0310-9a29-db15c13687c0
* Another intermediate commit. Most of the graphing work itself is now done, ↵luke2006-12-091-0/+3
| | | | | | but I am in the middle of converting files to use the graphs and at the same time am writing some actually decent tests for the file recursion stuff. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1899 980ebf18-57e1-0310-9a29-db15c13687c0
* Most of the graphing work is now done. I have also added the generator work ↵luke2006-12-011-93/+32
| | | | | | in transactions, but I need to migrate files to using it. Until that migration is done, files will not work correctly for many cases. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1896 980ebf18-57e1-0310-9a29-db15c13687c0
* Intermediate commit -- I am ready to start pushing the graph stuff into the ↵luke2006-11-261-0/+170
types and transactions, which will break everything for a little while. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1894 980ebf18-57e1-0310-9a29-db15c13687c0