summaryrefslogtreecommitdiffstats
path: root/lib/puppet/pgraph.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removing the PGraph class and subsuming it into SimpleGraph.Luke Kanies2008-11-061-121/+0
| | | | | | | This class is a holdover from when I was using GRATR, and it's obsolete now. Signed-off-by: Luke Kanies <luke@madstop.com>
* Refactoring the Transaction::Event class.Luke Kanies2008-07-041-1/+1
| | | | | | | | | | | The class had a 'transaction' accessor that was assigned but never used, and it is simple enough that it needed direct arguments rather than named arguments. The rest of the code is changing the other classes that use Events. Signed-off-by: Luke Kanies <luke@madstop.com>
* Removing the last vestiges of GRATR from the PGraph classLuke Kanies2008-02-131-29/+0
|
* Removing the last remaining vestiges of GRATR --Luke Kanies2008-02-111-11/+3
| | | | removing the bangs from 'add_vertex!' and 'add_edge!'.
* Fixing #982 -- I have completely removed the GRATR graph libraryLuke Kanies2008-01-071-58/+6
| | | | from the system, and implemented my own topsort method.
* Switching the graph base class from GRATR::DigraphLuke Kanies2007-11-071-9/+4
| | | | | | to Puppet::SimpleGraph, which should dramatically enhance performance. It should be largely functionally equivalent, with the only difference being that edges are no longer deduplicated.
* All tests should now pass again.Luke Kanies2007-10-081-0/+4
| | | | | | | | | | | | | | This is the first real pass towards using caching. The `puppet` executable actually uses the indirection work, instead of handlers and such (and man! is it cleaner). Most of this work was a result of trying to get the client-side story working, with correct yaml caching of configurations, which means this commit also covers converting configurations to yaml, which was a much bigger PITA than it needed to be. I still need to write integration tests, and I also need to cover the server-side story of a normal configuration retrieval.
* All tests now pass in this configuration branch, which meansLuke Kanies2007-09-221-1/+1
| | | | | | | | it's time to merge it back into the indirection branch. Considering that this work was what drove me to create the indirection branch in the first place, i should now be able to merge both back in the master branch.
* An intermediate commit so I can start working on a differentLuke Kanies2007-09-201-1/+1
| | | | | | | | branch. The file recursion code actually works for the first time in a painful while, but there are still some quirks and design issues to resolve, particularly around creating implicit resources that then fail (i.e., the behaviour of the create_implicit_resource method in Configuration).
* 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