puppetlabs / puppetdb

Centralized Puppet Storage
http://docs.puppetlabs.com/puppetdb
Apache License 2.0
298 stars 224 forks source link

Log obsolete cmd message with producer_timestamp #3954

Closed austb closed 4 months ago

austb commented 4 months ago

cmdref only represents the stockpile metadata about a command. To keep the timestamps distinct, its :producer_timestamp field is actually named :producer-ts, so this was always nil. It is also optional, so we need to pull the producer_timestamp out of the command body where it is not optional. Except for the deactivate node command, so we also need to provide a fallback.

Reviewing this PR with whitespace-only changes hidden is much easier.