Closed
Bug 1306503
Opened 9 years ago
Closed 5 years ago
Add support for logspam utility in mach
Categories
(Firefox Build System :: Mach Core, enhancement)
Firefox Build System
Mach Core
Tracking
(firefox52 wontfix, firefox81 fixed)
RESOLVED
FIXED
81 Branch
People
(Reporter: erahm, Assigned: erahm)
Details
Attachments
(2 files, 4 obsolete files)
I'd like to integrate the logspam tool into mach.
The commands would be something like:
- |mach logspam report| - Generates an overall report of log spamminess
- |mach logspam file| - Files a bug for a specific spammy warning
- |mach logspam bisect| - Performs bisection to determine when the spammy warning was introduced
I'll probably keep the logspam tool hosted in github for now and package it via pypi. Integration would be similar to mozregression.
I'm not hard set on the naming, open to suggestions.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → erahm
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 7•9 years ago
|
||
mozreview-review |
Comment on attachment 8796368 [details]
Bug 1306503 - Allow mach subcommands to have a parser.
https://reviewboard.mozilla.org/r/82244/#review81094
Attachment #8796368 -
Flags: review?(gps) → review+
Comment 8•9 years ago
|
||
mozreview-review |
Comment on attachment 8796369 [details]
Bug 1306503 - Properly handle printing help for subcommands with parsers.
https://reviewboard.mozilla.org/r/82246/#review81098
Attachment #8796369 -
Flags: review?(gps) → review+
Comment 9•9 years ago
|
||
mozreview-review |
Comment on attachment 8796370 [details]
Bug 1306503 - Split out a reusable pypi tool class.
https://reviewboard.mozilla.org/r/82248/#review81100
I didn't know this is how mozregression loaded itself into mach. I'm both impressed and terrified. Nifty little hack.
::: tools/mach_commands.py:310
(Diff revision 2)
> os.chmod(temp, os.stat(temp).st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
> os.rename(temp, target)
> return target
>
> -def mozregression_import():
> - # Lazy loading of mozregression.
> +
> +class PypiBasedTool:
class PypiBasedTool(object):
The `(object)` makes it a "new style class." This isn't needed in Python 3, fortunately. But we run Python 2.7 :/
Attachment #8796370 -
Flags: review?(gps) → review+
Comment 10•9 years ago
|
||
mozreview-review |
Comment on attachment 8796371 [details]
Bug 1306503 - Add logspam mach commands.
https://reviewboard.mozilla.org/r/82250/#review81102
I'm going to leave r? on this so I can think about it.
I like what logspam is doing. But I question whether a new mach command for analyzing logs is needed. We already have a `mach show-log` command. It defaults to printing the log of the last mach command. I think there is room to hang the logspam functionality off this command. I would also entertain adding a `mach log` command that had subcommands for various functionality, including logspam.
Assignee | ||
Comment 11•9 years ago
|
||
mozreview-review-reply |
Comment on attachment 8796371 [details]
Bug 1306503 - Add logspam mach commands.
https://reviewboard.mozilla.org/r/82250/#review81102
https://github.com/EricRahm/log-spam-hell/issues/1
Comment 12•9 years ago
|
||
Since I wrote that comment, mach's logging facility has become slightly more useful. For example, since I wrote that, mach now records logs for the last executed command automatically.
Assignee | ||
Comment 13•9 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #12)
> Since I wrote that comment, mach's logging facility has become slightly more
> useful. For example, since I wrote that, mach now records logs for the last
> executed command automatically.
Sorry for being terse, I was on a mobile device, also I think I misinterpreted what you meant.
To clarify I think there are a couple of use cases:
#1 - Sheriffs - Make it easy for sheriffs to run after m-c merges have completed testing
#2 - mach try - Make it easy for devs to run after a try push has completed testing (currently it's "hey erahm I autolanded this, did it fix it?")
I like the idea of being able to run against a local log too, but that's not baked in. Currently it expects to need to download the logs from S3 (by way of treeherder).
The point I probably confused is that you think it could hang under |mach log| or something rather than |mach logspam| vs we don't need this at all. That's fine with me, I don't particularly care what it's called.
Comment 15•9 years ago
|
||
mozreview-review |
Comment on attachment 8796371 [details]
Bug 1306503 - Add logspam mach commands.
https://reviewboard.mozilla.org/r/82250/#review86576
Attachment #8796371 -
Flags: review?(gps) → review+
Comment 16•9 years ago
|
||
I gave you r+ and am fine landing as is. We can always refactor it later. As long as there is good help output.
Sorry for the delay. I was away on a business trip and holiday.
Flags: needinfo?(gps)
Comment 17•8 years ago
|
||
Too late for firefox 52, mass-wontfix.
Updated•7 years ago
|
Product: Core → Firefox Build System
Assignee | ||
Comment 18•5 years ago
|
||
Realistically I'm not going to get to this, but it'd be nice if someone did and got a periodic job running. I'm happy to provide feedback and guidance.
Assignee: erahm → nobody
Assignee | ||
Updated•5 years ago
|
Attachment #8796368 -
Attachment is obsolete: true
Assignee | ||
Comment 19•5 years ago
|
||
This splits out the pypi tool logic baked into the mozregression command. It
will be reused for the logspam command.
Updated•5 years ago
|
Assignee: nobody → ericrahm+bz
Status: NEW → ASSIGNED
Assignee | ||
Comment 20•5 years ago
|
||
This adds support for invoking the |mach logspam {report|file|bisect}|
commands. The core logic from the pypi base command is reused.
Depends on D85492
Assignee | ||
Updated•5 years ago
|
Attachment #8796369 -
Attachment is obsolete: true
Assignee | ||
Updated•5 years ago
|
Attachment #8796370 -
Attachment is obsolete: true
Assignee | ||
Updated•5 years ago
|
Attachment #8796371 -
Attachment is obsolete: true
Comment 21•5 years ago
|
||
Pushed by erahm@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f7489fb2f2e
Split out a reusable pypi tool class. r=firefox-build-system-reviewers,mhentges,rstewart
https://hg.mozilla.org/integration/autoland/rev/de4550dedea6
Add logspam mach commands. r=firefox-build-system-reviewers,mhentges,rstewart
Comment 22•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8f7489fb2f2e
https://hg.mozilla.org/mozilla-central/rev/de4550dedea6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox81:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•