-
Notifications
You must be signed in to change notification settings - Fork 97
(#13429) refactor puppetral agent for telly compatibility #38
base: master
Are you sure you want to change the base?
(#13429) refactor puppetral agent for telly compatibility #38
Conversation
This commit includes: * Small change to puppetral agent to ensure puppet settings are initialized properly prior to use; this is necessary for compatibility with Telly * Add "puppet_spec_helper" (from puppetlabs_spec_helper project) to local spec_helper
Oh, almost forgot to mention... this relies on changes in this puppet pull request: |
Thanks, Yeah, I dont know this is interesting but the ral agent only being used by PE means someone else probably need to decide what the right thing is here. I am not sure who 'owns' live management so to speak. As an aside I tend to avoid showing users the initialize/super thing, we have a few hooks in the agent life cycle in this case you'd do the setup in a method called pre_startup_hook Why are you including the puppet_spec_helper? If possible I'd def want to avoid that. We were talking about possibly using faces for this kind of thing, did you happen to look into that approach? |
I meant to update the ticket w/rt faces, forgot to do so. Will do it now. http://projects.puppetlabs.com/issues/13429 As for the initialize / super thing: excellent. I briefly scouted for a method like that and didn't find one so I just fell back to what I know. That sounds like an easy change. w/rt puppet_spec_helper: there was much discussion on this topic recently: http://projects.puppetlabs.com/issues/13595 We were having a lot of problems with test compatibility between various versions of external tools (which have a dependency on puppet) and various versions of puppet. It was decided that rather than wiring in version compatibility hacks into each external project, we should just maintain one single "bridge" project (puppetlabs_spec_helper) which is responsible for puppet's state setup/teardown during test runs. The version compatibility hacks are isolated in that project so that external projects (for the most part) can just "require" it and everything will work. I welcome input and ideas on that, but it has a good deal of momentum at this point. |
Thanks for the explanation, i think the spec_helper thing is fine just wanted to know why - we depend on puppet anyway so its not like the tests are getting any heavier or anything, was just curious |
It is unfortunately adding a little weight--you need to have a clone of the puppetlabs_spec_helper project (master) and have it in your RUBYLIB in order to be able to run the tests. Hopefully that's not too big of a deal though. |
I think one of two things needs to happen.
Thoughts? |
@haus there's some other discussion elsewhere - this agent is only used by PE so I think we can just remove it from the public repo and this should make targeting at versions much easier, we can just ship more or less the version proposed here when PE goes to puppet 3.0 and leave as is till then. I think that'll just make it all easier to handle than trying to make this complex agent also still be backwards compat somehow |
I am fine with RI's suggestion of the agent being removed from the public repo if that makes things easier.. |
@ripienaar Good point. |
The related pull request at puppetlabs/puppet#710 has been merged for Telly. |
CLA Signed by cprice-puppet on 2012-02-14 21:00:00 -0800 |
Waiting for CLA signature by @cprice404 @cprice404 - We require a Contributor License Agreement (CLA) for people who contribute to Puppet, but we have an easy click-through license with instructions, which is available at https://cla.puppetlabs.com/ Note: if your contribution is trivial and you think it may be exempt from the CLA, please post a short reply to this comment with details. http://docs.puppetlabs.com/community/trivial_patch_exemption.html |
CLA signed by all contributors. |
R.I. (and anyone else interested): I'm not sure if you'll want to actually merge this or not, but it demonstrates how to make the puppetral agent code and specs compatible with Telly. It will break backwards compatibility with previous versions of puppet so that will obviously play a role in the decision of whether to merge as-is and establish a version-compatibility matrix, or whether to modify this commit with some backwards-compatibility hacks, or...
This commit includes:
initialized properly prior to use; this is necessary for
compatibility with Telly
to local spec_helper