lindegroup / autopkgr

AutoPkgr is a free Mac app that makes it easy to install and configure AutoPkg.
http://www.lindegroup.com/autopkgr
Apache License 2.0
539 stars 51 forks source link

Slack Notification not sent for software imported into Munki if option is selected #634

Closed kevinmcox closed 4 years ago

kevinmcox commented 4 years ago

It appears that Slack notifications will not be sent when software is imported into Munki if the option "New software imported to Munki, JSS, or other server" is selected at all. (This does not effect other notifications sent at the same time such as downloads, errors, etc. Examples below showing one Slack message with the import notification and another without. )

AutoPkgr notificaitons

This includes when the selected preference is "Any action" but the specific box remains checked (but greyed out) below:

Any Action but selected

It also includes when the selected preference is "Selected actions" and includes the "New software imported to Munki, JSS, or other server" option:

Selected

If "Any action" is selected and the "New software imported to Munki, JSS, or other server" option is not checked then the import notification is sent:

Any action no selections

I haven't noticed any of the other notification options being similarly effected, but haven't tested for them either. Please let me know if you have any questions or need additional clarifications.

shawnhonsberger commented 4 years ago

Thanks for this. I am not actually able to reproduce it. Are you able to reproduce this on a fresh vm, or a system with a fresh install?

mikethehill commented 4 years ago

I can reproduce this on a 10.14.6 (fully patched) VM, with a fresh install of Munki 4.0.1.3899, Autopkg 2.0.2, Git 2.2.1 and Autopkgr 1.5.2.

Autopkgr can successfully send a test message to Slack and also send test template messages, but no notifications are sent during an autopkg run (irrespective of whether I have all items individually checked or if they're all un-checked and 'Any action' is selected).

I see the same behaviour on our prod Munki/Autopkg(r) box. Please let me know if you need anything further!

shawnhonsberger commented 4 years ago

Thank you. If you select Selected Actions > New software imported to Munki, JSS, or other server, do you notice any Slack-related errors in the log when you run a recipe?

mikethehill commented 4 years ago

No, not that I can see under the autpkgr process (comparing log entries from a test message and an AutoPkgr run).

Attached are the output from a 'send test' under Slack notification configuration screen (SlackTest.txt) and a sample AutoPkgr run to fetch Chrome (AutoPkgr_run.txt). Verbose logging is turned on for both of these.

Hope this is useful!

` SlackTest.txt AutoPkgr_run.txt

`

shawnhonsberger commented 4 years ago

@kevinmcox @mikethehill was this working before December? Is that when it started?

mikethehill commented 4 years ago

Unable to say re: working before December as I've only recently looked at AutoPkgr (starting with 1.5.1). Just tested this with AutoPkgr 1.5 (running autopkg 1.4.1) and I get the same result - test notifications are successfully sent, along with message template test message, but nothing after an AutoPkg run.

kevinmcox commented 4 years ago

@mikethehill, thanks so much for jumping in here while I was away and confirming the issue.

@shawnhonsberger, I can't say when it started. I only noticed because I was setting up a new Autopkg computer and was setting everything back up from scratch.

I was able to confirm it on both my old (physical server) and new setup (VM) if I manipulated the settings as shown in the screenshots above.

mikethehill commented 4 years ago

@kevinmcox Do Slack notifications work if you enable email alerts? I enabled email alerts, left Slack alerts enabled, ran recipes and received both an email alert and Slack!

kevinmcox commented 4 years ago

Yep, if I turn on email notifications it fixes the specific issue with the checkbox.

shawnhonsberger commented 4 years ago

@kevinmcox I have been testing this with AutoPkgr 1.5.3 with, and without email notifications enabled and I am able to get Slack Notifications. Here is a picture of my settings that work for me. Is this still an issue for you? Screen Shot 2020-05-26 at 7 58 31 AM

kevinmcox commented 4 years ago

@shawnhonsberger I had just left emails on. I'll switch the settings around and test again with 1.5.3.

shawnhonsberger commented 4 years ago

Thanks, @kevinmcox!

kevinmcox commented 4 years ago

@shawnhonsberger Unfortunately I'm seeing the same behavior. I just spent an hour testing all the variations and there is no change from my original post.

With the settings in your last screenshot I get the Slack notification, but only related to the download, not the import into Munki (like my very first screenshot at the top). Enabling email alerts sends both parts of the notification to Slack.

shawnhonsberger commented 4 years ago

@kevinmcox Thanks for confirming. Though I am unable to reproduce it, it doesn't mean I don't want to chase this down. If you are fine leaving email notifications on, then we'll leave it be.

kevinmcox commented 4 years ago

No worries Shawn. I don't even need to leave email notifications on, as long as I have things set like this it works:

https://user-images.githubusercontent.com/25358601/70824658-45253900-1da8-11ea-9435-8bbf5dc28e50.png

shawnhonsberger commented 4 years ago

Thank you, @kevinmcox. I'll close this for now. In the meantime, I'll keep watching for it and I'll also take a look at the button next chance I get.

Prodeguerriero commented 4 years ago

@shawnhonsberger FYI, I see similar behaviors. I don't think opening a new issue makes sense, so I will write my report here.

The persistence of the notifications settings seem to be a tad inconsistent across the board. On my clean install on Catalina, I experience the following:

Cheers!