Skip to content

Commit

Permalink
Refs #35833 - Revert "Fixes #35684 - Drop Applied catalog lines"
Browse files Browse the repository at this point in the history
This reverts commit 4f65dd5. It's
problematic because Foreman can't identify reports as Puppet reports if
there are no entries. Until Foreman has an API where it can be
identified as Puppet even if there are no logs we should continue
sending it.
  • Loading branch information
ekohl committed Jun 20, 2023
1 parent bb6bfbf commit e0298ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion files/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def logs_to_array logs
next if log.level == :debug

# skipping catalog summary run messages, we dont want them in Foreman's db
next if log.message =~ /^(Finished catalog run|Applied catalog) in \d+.\d+ seconds$/
next if log.message =~ /^Finished catalog run in \d+.\d+ seconds$/

# Match Foreman's slightly odd API format...
l = { 'log' => { 'sources' => {}, 'messages' => {} } }
Expand Down
11 changes: 11 additions & 0 deletions spec/static_fixtures/report-format-6.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@
},
"level": "notice"
}
},
{
"log": {
"sources": {
"source": "//slave01.rackspace.theforeman.org/Puppet"
},
"messages": {
"message": "Applied catalog in 14.26 seconds"
},
"level": "notice"
}
}
]
}

0 comments on commit e0298ea

Please sign in to comment.