Skip to content

Commit 7e19ae9

Browse files
authored
Merge pull request #9458 from mhashizume/PUP-12062/main/fact-limit
Clarify soft limit on number of facts
2 parents 5af02da + f7dfc72 commit 7e19ae9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/puppet/configurer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def convert_catalog(result, duration, facts, options = {})
132132
end
133133

134134
def warn_number_of_facts(size, max_number)
135-
Puppet.warning _("The current total number of facts: %{size} exceeds the number of facts limit: %{max_size}") % { size: size, max_size: max_number }
135+
Puppet.warning _("The current total number of fact values: %{size} exceeds the fact values limit: %{max_size}") % { size: size, max_size: max_number }
136136
end
137137

138138
def warn_fact_name_length(name, max_length)

lib/puppet/defaults.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,9 @@ def self.initialize_default_settings!(settings)
18051805
:number_of_facts_soft_limit => {
18061806
:default => 2048,
18071807
:type => :integer,
1808-
:desc => "The soft limit for the total number of facts.",
1808+
:desc => "The soft limit for the total number of fact values. This counts the
1809+
child elements of all facts (e.g. all items of an array or a hash), not just top
1810+
level facts.",
18091811
},
18101812
:payload_soft_limit => {
18111813
:default => 16 * 1024 * 1024,

spec/unit/configurer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
}
269269
Puppet::Node::Facts.indirection.save(facts)
270270

271-
expect(Puppet).to receive(:warning).with(/The current total number of facts: [1-9]* exceeds the number of facts limit: [1-9]*/)
271+
expect(Puppet).to receive(:warning).with(/The current total number of fact values: [1-9]* exceeds the fact values limit: [1-9]*/)
272272
configurer.run
273273
end
274274

0 commit comments

Comments
 (0)