Closed Bug 1622646 Opened 4 years ago Closed 4 years ago

Telemetry test fixture uses six.reraise incorrectly

Categories

(Toolkit :: Telemetry, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: wlach, Assigned: raphael)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1622644 +++

While fixing bug 1622637, I noticed that a telemetry test fixture was making the same mistake (passing a string as a second argument to six.reraise), which will break in weird ways with python 3:

https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/tests/integration/tests/conftest.py#221

Raphael, would you have time to look into this? Looking at the log you're much more familiar with the code (and how to properly test it) than me, you can follow the template in bug 1622637 on how to apply the fix.

Flags: needinfo?(rpierzina)

Thanks for bringing this to our attention, Will! I'll look into it.

Flags: needinfo?(rpierzina)
Assignee: nobody → rpierzina
Status: NEW → ASSIGNED

(Setting priority to take it out of triage. p1 = currently being worked on. :raphael, feel free to change as you see fit)

Priority: -- → P1

To be clear, the fix is simply changing these lines:

except Exception:
       exc, val, tb = sys.exc_info()
       reraise(exc, "Failed to trigger opening a new tab: {}".format(val), tb)

to:

except Exception as e:
    reraise(e.__class__, e.__class__("Failed to trigger opening a new tab: {}".format(e)), sys.exc_info()[2])

More examples in this iodide notebook: https://alpha.iodide.io/notebooks/4263/

Sorry for the delay, wlach. My patch is ready for review.

Pushed by rpierzina@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca053c128e60
Fix usage of six.reraise in telemetry-integration-tests; r=wlach
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: