Skip to content

Commit

Permalink
Merge pull request #119 from DataDog/kserrania/pin-dogapi-major
Browse files Browse the repository at this point in the history
Update dogapi version constraint and fix tests
  • Loading branch information
KSerrania authored Jan 9, 2020
2 parents 219240b + e4bc343 commit 91c15a9
Show file tree
Hide file tree
Showing 39 changed files with 3,654 additions and 4,940 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
chef-handler-datadog (0.12.3)
dogapi (= 1.36.0)
dogapi (~> 1.38.0)

GEM
remote: http://rubygems.org/
Expand Down Expand Up @@ -67,7 +67,7 @@ GEM
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
docile (1.3.2)
dogapi (1.36.0)
dogapi (1.38.0)
multi_json
dotenv (2.7.5)
ed25519 (1.2.4)
Expand Down Expand Up @@ -276,7 +276,7 @@ PLATFORMS
DEPENDENCIES
appraisal (~> 2.0.1)
bundler
chef (>= 12.7)
chef (~> 15.0)
chef-handler-datadog!
dotenv
guard
Expand Down
2 changes: 1 addition & 1 deletion chef-handler-datadog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ['lib']
gem.extra_rdoc_files = ['README.md', 'LICENSE.txt']

gem.add_dependency 'dogapi', '= 1.36.0'
gem.add_dependency 'dogapi', '~> 1.38.0'

gem.add_development_dependency 'appraisal', '~> 2.0.1'
gem.add_development_dependency 'bundler'
Expand Down
3 changes: 3 additions & 0 deletions lib/chef/handler/datadog_chef_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
class DatadogChefEvents
include DatadogUtil

attr_reader :event_title
attr_reader :event_body

def initialize
@hostname = nil
@run_status = nil
Expand Down
3 changes: 2 additions & 1 deletion lib/chef/handler/datadog_chef_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def with_policy_tags_enabled(enabled)
def send_update_to_datadog(dog)
tags = combined_host_tags
retries = @retries
rc = []
begin
loop do
should_retry = false
Expand All @@ -114,7 +115,7 @@ def send_update_to_datadog(dog)
break unless should_retry
end
rescue StandardError => e
Chef::Log.warn("Could not determine whether #{@hostname}'s tags were successfully submitted to Datadog: #{rc}. Error:\n#{e}")
Chef::Log.warn("Could not determine whether #{@hostname}'s tags were successfully submitted to Datadog: #{rc.inspect}. Error:\n#{e}")
end
end

Expand Down
Loading

0 comments on commit 91c15a9

Please sign in to comment.