Closed Bug 1016929 Opened 10 years ago Closed 9 years ago

[mozlog] html formatter imports py.xml, doesn't declare it as a dependency

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox38 fixed)

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: ted, Assigned: parkouss)

References

Details

Attachments

(1 file)

We should either add the dependency or change the code to use some built-in module instead.
I remember there was a problem with making this module a dependency in marionette, but I don't clearly remember what it was.
It was from https://bugzilla.mozilla.org/show_bug.cgi?id=950098 and was because we didn't want to add an external python dependency. We ended up pulling in the _xmlgen.py file in tree.
So should we do the same in mozlog as we did in marionette-client? I've just tried switching some of the Gaia UI tests to use the new HTML formatter and hit this issue in CI.
Flags: needinfo?(james)
Yeah, so optional dependencies are a pain.

We can fix this without pulling everything into mozlog directly e.g. putting the py package on internal pypi (I guess it is already) and ensure that it's marked as a dep in the mozharness script.
Flags: needinfo?(james)
Summary: [mozlog.structured] html formatter imports py.xml, doesn't declare it as a dependency → [mozlog] html formatter imports py.xml, doesn't declare it as a dependency
Hi,

I talked with Dave on irc, and it seems that a a solution is to do the same thing done for marionette runner, copy the source code needed: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/mixins/xmlgen.py.

We could copy (again!) this file in the html formatter folder, so the dependency won't be required anymore.

jgraham, is this solution OK for you ?
Flags: needinfo?(james)
I guess it works. I don't really like it but it's hard to come up with a better approach given the constraints.
Flags: needinfo?(james)
(In reply to James Graham [:jgraham] from comment #6)
> I guess it works. I don't really like it but it's hard to come up with a
> better approach given the constraints.

Yes, I totally agree - I don't like it neither. I don't really know every constraints here but this seems quite complicated. The bug is open since a few month and seems to annoy Dave. :) Well I take it.
Assignee: nobody → j.parkouss
I tested it locally with success. The xmlgen.py file is an exact copy of the one in marionette.
Attachment #8559248 - Flags: review?(james)
Comment on attachment 8559248 [details] [diff] [review]
html formatter imports py.xml, doesn't declare it as a dependency

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

Sigh.

Thanks for doing this though :)
Attachment #8559248 - Flags: review?(james) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7f306c27bc07
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: