Closed Bug 274650 Opened 20 years ago Closed 20 years ago

checksetup flag fixup code outputs without checking silent mode

Categories

(Bugzilla :: Administration, task)

2.19
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: myk, Assigned: Wurblzap)

Details

Attachments

(1 file, 2 obsolete files)

In silent mode checksetup should be silent, but the fix for bug 274428, which
corrects flag type names with commas or spaces, doesn't pay attention to the
$silent boolean.  It should do so by appending "unless $silent" to print statements.
Flags: blocking2.20?
Flags: blocking2.18?
Attached patch Patch (obsolete) — Splinter Review
Right. I should have observed that.
Assignee: Nick.Barnes → wurblzap
Status: NEW → ASSIGNED
Attachment #168761 - Flags: review?
My mistake; I'm not used to $silent yet.  Sorry.
Whiteboard: patch awaiting review
Comment on attachment 168761 [details] [diff] [review]
Patch

Looks good, r=myk.  Thanks for the quick patch!
Attachment #168761 - Flags: review? → review+
Flags: approval2.18+
Flags: approval+
Comment on attachment 168761 [details] [diff] [review]
Patch

$silent only applies to progress information.  Errors and warnings and
announcements of changes to the database *SHOULD* be displayed, even in silent
mode, which applies to most of this text.  The point of silent mode was to
prevent needless cron mail when running checksetup.pl from a cron job.	If
changes are made to the database, I *want* mail from cron telling me about it.
Attachment #168761 - Flags: review-
Flags: approval2.18+
Flags: approval+
To clarify that, any text which is printed regardless every time checksetup.pl
is run should use "unless $silent".  Any text which announces an error being
corrected, or information that the operator should know, should be displayed
even if in silent mode, provided that the message will go away either as a
result of the change or when the problem being reported to the operator is
corrected.
This patch should be good, then.
Attachment #168761 - Attachment is obsolete: true
Attachment #168864 - Flags: review?
Comment on attachment 168864 [details] [diff] [review]
Breaking silence when fixing things

>-        print "... done.\n";
>+        print "... done.\n" unless $silent;

This statement is part of the block that fixes bad flag names, so it shouldn't
ever be silent just as the other print statements in that block aren't ever
silent, per Dave's sensible criteria.

Otherwise the patch looks great.
Attachment #168864 - Flags: review? → review-
I was leaning towards filing this line as "stuff that may be silenced without
loss", but it makes sense to bless it as part of the "information that the
operator should know".
Attachment #168864 - Attachment is obsolete: true
Attachment #169061 - Flags: review?
Comment on attachment 169061 [details] [diff] [review]
Breaking silence when successfully completing repairs, too

Looks sane... just one question:

>-                        print "  ... last attempt as \"$lastchanceflagname\" still failed.'\n";
>-                        print "Rename the flag by hand and run checksetup.pl again.\n";
>+                        print "  ... last attempt as \"$lastchanceflagname\" still failed.'\n",
>+                              "Rename the flag by hand and run checksetup.pl again.\n";

Why include that? it looks like it was just a relic from when other things were
being changed.
Attachment #169061 - Flags: review? → review+
Flags: approval?
Flags: approval2.18?
let's get this freaking checked in.  I'm tired of the thrice hourly emails from
landfill ;)
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18?
Flags: blocking2.18+
Flags: approval?
Flags: approval2.18?
Flags: approval2.18+
Flags: approval+
Target Milestone: --- → Bugzilla 2.18
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.320; previous revision: 1.319
done
Checking in checksetup.pl;
/cvsroot/mozilla/webtools/bugzilla/checksetup.pl,v  <--  checksetup.pl
new revision: 1.289.2.18; previous revision: 1.289.2.17
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: patch awaiting review
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: