Here is an example showing, after the change, how refresh-only events like the exec shown here, or e.g. a reboot event (which inspired this fix), will now show up in logs and reports:
kris.bosland@kris:puppet % cat ../tmp/pup-9339/tmp.pp notify {'notify 9339': } ~> exec {'refreshed exec 9339': command => 'true', path => '/usr/bin', refreshonly => true } exec {'non-refreshed exec 9339': command => 'true', path => '/usr/bin', onlyif => '/usr/bin/true' } kris.bosland@kris:puppet % bx puppet apply ../tmp/pup-9339/tmp.pp --logdir ../tmp/pup-9339/files --reportdir ../tmp/pup-9339/files/ DEBUG: send_log Module(notice:Compiled catalog for kris.bosland-c02kf9eafft1 in environment production in 0.10 seconds) Notice: Compiled catalog for kris.bosland-c02kf9eafft1 in environment production in 0.10 seconds DEBUG: send_log Module(info:Applying configuration version '1545159653') DEBUG: send_log Module(notice:notify 9339) Notice: notify 9339 DEBUG: send_log Puppet::Transaction::Event(notice:defined 'message' as 'notify 9339') Notice: /Stage[main]/Main/Notify[notify 9339]/message: defined 'message' as 'notify 9339' DEBUG: send_log Puppet::Type::Notify(info:Scheduling refresh of Exec[refreshed exec 9339]) DEBUG: send_log Puppet::Type::Exec(notice:Triggered 'refresh' from 1 event) Notice: /Stage[main]/Main/Exec[refreshed exec 9339]: Triggered 'refresh' from 1 event DEBUG: send_log Puppet::Transaction::Event(notice:executed successfully) Notice: /Stage[main]/Main/Exec[non-refreshed exec 9339]/returns: executed successfully DEBUG: send_log Module(notice:Applied catalog in 0.06 seconds) Notice: Applied catalog in 0.06 seconds kris.bosland@kris:puppet % grep -rn 9339 ../tmp/pup-9339/files ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:15: message: notify 9339 ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:23: message: defined 'message' as 'notify 9339' ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:24: source: "/Stage[main]/Main/Notify[notify 9339]/message" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:30: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:34: source: "/Stage[main]/Main/Exec[refreshed exec 9339]" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:40: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:44: source: "/Stage[main]/Main/Exec[non-refreshed exec 9339]/returns" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:50: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:141: Notify[notify 9339]: ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:142: title: notify 9339 ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:143: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:145: resource: Notify[notify 9339] ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:151: - Notify[notify 9339] ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:168: desired_value: notify 9339 ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:170: message: defined 'message' as 'notify 9339' ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:177: Exec[refreshed exec 9339]: ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:178: title: refreshed exec 9339 ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:179: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:181: resource: Exec[refreshed exec 9339] ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:187: - Exec[refreshed exec 9339] ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:213: Exec[non-refreshed exec 9339]: ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:214: title: non-refreshed exec 9339 ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:215: file: "/Users/kris.bosland/work/tmp/pup-9339/tmp.pp" ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:217: resource: Exec[non-refreshed exec 9339] ../tmp/pup-9339/files/kris.bosland-c02kf9eafft1/201812181900.yaml:223: - Exec[non-refreshed exec 9339] kris.bosland@kris:puppet % On Monday, December 17, 2018 at 12:24:02 PM UTC-8, Ben Ford wrote: > > Could you write up an example of what kind of code would have the > conditions reversed so that we can share with community members that might > be affected? > > On Wed, Dec 12, 2018 at 2:48 PM Kris Bosland <kris.b...@puppet.com > <javascript:>> wrote: > >> Forwarding this to the developer group - does anyone have any feedback on >> this change? >> >> ---------- Forwarded message --------- >> From: Kris Bosland <kris.b...@puppet.com <javascript:>> >> Date: Tue, Dec 11, 2018 at 10:11 AM >> Subject: Re: Changes coming in PUP-9339 >> To: Michael Stahnke <sta...@puppet.com <javascript:>> >> Cc: <tech-d...@puppet.com <javascript:>> >> >> >> We are currently not planning to change the schema version, since this >> does not include a change in schema, although there will be different >> information from the same Puppet actions. >> >> On Tue, Dec 11, 2018 at 3:57 AM Michael Stahnke <sta...@puppet.com >> <javascript:>> wrote: >> >>> Does this increment the report schema version number? If so, some of the >>> open source report processors and dashboards may need to know (and thus >>> should be shared on puppet-dev) >>> >>> On Mon, Dec 10, 2018 at 4:36 PM Kris Bosland <kris.b...@puppet.com >>> <javascript:>> wrote: >>> >>>> TL;DR: We are adding report status events and fail status for >>>> refresh-only resources. This will impact logging and the execution of >>>> dependent resources. If you may be impacted, please review >>>> https://github.com/puppetlabs/puppet/pull/7270. >>>> >>>> I am sending this broadly to be sure to have a chance to catch the >>>> attention of potentially impacted groups. Because of customer requirements >>>> for PE-25560, we are adding report status events for refresh-only >>>> resources >>>> such as reboot or some exec events. This will add new events to every >>>> report. Also, because of the way dependent resource evaluation is >>>> evaluated, some events that were not skipped in the past will now be >>>> skipped. As an example, this test shows an event that was not skipped, but >>>> it will now be skipped, reversing the sense of the test: >>>> >>>> https://github.com/puppetlabs/puppet/blob/4.10.x/spec/integration/transaction_spec.rb#L238-L269 >>>> >>>> I have just now discovered this commit, which has some impact on the >>>> skipping portion of this change: >>>> >>>> https://github.com/puppetlabs/puppet/commit/40b3a4f86f67fb7c84aed833c05aa242338a6b3e >>>> >>>> >>>> -- >>>> Kris Bosland >>>> Sr. Software Developer >>>> kris.b...@puppet.com <javascript:> >>>> >>>> >> >> -- >> Kris Bosland >> Sr. Software Developer >> kris.b...@puppet.com <javascript:> >> >> >> >> -- >> Kris Bosland >> Sr. Software Developer >> kris.b...@puppet.com <javascript:> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-dev+...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-dev/CAHDO8jSNiKj4pFVbpGQPZdsx%3DnoxfpOQ2tpQmHXQKzy_eTzEEA%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/puppet-dev/CAHDO8jSNiKj4pFVbpGQPZdsx%3DnoxfpOQ2tpQmHXQKzy_eTzEEA%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/a67656d6-2017-4c51-bb7c-0d8ba8c1a8df%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.