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

RESOLVED FIXED in Bugzilla 5.0

Status

()

Bugzilla
Whining
P1
major
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: Marcus von Appen, Assigned: dylan)

Tracking

({regression})

5.0.2
Bugzilla 5.0
regression
Bug Flags:
approval5.0 +
blocking5.0.3 +

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

a year ago
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)

Updated

a year ago
Assignee: whining → dylan
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1

Updated

a year ago
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 5.0

Comment 1

a year ago
Regression in 5.0.2 when committing bug 714724. 5.0.1 is fine.
Depends on: 714724
Keywords: regression

Updated

a year ago
Flags: blocking5.0.3+
(Assignee)

Comment 2

a year ago
Created attachment 8702420 [details] [diff] [review]
1235395_2.patch
Attachment #8702420 - Flags: review?(LpSolit)
(Assignee)

Comment 3

a year ago
Created attachment 8702430 [details] [diff] [review]
1235395_4.patch
Attachment #8702420 - Attachment is obsolete: true
Attachment #8702420 - Flags: review?(LpSolit)
Attachment #8702430 - Flags: review?(LpSolit)
(Assignee)

Comment 4

a year ago
Created attachment 8702436 [details] [diff] [review]
1235395_5.patch

Fixed recursive import error
Attachment #8702430 - Attachment is obsolete: true
Attachment #8702430 - Flags: review?(LpSolit)
Attachment #8702436 - Flags: review?(LpSolit)

Comment 5

a year ago
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+

Updated

a year ago
Flags: approval5.0?
(Assignee)

Updated

a year ago
Flags: approval5.0? → approval5.0+
(Assignee)

Comment 6

a year ago
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
   15cc087..26a693a  5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED

Comment 7

a year ago
Hi,

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

Can any one help me out

Bugzilla version :- 5.0.2

Comment 8

a year ago
@abhishek: As your issue is likely not related to this specific bug report, please see http://www.bugzilla.org/support/ - Thanks!

Comment 9

a year ago
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

Comment 10

a year ago
Dear Ander,

Can you suggest how to resolve the issue ?

I am waiting for your valuable feedback.

Thanks

Comment 11

a year ago
Please see comment 8 again for venues. Your problem is off-topic for this bug report. Thanks.

Comment 12

a year ago
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.

Comment 13

a year ago
Issue Resolved,

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