Closed Bug 1474869 Opened 6 years ago Closed 6 years ago

mach try fuzzy doesn't work correctly with multiple checkouts

Categories

(Testing :: General, enhancement, P3)

Version 3
enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jgraham, Assigned: gabriel-v)

References

Details

Attachments

(1 file, 1 obsolete file)

If one has two checkouts of the source tree, the task cache for mach try fuzzy isn't correctly invalidated. This is because (I assume; I didn't check the code) if tree A adds a task relative to tree B, `mach try fuzzy` in tree B will generate a cache file which appears to be valid for tree A (since the mtime will be greater the mtime of the taskcluster/ci directory in trees A and B), and therefore try builds in tree A will use the smaller taskset in tree B.

This could be fixed by caching based on the commit that last changed the tasks rather than using timestamps (although obviously supporting both git and hg) or maybe by using mtime + working tree path.
Priority: -- → P3
Attachment #8996981 - Flags: review?(gbrown)
Assignee: nobody → tvijiala
See Also: → 1480187
Attachment #8996981 - Attachment is obsolete: true
updated try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9e98fc263711fc7131f863a4bca70bd7e7645dc3

Note that the commit message for that try push is wrong (says 'again' instead of 'fuzzy'), but the bug number and patch are the intended ones.
Status: NEW → ASSIGNED
Comment on attachment 8997854 [details]
Bug 1474869 - Fix mach try fuzzy when using multiple source checkouts.

https://reviewboard.mozilla.org/r/261566/#review269090

Lgtm.

We should probably solve the "where to store srcdir specific state" a little more generally, but that is definitely follow-up fodder.

::: tools/tryselect/tasks.py:53
(Diff revision 1)
> -    cache_dir = os.path.join(get_state_dir()[0], 'cache', 'taskgraph')
> +    root_hash = hashlib.sha256(os.path.abspath(root)).hexdigest()
> +    cache_dir = os.path.join(get_state_dir()[0], 'cache', root_hash, 'taskgraph')

Please delete the old `taskgraph` directory if it exists (no point in moving this one).
Attachment #8997854 - Flags: review?(ahal) → review+
Keywords: checkin-needed
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4d90ecbd2cb4
Fix mach try fuzzy when using multiple source checkouts. r=ahal
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/4d90ecbd2cb4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: