bolt 0.21.5 → 0.21.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

@@ -1036,9 +1036,10 @@ class Checker4_0 < Evaluator::LiteralEvaluator
1036
1036
  true
1037
1037
  end
1038
1038
 
1039
+ # An apply expression exists purely for the side effect of applying a
1040
+ # catalog somewhere, so it always has side effects
1039
1041
  def idem_ApplyExpression(o)
1040
- return false if o.arguments.any? { |value| !idem(value) }
1041
- idem(o.body)
1042
+ false
1042
1043
  end
1043
1044
 
1044
1045
  def idem_IfExpression(o)
@@ -22,7 +22,13 @@ class TasksChecker < Checker4_0
22
22
  end
23
23
 
24
24
  def check_CollectExpression(o)
25
- illegalTasksExpression(o)
25
+ # Only virtual resource queries are allowed in apply blocks, not exported
26
+ # resource queries
27
+ if in_ApplyExpression? && o.query.is_a?(Puppet::Pops::Model::VirtualQuery)
28
+ super(o)
29
+ else
30
+ illegalTasksExpression(o)
31
+ end
26
32
  end
27
33
 
28
34
  def check_HostClassDefinition(o)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.5
4
+ version: 0.21.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-02 00:00:00.000000000 Z
11
+ date: 2018-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -315,6 +315,7 @@ files:
315
315
  - lib/bolt/boltdir.rb
316
316
  - lib/bolt/catalog.rb
317
317
  - lib/bolt/catalog/compiler.rb
318
+ - lib/bolt/catalog/loaders.rb
318
319
  - lib/bolt/catalog/logging.rb
319
320
  - lib/bolt/cli.rb
320
321
  - lib/bolt/config.rb
@@ -354,6 +355,7 @@ files:
354
355
  - lib/bolt_ext/puppetdb_inventory.rb
355
356
  - lib/bolt_spec/plans.rb
356
357
  - lib/bolt_spec/plans/mock_executor.rb
358
+ - lib/bolt_spec/run.rb
357
359
  - libexec/apply_catalog.rb
358
360
  - libexec/bolt_catalog
359
361
  - libexec/custom_facts.rb