Closed Bug 1227102 Opened 9 years ago Closed 9 years ago

tooltool_fetch() should download tooltool if instructed via the config and not try to examine the query_exe() result

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Tracking Status
firefox45 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

The current behavior of tooltool_fetch() is strange. If a download has been requested via the config settings it will not always be done. In case query_exe() returns something it magically takes the first command. Here we can fail kinda badly if the config returns something like [sys.executable, 'tooltool.py']. See bug 1227079 for details.

https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/tooltool.py#52

So my proposal here is that:

1. We enforce the download and usage of the downloaded tooltool if 'download_tooltool' is set to True
2. Given that we have a Python script in those cases we will have problems in running it on Windows (bug 1227079) so maybe sys.executable should be used as real command.

I will upload a patch in a moment.
Attached patch Patch v1Splinter Review
Attachment #8690796 - Flags: review?(jlund)
Comment on attachment 8690796 [details] [diff] [review]
Patch v1

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

hmm, yeah I agree, if download_tooltool == true, we should fetch it and not try to use one that is returned from query_exe. regardless if the logic returns a valid tooltool.py from query_exe or exposes a bug and just returns the python interpreter, ha!
Attachment #8690796 - Flags: review?(jlund) → review+
To ensure we don't break anything I just submitted this patch to try and run a small number of tests which actually make use of the query_minidump_stackwalk() method, which itself requires tooltool:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=68c239f64e7e
Try is passing, so I'm going to land the patch on inbound.
https://hg.mozilla.org/mozilla-central/rev/dd4d0cb00f43
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: