Closed Bug 1235395 Opened 9 years ago Closed 9 years ago

whine.pl broken due to a missing generate_email() routine

Categories

(Bugzilla :: Whining, defect, P1)

5.0.2

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: mva, Assigned: dylan)

References

Details

(Keywords: regression)

Attachments

(1 file, 2 obsolete files)

User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20151225125557

Steps to reproduce:

Execute the whine.pl cronjob according to http://bugzilla.readthedocs.org/en/5.0/installing/optional-post-install-config.html?highlight=whine


Actual results:

the script broke due to "Undefined subroutine &main::generate_email called at ./whine.pl line 355"


Expected results:

Working whine mails should have been sent

It looks like there is no generate_email() routine defined in Bugzilla/Mailer.pm in 5.0.2., while there is one in the current head/master
Assignee: whining → dylan
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 5.0
Regression in 5.0.2 when committing bug 714724. 5.0.1 is fine.
Depends on: 714724
Keywords: regression
Flags: blocking5.0.3+
Attached patch 1235395_2.patch (obsolete) — Splinter Review
Attachment #8702420 - Flags: review?(LpSolit)
Attached patch 1235395_4.patch (obsolete) — Splinter Review
Attachment #8702420 - Attachment is obsolete: true
Attachment #8702420 - Flags: review?(LpSolit)
Attachment #8702430 - Flags: review?(LpSolit)
Attached patch 1235395_5.patchSplinter Review
Fixed recursive import error
Attachment #8702430 - Attachment is obsolete: true
Attachment #8702430 - Flags: review?(LpSolit)
Attachment #8702436 - Flags: review?(LpSolit)
Comment on attachment 8702436 [details] [diff] [review]
1235395_5.patch

Looks good and works fine. The comments below are all nits, but would be good to be fixed on commit to avoid future conflicts when backporting fixes, and to keep consistency within our codebase.


>+++ b/Bugzilla/Mailer.pm

>-@Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker);
>-
>+@Bugzilla::Mailer::EXPORT = qw(MessageToMTA build_thread_marker generate_email);

No reason to remove the empty line. Everywhere else, we leave an empty line after ::EXPORT, for readability. Would be good to do it here too, also for consistency.


> use Bugzilla::Util;
>+use Bugzilla::User;

In master, Bugzilla::User is put just above Bugzilla::Util. Doing it here too would avoid useless conflicts in the future when trying to apply a patch from master to the 5.0 branch. It's always painful to have to backport a patch for such minor reasons.


>+sub generate_email {

Here too, generate_email() is put as the first method in master, before MessageToMTA(). Here you put it last. :(



>+++ b/whine.pl
> use warnings;
>-
> use lib qw(. lib);

No reason to remove the empty line. Here too, we always leave an empty line between both, for readability and consistency.


>-use Bugzilla::Mailer;
>+use Bugzilla::Mailer qw(MessageToMTA generate_email);

Here too, this change is useless, and isn't done upstream.


r=LpSolit, but please keep consistency with master (to ease backports) and the remaining code (for consistency).
Attachment #8702436 - Flags: review?(LpSolit) → review+
Flags: approval5.0?
Flags: approval5.0? → approval5.0+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   15cc087..26a693a  5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Hi,

Follow all steps but still emails are not going through whining.

Can any one help me out

Bugzilla version :- 5.0.2
@abhishek: As your issue is likely not related to this specific bug report, please see http://www.bugzilla.org/support/ - Thanks!
Dear Ander,

Issue :- 
After upgrading bugzilla from 4.4.4 to 5.0.2 version whining script not running.

Error :- undefined subroutine &main: generate_email called at ./whine.pl line 355

kindly suggest how to resolve the error.

Thanks in advance
Dear Ander,

Can you suggest how to resolve the issue ?

I am waiting for your valuable feedback.

Thanks
Please see comment 8 again for venues. Your problem is off-topic for this bug report. Thanks.
His question is related to this issue, but questions about how to apply a patch should indeed not be asked here but rather in the support mailing-list (or simply read the documentation).

Either you apply the patch manually (patch -p1 -i name_of_the_patch.diff) or you wait for Bugzilla 5.0.3 which will have this fix.
Issue Resolved,

Thanks a ton Guys.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: