Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Report sanitizer: Add 'kind' if missing
Browse files Browse the repository at this point in the history
Puppetserver seems to remove 'kind' even from older formats than format
6 when forwarding the report, even if the original reports contains the
key.
  • Loading branch information
ZeroPointEnergy committed Nov 6, 2019
1 parent 9310c5c commit 9ed7253
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/puppet/report_sanitizer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ def initialize(
end

def sanitize(raw)
# Puppetserver seems to remove 'kind' even from format version 6 reports.
raw['kind'] ||= 'apply'
sanitized = super
raw['master_used'] ||= nil
Util.verify_attributes(raw, %w[noop noop_pending corrective_change master_used])
Expand Down

0 comments on commit 9ed7253

Please sign in to comment.