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

(maint) Pin concurrent-ruby, puppet 6.14 compat, bump rake #69

Merged
merged 1 commit into from Mar 26, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -12,7 +12,7 @@ group :tests do
end

group :development do
gem 'bolt', git: 'https://github.com/puppetlabs/bolt', branch: 'master'
# gem 'bolt', git: 'https://github.com/puppetlabs/bolt', branch: 'master'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: revert when bolt 2.x compat is done

gem 'github_changelog_generator', '~> 1.14'
gem 'pry-byebug'
gem 'rubocop-rspec'
Expand Down
7 changes: 5 additions & 2 deletions agentless-catalog-executor.gemspec
Expand Up @@ -20,7 +20,10 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "bolt", "~> 1.31"
# Pin concurrent-ruby to 1.1.5 until https://github.com/ruby-concurrency/concurrent-ruby/pull/856 is released
spec.add_dependency "concurrent-ruby", "1.1.5"
# TODO: migrate to bolt 2.x
spec.add_dependency "bolt", "~> 1.31"

# server-side dependencies cargo culted from https://github.com/puppetlabs/bolt/blob/4418da408643aa7eb5ed64f4c9704b941ea878dc/Gemfile#L10-L16
spec.add_dependency "hocon", ">= 1.2.5"
Expand All @@ -33,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", ">= 1.16", "< 3.0.0"
spec.add_development_dependency "faraday"
spec.add_development_dependency "rack-test", "~> 1.0"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rubocop", "~> 0.50"
end
7 changes: 7 additions & 0 deletions lib/ace/configurer.rb
@@ -1,5 +1,12 @@
# frozen_string_literal: true

require 'puppet'
# NOTE: Changes in puppet code loading results in simply requiring `puppet/configurer` no longer
# possible. The following requires can make ruby load, however selectively loading code from puppet
# will likely lead to issues in the future. Instead, just load puppet here.
# require 'puppet/util/autoload'
# require 'puppet/parser/compiler'
# require 'puppet/parser'
require 'puppet/configurer'

module ACE
Expand Down
3 changes: 3 additions & 0 deletions lib/ace/puppet_util.rb
Expand Up @@ -66,6 +66,9 @@ def self.isolated_puppet_settings(certname, environment, enforce_environment, en
Puppet.settings[:logdir] = File.join(environment_dir, 'log')
Puppet.settings[:codedir] = File.join(environment_dir, 'code')
Puppet.settings[:plugindest] = File.join(environment_dir, 'plugins')
# With puppet 6.14.0 resolvers no longer set :server for pluginfact download, explicitly set them here
Puppet.settings[:server] = @ssl_settings[:server]
Puppet.settings[:masterport] = @ssl_settings[:serverport]

# establish a base_context. This needs to be the first context on the stack, but must not be created
# before all settings have been set. For example, this will create a Puppet::Environments::Directories
Expand Down