pypuppetdb/types.py: Added noop attribute to Node and Report.#142
pypuppetdb/types.py: Added noop attribute to Node and Report.#142jakemalley wants to merge 1 commit into
Conversation
Added an attribute noop to the Node and Report class types, so it is easy to ascertain whether the node was in noop for a particular report in the case of the Report type, or the last report run in the case of the Node type.
1 similar comment
|
Hi @jakemalley ! Why do we need extra |
|
Hello @gdubicki, it has been a long time since I've looked at this, but if memory serves it was due to status being set via: I think also in certain situations if there was a syntax error during catalogue compilation the status was failed (instead of noop) which was triggering false alerts which we wanted to ignore. |
|
I had a feeling that this is because of the way we assign that status now. I am pretty new to the project so I have doubts about the approach we took too. Intuitively for me a run is a noop regardless if it resulted in pending changes or not. Checking git blame for that Full disclosure: I haven't done that yet. 😅 ...but there seems to be a lot of discussion about a change introduces in PuppetDB 4.1 and being compatible with that. Puppet 4 EOLed in October 2018, so maybe we can simplify the code if we drop 4.x support completely. 🤔 |
Added an attribute noop to the Node and Report class types, so it is easy to ascertain whether the node was in noop for a particular report in the case of the Report type, or the last report run in the case of the Node type.