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

RESOLVED FIXED

Status

Release Engineering
Mozharness
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: whimboo, Assigned: whimboo)

Tracking

unspecified
Dependency tree / graph

Firefox Tracking Flags

(firefox45 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
Created attachment 8690796 [details] [diff] [review]
Patch v1
Attachment #8690796 - Flags: review?(jlund)

Comment 2

2 years ago
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+
(Assignee)

Comment 3

2 years ago
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
(Assignee)

Comment 4

2 years ago
Try is passing, so I'm going to land the patch on inbound.

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dd4d0cb00f43
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.