Bug #1550
should be able to specify multiple template directories
| Status: | Closed | Start date: | 09/03/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | newfeature | |||
| Target version: | 0.24.6 | |||
| Affected Puppet version: | 0.24.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
In much the same way as one can specify multiple module directories, it would be very useful to specify multiple paths to search for templates.
History
Updated by James Turnbull over 3 years ago
- Status changed from Unreviewed to Accepted
Updated by James Turnbull over 3 years ago
- Category set to newfeature
- Status changed from Accepted to Needs Decision
- Assignee set to Luke Kanies
- Target version set to 0.24.6
Luke – if you’re happy – see email at:
http://groups.google.com/group/puppet-dev/browse_thread/thread/c89927294d5e88c4
Updated by Luke Kanies over 3 years ago
- Status changed from Needs Decision to Accepted
I’m fine with the feature, although the docs for :templatedir need to be updated, and some basic tests, at least would be good, although I know the tests for Modules aren’t exactly awesome.
Updated by Luke Kanies over 3 years ago
- Assignee changed from Luke Kanies to Puppet Community
Updated by Paul Nasrat over 3 years ago
- Assignee changed from Puppet Community to Paul Nasrat
Patch from original mail introduces regressions – investigating test fixup/patch rework:
1) ‘Puppet::Module when searching for templates should use the main templatedir if no module is found’ FAILED expected: “/my/templates/mymod/mytemplate”,
got: nil (using ==)
./unit/module.rb:95:
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:19:in run'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:ineach'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run'
2) ‘Puppet::Module when searching for templates should return unqualified templates directly in the template dir’ FAILED expected: “/my/templates/mytemplate”,
got: nil (using ==)
./unit/module.rb:101:
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:19:in run'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:ineach'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run'
3) ‘Puppet::Module when searching for templates should use the environment templatedir if no module is found and an environment is specified’ FAILED expected: “/myenv/templates/mymod/mytemplate”,
got: nil (using ==)
./unit/module.rb:107:
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:19:in run'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:ineach'
/Users/pnasrat/Development/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run'
Updated by Paul Nasrat over 3 years ago
- Status changed from Accepted to In Topic Branch Pending Review
Patches sent to list for code review and testing.
git pull git://github.com/pnasrat/puppet.git tickets/0.24.x/1550
Updated by Luke Kanies over 3 years ago
- Status changed from In Topic Branch Pending Review to Ready For Checkin
- Assignee changed from Paul Nasrat to James Turnbull
Updated by James Turnbull over 3 years ago
- Assignee changed from James Turnbull to Paul Nasrat
Paul – this doesn’t look like it was branched from 0.24.x but rather master. Can you rebase please.
Updated by Paul Nasrat over 3 years ago
Rebased:
git pull git://github.com/pnasrat/puppet.git tickets/0.24.x/1550
Updated by James Turnbull over 3 years ago
- Status changed from Ready For Checkin to Code Insufficient
Still is still branched from master not 0.24.x.
Updated by Paul Nasrat over 3 years ago
Are you sure:
according to a fresh checkout using git://reductivelabs.com/puppet.git and adding a tracking branch to origin/0.24.x the tip is:
commit c5fb092720afefbf904822a5604b5b3520b5c194 Author: James Turnbull james@lovedthanlost.net Date: Thu Aug 21 12:07:09 2008 +1000
Removed reference to namespaces from --genconfig documentation
On my branch for 1550: git log —pretty=oneline -3 96a795533f69069d9b36ce44e689101654aebff6 Bug #1550 – Rework to avoid regressing rspec tests, add new rspec tests for templatedir as a path 8bed7844069ce145db69271c22a4c0715b644551 Allow a templatedir to be colon separated. c5fb092720afefbf904822a5604b5b3520b5c194 Removed reference to namespaces from —genconfig documentatio
Updated by Paul Nasrat over 3 years ago
Rebased to be on top of jamtur01 puppet 0.24.x rather than reductivelabs puppet 0.24.x
Updated by Paul Nasrat over 3 years ago
- Status changed from Code Insufficient to Ready For Checkin
Updated by James Turnbull over 3 years ago
- Status changed from Ready For Checkin to Code Insufficient
My repo at Github is the default stable. I get this when I try to rebase on your commits:
git rebase 0.24.x
First, rewinding head to replay your work on top of it...
HEAD is now at 11b0848 Fixed #1500 - puppetrun host regression
Applying moving autotest directory to make it possible to run autotest again
.dotest/patch:102: trailing whitespace.
.dotest/patch:112: trailing whitespace.
%r%^spec/.*\.rb$% => kernel.proc { |filename, _|
.dotest/patch:113: trailing whitespace.
filename
.dotest/patch:115: trailing whitespace.
%r%^lib/(.*)\.rb$% => kernel.proc { |_, m|
.dotest/patch:116: trailing whitespace.
["spec/#{m[1]}_spec.rb"]
error: autotest/discover.rb: already exists in index
error: autotest/puppet_rspec.rb: already exists in index
error: autotest/rspec.rb: already exists in index
error: spec/lib/autotest/discover.rb: does not exist in index
error: spec/lib/autotest/puppet_rspec.rb: does not exist in index
error: spec/lib/autotest/rspec.rb: does not exist in index
error: spec/plugins/mock_frameworks/flexmock.rb: does not exist in index
error: spec/plugins/mock_frameworks/mocha.rb: does not exist in index
error: spec/plugins/mock_frameworks/rr.rb: does not exist in index
error: spec/plugins/mock_frameworks/rspec.rb: does not exist in index
Using index info to reconstruct a base tree...
:102: trailing whitespace.
:112: trailing whitespace.
%r%^spec/.*\.rb$% => kernel.proc { |filename, _|
:113: trailing whitespace.
filename
:115: trailing whitespace.
%r%^lib/(.*)\.rb$% => kernel.proc { |_, m|
:116: trailing whitespace.
["spec/#{m[1]}_spec.rb"]
warning: squelched 8 whitespace errors
warning: 13 lines add whitespace errors.
Falling back to patching base and 3-way merge...
warning: too many files, skipping inexact rename detection
CONFLICT (rename/delete): Renamed spec/lib/autotest/puppet_rspec.rb->autotest/puppet_rspec.rb in moving autotest directory to make it possible to run autotest again and deleted in HEAD
CONFLICT (rename/delete): Renamed spec/lib/autotest/rspec.rb->autotest/rspec.rb in moving autotest directory to make it possible to run autotest again and deleted in HEAD
CONFLICT (rename/delete): Renamed spec/plugins/mock_frameworks/flexmock.rb->vendor/gems/rspec/plugins/mock_frameworks/flexmock.rb in HEAD and deleted in moving autotest directory to make it possible to run autotest again
CONFLICT (rename/delete): Renamed spec/plugins/mock_frameworks/mocha.rb->vendor/gems/rspec/plugins/mock_frameworks/mocha.rb in HEAD and deleted in moving autotest directory to make it possible to run autotest again
CONFLICT (rename/delete): Renamed spec/plugins/mock_frameworks/rr.rb->vendor/gems/rspec/plugins/mock_frameworks/rr.rb in HEAD and deleted in moving autotest directory to make it possible to run autotest again
Failed to merge in the changes.
Patch failed at 0001.
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
Updated by Paul Nasrat over 3 years ago
I was expecting this sort of workflow which works – my ticket branch is already rebased on top of your 0.24.x so I’m not sure you want to use rebase here. Surely it’s just setup a branch pull my branch, then merge into 0.24.x
It’s definitely been rebased ontop of your 0.24.x branch:
1504a7c27fa07b8babb9d601a453959c8933b8d5 Bug #1550 – Rework to avoid regressing rspec tests, add new rspec tests for templatedir as a path 96b0d2db30deb7d6b8c8b145ca9ae7743dfc42e0 Allow a templatedir to be colon separated. 11b0848b8c6eaaded608f4a485990ddb5bbd5e80 Fixed #1500 – puppetrun host regression
I’ve just tried to merge my changes onto a fresh clone of your repo:
Paul-Nasrats-Computer:tmp pnasrat$ git clone git://github.com/jamtur01/puppet.git Initialized empty Git repository in /Users/pnasrat/tmp/puppet/.git/ remote: Counting objects: 38784, done. remote: Compressing objects: 100% (10753/10753), done. Indexing 38784 objects… remote: Total 38784 (delta 27495), reused 38672 (delta 27421) 100% (38784/38784) done Resolving 27495 deltas… 100% (27495/27495) done Checking 1529 files out… 100% (1529/1529) done Paul-Nasrats-Computer:tmp pnasrat$ cd puppet/ Paul-Nasrats-Computer:puppet pnasrat$ git remote -v origin git://github.com/jamtur01/puppet.git Paul-Nasrats-Computer:puppet pnasrat$ git fetch —tags Paul-Nasrats-Computer:puppet pnasrat$ git branch -r origin/0.24.x origin/HEAD origin/cc/0.24.x origin/master origin/tickets/0.24.x/1274 origin/tickets/1349 Paul-Nasrats-Computer:puppet pnasrat$ git checkout -b tickets/0.24.x/1550 origin/0.24.x Branch tickets/0.24.x/1550 set up to track remote branch refs/remotes/origin/0.24.x. Switched to a new branch “tickets/0.24.x/1550” Paul-Nasrats-Computer:puppet pnasrat$ git pull git://github.com/pnasrat/puppet.git tickets/0.24.x/1550 remote: Counting objects: 20, done. remote: Compressing objects: 100% (13/13), done. remote: Total 13 (delta 9), reused 0 (delta 0) Unpacking 13 objects… 100% (13/13) done Updating 11b0848..1504a7c Fast forward lib/puppet/module.rb | 40 +++++++++++++++++++++++++++++—————– spec/unit/module.rb | 27 ++++++++++++++++++++++++—– 2 files changed, 53 insertions(+), 14 deletions(–)
git checkout -b 0.24.x origin/0.24.x git merge tickets/0.24.x/1550 Updating 11b0848..1504a7c Fast forward lib/puppet/module.rb | 40 +++++++++++++++++++++++++++++—————– spec/unit/module.rb | 27 ++++++++++++++++++++++++—– 2 files changed, 53 insertions(+), 14 deletions(–)
Updated by James Turnbull over 3 years ago
- Status changed from Code Insufficient to Closed
Pushed in commit:09057346dd7207e36c81bae479d1343fb7cc8d0a and commit:7f8abbd388ee3898c8505ca3bb884b75d8db2087 in branch 0.24.x
I also updated the CHANGELOG and the defaults.rb documentation and added that to commit:7f8abbd388ee3898c8505ca3bb884b75d8db2087.