Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default pool_size to 4 #1044

Merged
merged 3 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CHANGELOG
=========

Unreleased
- Increase pool_size default to 4 from 1 [#1044](https://github.com/puppetlabs/r10k/pull/1044)
----

3.4.1
Expand Down
2 changes: 1 addition & 1 deletion lib/r10k/puppetfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Puppetfile

include R10K::Settings::Mixin

def_setting_attr :pool_size, 1
def_setting_attr :pool_size, 4

include R10K::Logging

Expand Down
4 changes: 2 additions & 2 deletions lib/r10k/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def self.global_settings
}),

Definition.new(:pool_size, {
:desc => "The amount of threads used to concurrently install modules. The default value is 1: install one module at a time.",
:default => 1,
:desc => "The amount of threads used to concurrently install modules. The default value is 4: install four modules at a time.",
:default => 4,
:validate => lambda do |value|
if !value.is_a?(Integer)
raise ArgumentError, "The pool_size setting should be an integer, not a #{value.class}"
Expand Down
4 changes: 3 additions & 1 deletion spec/unit/action/puppetfile/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def installer(opts = {}, argv = [], settings = {})

describe "installing modules" do
let(:modules) do
Array.new(4, R10K::Module::Base.new('author/modname', "/some/nonexistent/path/modname", nil))
(1..4).map do |idx|
R10K::Module::Base.new("author/modname#{idx}", "/some/nonexistent/path/modname#{idx}", nil)
end
end

before do
Expand Down