I couldn't find a clean way of having them work via tags, and I think this model actually works better because it exposes that ordering directly in the graph, which I think is far easier to support in the long term. E.g., finding a cycle would be very hard if we were using tags, but is straightforward the way we're doing it now.
On Nov 30, 2010, at 12:25 PM, Hunter Haugen wrote: > Random idea. If stages themselves worked via tags instead of adding > something to the graph (and creating many-to-many dependencies), would > that be more functional? > > If you could use the tag() function to apply a tag to the class as > normal, then define if that tag comes before or after the 'main' tag > or any other arbitrary tag, then we could have cross-stage > dependencies (currently broken with stages) and use a syntax that's > already built in. Perhaps this would also circumvent the performance > problems associated with large stages. > > This would also solve --tags main > > -Hunter > > > > On Thu, Nov 25, 2010 at 08:12, Nigel Kersten <[email protected]> wrote: >> I'm not entirely convinced this is the best way to achieve this, so >> consider this a discussion starting point. >> >> --tags main should probably just be the main Stage, do we want to make >> people explicitly list their stages, or do we want an "--alltags" >> option of some kind? >> >> On Nov 25, 8:04 am, Nigel Kersten <[email protected]> wrote: >>> From: Nigel Kersten <[email protected]> >>> >>> Sent on behalf of Tim Nicholas. >>> Make --tags main apply all resources. >>> >>> Signed-off-by: Nigel Kersten <[email protected]> >>> --- >>> lib/puppet/util/tagging.rb | 2 ++ >>> 1 files changed, 2 insertions(+), 0 deletions(-) >>> >>> diff --git a/lib/puppet/util/tagging.rb b/lib/puppet/util/tagging.rb >>> index 6323ee0..a4556d6 100644 >>> --- a/lib/puppet/util/tagging.rb >>> +++ b/lib/puppet/util/tagging.rb >>> @@ -21,6 +21,8 @@ module Puppet::Util::Tagging >>> >>> # Are we tagged with the provided tag? >>> def tagged?(*tags) >>> + # If one of the tags passed is a 'main' then it will always match >>> + if tags.include?("main") then return true end >>> not ( self.tags & tags.flatten.collect { |t| t.to_s } ).empty? >>> end >>> >>> -- >>> 1.7.2.3 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Developers" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/puppet-dev?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me. -- Hunter S. Thompson --------------------------------------------------------------------- Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
