Closed (fixed)
Project:
Update Status
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Mar 2007 at 20:27 UTC
Updated:
11 Jul 2007 at 23:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
chrissearle commentedcommenting to track - a definite +1 from me for this suggestion :) Its a really useful module already - but telling me when to go look would be even better.
Comment #2
Christoph C. Cemper commented+1 ...
and provide a "single-click upgrade" link in the mails so the CVS fetch can be done...
(attention for cvs merge conflicts for core patches!)
Comment #3
chrissearle commentedAs far as I understood it - the releasemonitor module could do CVS - but this module is based on the drupal project module info (that is - release versions/nightlies only) ?
Comment #4
chrissearle commentedOops - didn't read the note about modifying the title. Sorry
Comment #5
jacauc commentedMy suggestion with regard to this (and to prevent duplicating code) is to wait for http://drupal.org/node/63881 to be in core.
This way, when the "update available" is logged into the watchdog log, you can send yourself an email/sms/jabber etc message.
Comment #6
alpritt commentedFor d6 version, I agree with using watchdog() or possibly the choice of setting up an action. Sending an email seems unnecessarily constrained.
Comment #7
sutharsan commentedRestrict the amount of messages. One message when an update becomes available or better weekly/monthly consolidated messages. Daily/hourly emails would do more harm than good. When maintaining multiple sites with plenty of modules each would turn this well intended messaging system into a real mail bomb. Further my customers (and I) do not want to update the website with each and every new module version. And therefore do not need to be bothered with each new update.
Comment #8
dwwThe problem is, it gets incredibly complicated, quickly, once you try to remember which notifications you've already sent. That's why daily is so easy: we just fetch the new data, call the function to compare with what you've got, and if there are any out of date modules, we invoke the action (be that true actions support, hard-coded email, whatever).
If we're trying to be fancy and only notify once, this becomes much more difficult. Complications include:
I could probably keep going, but you get the idea. None of this is impossible to solve, but it's going to add a lot of code, and I don't think it's worth it. My current proposal for D5:
This would be a relatively small patch, but it has the following benefits:
When porting to D6 core, as soon as the Actions patch lands, we can action-ify this process. Either way, we should probably add a watchdog() there, too. And both of those will give you vastly more flexibility. But, IMHO the above is a totally reasonable approach for 5.x-2.0.
Comment #9
add1sun commentedI think dww's plan for now is good. Email would be a great feature and I think keeping it simple at this point makes the most sense. +1 for email field sent out according to update interval selected.
Comment #10
dwwIncludes email and watchdog(). Newline-separated textarea on the settings tab. Validation callback. New private helper called from update_status_cron() to invoke hook_requirements and send all desired notifications. Tested locally and all the watchdog stuff is cool, and devel.module says the email was sent, but this needs better testing with real email.
Comment #11
dwwOh, the one hidden gotcha with this patch is that users with only 'access administration pages' can see watchdog() logs, but sites might not want everyone with 'access administration pages' to know if the site is out of date, insecure, etc. :( You need 'administer site configuration' to see the status report, available updates report, modules page, etc. I have no idea what to do about this, other than rip out the watchdog() calls, but that seems like a shame. Any suggestions?
Comment #12
dwwOk, given the badness of watchdog() access i mentioned above, here's a simpler version of the patch that always watchdog()'s the same generic message to the 'update_status' log type, with a link to the status report:
"Fetched data on all available new releases and updates."
This simplifies the logic in _update_status_cron_notify() quite a bit, too. ;) It's a shame there's no better solution, but I think this is the safest. Wish there was a way to do per-message (or per-subsystem, or per-severity) ACLs on watchdog messages, but it doesn't look like that's possible in D6, either. :( Oh well, the drop is always moving... maybe someday. ;)
Comment #13
sutharsan commentedRe#8 I agree that this is the way to go for 5.x-2.0. I knew what I asked and am aware of the difficulties realizing my ideal picture. Lets roll this and see how we can proceed from here.
Patch on #10 tested on a real site with real mail. All worked as advertised. One email address, multiple addresses, with/without warnings, daily, weekly (slightly speeded up of course).
Comment #14
dwwCommitted a slightly modified version of #12 to HEAD. I moved the generic watchdog() call out of _update_status_cron_notify() and directly into update_status_refresh() so that we always log whenever we fetch, not just via cron.
Comment #15
dwwSmall follow-up commit: http://drupal.org/cvs?commit=71658
Comment #16
(not verified) commented