| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there were enough problems fixing it that I decided something
more drastic needed to be done.
This uses the new Puppet::ResourceReference class to canonize
what a resource reference looks like and how to retrieve resources
via their references. Specifically, it guarantees that resource types
are always capitalized, even when they include '::' in them.
While many files are modified in this commit, the majority of changes are
quite small, and most of the changes are fixing the tests to use
capitalized types.
As we look at consolidating some of our resource types, we could consolidate
the ResourceReference stuff at the same time, but at least the
Puppet::Parser::ResourceReference class subclasses the main Puppet::ResourceReference
class.
|
|
|
|
|
|
| |
AST code now correctly finds the resource. It's getting
lost in the configuration translation, though, so I
need to fix that, too.
|
|
|
|
|
|
|
|
|
|
| |
20071030034736-6856b-6004090b3968cdbf7d366a03ee1c44e2160a3fe0.patch
from womble, and rewriting and significantly enhancing the
unit tests for the Puppet::Parser::Collector class; it should
have full coverage now. There are no integration tests for
it, so there's still no guarantee that it works at all, but hey,
we're a lot better off than we were.
|
| |
|
|
|
|
|
|
| |
the behaviour of Resource#override_parameter unintentionally.
I've corrected the comments so it's clear why the original behaviour
was there.
|
|
|
|
|
|
|
|
| |
resources. These are commits:
c19835ce9f8a5138b30a1a32ca741c996b0916d2
9290cc89a2206fb5204578f8e91208857a48b147
ffb4c2dbc7314b364d25e4f7be599ef05b767b44
|
|
|
|
|
|
| |
At this point, I'm holding the experiment until after the release,
so I'm committing this for now and will take it back up after 0.24.0
is out.
|
|
|
|
|
|
|
|
| |
that belong with the AST classes rather than in the parser.
Yeah, these tests need to be rewritten.
Committed on an airplane. :)
|
|
|
|
|
|
|
|
|
| |
from the server. The real problem was getting all of the validation
done before any caching, which required a good bit more refactoring
than I expected.
In actuality, this commit is relatively small even though it covers
many files; most of the changes just make the code clearer or shorter.
|
|
|
|
|
|
|
|
|
|
|
|
| |
switching the node scope to no longer be lazy evaluation,
just like I switched 'main'. When I made all of these
classes and nodes lazy evaluated, I should have decoupled
my real goal (using resources to evaluate them) from the idea
of lazy-evaluating them, and this basically does that.
I also changed the scope heirarchy slightly so that scopes will
tend to be below the node scope, altho this was already generally
the case.
|
|
|
|
|
| |
It was getting evaluated after node classes, which caused
even stranger ordering issues.
|
|
|
|
|
| |
when using :include, not (for example) when evaluating
node classes.
|
|
|
|
|
|
|
|
|
|
| |
'include' function is used, instead of being lazy-evaluated.
Previous work caused resources to get created to model
these classes, but in the process, I removed the fact
that the classes were evaluated immediately. This meant
that you couldn't guarantee that a class was evaluated
before you went to use its variables.
|
|
|
|
|
|
| |
test/ dir or from their own working dir, like the specs do.
This was just a question of changing how their libraries
are loaded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
instead of a manifest, and removing all of the ambiguity
around whether an interpreter gets its own file specified
or uses the central setting.
Most of the changes are around fixing existing tests to use this new system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to work. As a result, it involves a lot of integration-level
testing, and a lot of small design changes to make the code
actually work.
In particular, indirections can now have default termini,
so that configurations and facts default to their code terminus
Also, I've removed the ability to manually control whether
ast nodes are used. I might need to add it back in later,
but if so it will be in the form of a global setting,
rather than the previous system of passing it through 10 different
classes. Instead, the parser detects whether there are AST nodes
defined and requires them if so or ignores them if not.
About 75 tests are still failing in the main set of tests,
but it's going to be a long slog to get them working --
there are significant design issues around them, as most of
the failures are a result of tests trying to emulate both the
client and server sides of a connection, which normally would
have different fact termini but in this case must have the same
terminus just because they're in the same process and are global.
The next step, then, is to figure that process out, thus finding a way
to make this all work.
|
| |
|
|\ |
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
lib/puppet/defaults.rb
lib/puppet/indirector/facts/yaml.rb
spec/unit/indirector/indirection.rb
spec/unit/indirector/indirector.rb
|
| |/
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
and are used instead of the network handlers, which have been removed. There are some failing tests as a result, but I want to get this code committed before I massage the rest of the system to make it work again.
|
| |
| |
| |
| | |
lexer. Updated CLASSREF token regex in the lexer.
|
|/ |
|
|
|
|
| |
problem was that the autoload tests were somehow clearing all loaded classes, including the providers. This is fixed now.
|
|
|
|
| |
tests pass again, dammit.
|
|
|
|
| |
parent classes can use tagged() to test if a node is a member of a subclass.
|
| |
|
|
|
|
| |
type, just like resource references do, which causes the resource and reference to again agree on the full name of a given defined type.
|
|
|
|
| |
instead of pre-extracting the configuration.
|
|
|
|
| |
again. This is the majority of the work necessary to make the separate "configuration" object work.
|
|
|
|
| |
that has a resource graph including resources for the container objects like classes and nodes. It is apparently functional, but I have not gone through all of the other tests to fix them yet. That is next.
|
|
|
|
| |
mostly just pointing directly to the compile, and I have begun (but commented out) the move to having resources to model each of the classes and nodes, in addition to the definitions. This will, again, enable a real Configuration object, and it will enable class versioning and similar features.
|
|
|
|
| |
The work is done in either AST::ResourceDef#evaluate or Compile#store_resource.
|
|
|
|
| |
resources to evaluate classes and nodes, not just definitions. This will hopefully simplify some of the parsing work, and it will enable the use of a Configuration object that more completely models a configuration.
|
|
|
|
| |
switch to git, and refactoring the evaluate_classes method on the compile object so I can use resources as intermediaries, thus making classes do late-binding evaluation.
|
|
|
|
| |
piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
|
|
|
|
| |
transitional object and I want the real "configuration" object to be the thing that I pass from the server to the client; it will be a subclass of GRATR::Digraph.
|
|
|
|
| |
environments, including the parser having an environment setting. I have also created my first spec-based tests, for the interpreter (and deleted the old test/unit tests).
|
|
|
|
| |
interpreter was not passing on that the config should use ast nodes
|
|
|
|
| |
There are still failing tests, but apparently only those that are also failing in trunk.
|
|
|
|
| |
but I want to commit this before delving into them. My method for fixing the tests was to do as little as possible, keeping the tests as bad or as good as they were before I started. Mostly this was about changing references to the interpreter into references to the parser (since that is where the new* methods are now for ast containers) and then dealing with the new config object and its relationship to scopes.
|
|
|
|
| |
unfortunately had to stop being so assiduous in my rewriting of tests, but I am in too much of a time crunch to do this "right". The basic structure is definitely in place, though, and from here it is a question of making the rest of the tests work and hopefully writing some sufficient new tests, rather than making the code itself work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
but the rest of the compiling process is hosed
(although the parser itself should still be fine).
The configuration object is unifying a lot of work
that was scattered around either the interpreter or
the scopes, and it simplifies the whole system.
However, its new simplicity has made the complexity
of the rest of the system that much more apparent,
and I am resolved to fixing the system rather than
hacking it sufficiently to just make it work.
|
|
|
|
|
| |
and knows how to retrieve data from those sources. Now I just need to fix
the language stuff to use this handler instead of the existing node stuff.
|
|
|
|
|
|
|
|
| |
This has required splitting the interpreter up considerably, which is much
cleaner but is a large project. There is now a 'nodes' handler, but it is
currently non-functional, although all the support structure is there. It just
needs to have the individual methods fleshed out, and it needs to be connected
to the 'facts' handler.
|
|
|
|
| |
command-line arguments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored how the parser and interpreter relate,
so parsing is now effectively an atomic process (thus
fixing #314 and #729). This makes the interpreter less
prone to error and less prone to show the error to the
clients. Note that this means that if a configuration
fails to parse, then the previous, parseable configuration
will be used instead, so the client will not know that
the configuration failed to parse.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2742 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
| |
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2730 980ebf18-57e1-0310-9a29-db15c13687c0
|
|
|
|
|
|
| |
resource references.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2715 980ebf18-57e1-0310-9a29-db15c13687c0
|