mozrunner has a lot of confusing and apparently broken code for getting version information

RESOLVED FIXED in Firefox 41

Status

Testing
Mozbase
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: wlach, Assigned: parkouss)

Tracking

({regression})

unspecified
mozilla41
regression
Points:
---

Firefox Tracking Flags

(firefox41 fixed)

Details

Attachments

(1 attachment)

Noticed this while helping Daniel work on bug 1059872. mozrunner has some code to get the version number automatically in the command line client:

http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/cli.py#66

The problem is that this code doesn't actually work. If I run mozrunner --version, here's what I get:

  (mozbase)wlach@popsicle:~/src/mozilla-central-hg$ mozrunner --version
  Usage: mozrunner [options]
  
  mozrunner: error: no such option: --version

There's a lot of hard-to-unwind code in there that seems oriented around getting metadata from the python egg, which isn't even called:

http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/cli.py#116
http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/utils.py#18

I think we should either unwind how this is supposed to work and fix the code, or just take the versioning stuff out altogether. What is it even used for? No one really uses the cli except for random testing stuff AFAIK.
Flags: needinfo?(hskupin)
Flags: needinfo?(ahalberstadt)
I did a quick test locally and all works fine with version 5.37.2. I assume the large refactoring from Andrew for mozrunner 6.0 caused this problem.
Blocks: 997244
Flags: needinfo?(hskupin)
Keywords: regression
OS: Linux → All
Hardware: x86_64 → All
(In reply to Henrik Skupin (:whimboo) from comment #1)
> I did a quick test locally and all works fine with version 5.37.2. I assume
> the large refactoring from Andrew for mozrunner 6.0 caused this problem.

Yeah, most likely. I remember Jeff and I implemented this way back in the pre-mozbase days. I can take a look into fixing it, though tbh I tend to agree with Will that it probably isn't very useful anymore (if it ever was to begin with). Especially when something like 'pip freeze' works just as well.
Flags: needinfo?(ahalberstadt)
(Assignee)

Comment 3

3 years ago
Created attachment 8617399 [details] [diff] [review]
1060940.patch

This is broken for me also. I took the chance to remove the code, as it seemed not useful for anybody.
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
Attachment #8617399 - Flags: review?(ahalberstadt)
Comment on attachment 8617399 [details] [diff] [review]
1060940.patch

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

Nice, thanks!
Attachment #8617399 - Flags: review?(ahalberstadt) → review+
https://hg.mozilla.org/mozilla-central/rev/43e94edb750b
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox41: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.