bolt 3.23.0 → 3.23.1

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b79c90eb580d16111b19753003a7620e530ab9f10a47eb2cc4a5d5f5f1e15e1
4
- data.tar.gz: 791076493e0979acd945dd80f6d513eefaaa1170d36f626bf71c1d9a8ff990f3
3
+ metadata.gz: 67f08b10db67ef79aadf22a542f6564aa502743f53619f41c40aff4761e2e0c0
4
+ data.tar.gz: 81d8b927c1349299ba568358a2f155d624fb28f7b65ae5985bcfc8b6fe24eb6b
5
5
  SHA512:
6
- metadata.gz: 881675efbe7148a860a49fb4d74d8c8332af588d27526e29a1df99acbeacee0f802e6f0c71c710506bfdd1e6210a82645eaf1cdb1053d52b760318898142ee93
7
- data.tar.gz: 316cb92d945be0a2f3287e6dd7e4cee7505af08b8918f539f9b9ee678f7c9e7704d5dbb83f617eab772dc86f4521c93fab8e01778e5348873c8b39488baf3b43
6
+ metadata.gz: a3e66f8d5adc727228b09e212de34c7de796c556a0d91153e1599cbf619b30b98c9358ea3683c2e00650375ecac8745fdf7a79977a42d6761967ce98c5c2ac71
7
+ data.tar.gz: a6dedd218bc2db8e5365906366a1cbeef5e99b02f606c80677081eccc71172fa7f15f3798630847239228feafc861278938044e98b2107429c8e34cea7143f9c
@@ -10,6 +10,7 @@ module Bolt
10
10
  WINDOWS_OPTIONS = %w[
11
11
  bundled-ruby
12
12
  cleanup
13
+ extensions
13
14
  interpreters
14
15
  tmpdir
15
16
  ].freeze
@@ -88,7 +88,7 @@ module Bolt
88
88
 
89
89
  facts.uniq!
90
90
  # Returns {'mycertname' => [{'path' => ['nested', 'fact'], 'value' => val'}], ... }
91
- fact_values = @puppetdb_client.fact_values(targets, facts)
91
+ fact_values = @puppetdb_client.fact_values(targets, facts, opts['instance'])
92
92
 
93
93
  targets.map do |certname|
94
94
  target_data = fact_values[certname]
data/lib/bolt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bolt
4
- VERSION = '3.23.0'
4
+ VERSION = '3.23.1'
5
5
  end
@@ -8,6 +8,7 @@ require 'digest'
8
8
  require 'fileutils'
9
9
  require 'net/http'
10
10
  require 'logging'
11
+ require 'timeout'
11
12
 
12
13
  require 'bolt/error'
13
14
 
@@ -38,8 +39,7 @@ module BoltServer
38
39
 
39
40
  if do_purge
40
41
  @purge = Concurrent::TimerTask.new(execution_interval: purge_interval,
41
- timeout_interval: purge_timeout,
42
- run_now: true) { expire(purge_ttl) }
42
+ run_now: true) { expire(purge_ttl, purge_timeout) }
43
43
  @purge.execute
44
44
  end
45
45
  end
@@ -171,13 +171,15 @@ module BoltServer
171
171
  serial_execute { download_file(file_path, sha, file_data['uri']) }
172
172
  end
173
173
 
174
- def expire(purge_ttl)
174
+ def expire(purge_ttl, purge_timeout)
175
175
  expired_time = Time.now - purge_ttl
176
- @cache_dir_mutex.with_write_lock do
177
- Dir.glob(File.join(@cache_dir, '*')).select { |f| File.directory?(f) }.each do |dir|
178
- if (mtime = File.mtime(dir)) < expired_time && dir != tmppath
179
- @logger.debug("Removing #{dir}, last used at #{mtime}")
180
- FileUtils.remove_dir(dir)
176
+ Timeout.timeout(purge_timeout) do
177
+ @cache_dir_mutex.with_write_lock do
178
+ Dir.glob(File.join(@cache_dir, '*')).select { |f| File.directory?(f) }.each do |dir|
179
+ if (mtime = File.mtime(dir)) < expired_time && dir != tmppath
180
+ @logger.debug("Removing #{dir}, last used at #{mtime}")
181
+ FileUtils.remove_dir(dir)
182
+ end
181
183
  end
182
184
  end
183
185
  end
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: 3.23.0
4
+ version: 3.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-06 00:00:00.000000000 Z
11
+ date: 2022-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable