Closed Bug 794017 Opened 12 years ago Closed 12 years ago

sut_lib.py's setFlag doesn't output failures to the log

Categories

(Release Engineering :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sheriff-want])

Attachments

(1 file, 1 obsolete file)

Unlike {check.py,clientproxy.py,stop.py}, we don't log.setLevel() in sut_lib.py; so are on the default of warnings and above only.

setFlag() in sut_lib.py uses log.info, so we don't see the messages \o/
Attached patch Make setFlag use log.error (obsolete) — Splinter Review
Not sure if we want to set the logging level in the file to INFO as well (currently WARNING; the other sut_tools files use either INFO or DEBUG), but either way, setFlag is used for failures, so log.error() makes sense here regardless.
Attachment #664420 - Flags: review?(bugspam.Callek)
Blocks: 746283, 749863
Comment on attachment 664420 [details] [diff] [review]
Make setFlag use log.error

Review of attachment 664420 [details] [diff] [review]:
-----------------------------------------------------------------

In theory we could/should provide meaningful stuff outside of setFlag anyway, *but* every call to setFlag [for error.flg at least] is certainly an error that we should log as an error, [and currently anything other than error.flg doesn't specify contents in its setFlag call] so fine by me here.
Attachment #664420 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 664420 [details] [diff] [review]
Make setFlag use log.error

http://hg.mozilla.org/build/tools/rev/034cf22b226f
Attachment #664420 - Flags: checked-in+
Summary: sut_lib.py's setFlag uses log.info for failure messages but leaves logging level at default of warnings → sut_lib.py's setFlag uses log.info for failure messages when logging level is warnings and above only
(In reply to Ed Morley [:edmorley UTC+1] from comment #1)
> Not sure if we want to set the logging level in the file to INFO as well
> (currently WARNING; the other sut_tools files use either INFO or DEBUG)

Will leave this to the patch in bug 781341.
And this is now deployed to production.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Bah, whilst log.error now matches the warning level, it's still not ending up in the log, eg:
https://tbpl.mozilla.org/php/getParsedLog.php?id=15546197&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=15546298&tree=Fx-Team

After discussing on IRC, we should just s/log.error/print/ until the patch in bug 781341 fixes logging properly.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Summary: sut_lib.py's setFlag uses log.info for failure messages when logging level is warnings and above only → sut_lib.py's setFlag doesn't output failures to the log
Sorry for the churn on this; just wish there was a way to test these on Try and not have to find out via experimentation :-)
Attachment #664420 - Attachment is obsolete: true
Comment on attachment 664878 [details] [diff] [review]
Use print rather than log.*

http://hg.mozilla.org/build/tools/rev/6cb9a38f124a

(rs+ via IRC)
Attachment #664878 - Flags: checked-in+
Callek, I don't suppose you could deploy this for me? :-)
(In reply to Ed Morley [:edmorley UTC+1] from comment #9)
> Callek, I don't suppose you could deploy this for me? :-)

Ping
(In reply to Ed Morley [:edmorley UTC+1] from comment #10)
> (In reply to Ed Morley [:edmorley UTC+1] from comment #9)
> > Callek, I don't suppose you could deploy this for me? :-)
> 
> Ping

Done on foopies 07->35 with:

if [ -z "`hg stat -R /builds/tools --modified`" ]; then hg -R /builds/tools pull -u; fi; exit

none of them had modified files in /builds/tools
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: