Closed Bug 1731178 Opened 3 years ago Closed 3 years ago

Explicitly set `tgdiff` task's parent revision to compare against

Categories

(Firefox Build System :: Task Configuration, task)

task

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(4 files)

The tgdiff task is currently relying on mozversioncontrol's base_ref value to determine the parent commit to compare against. I wasn't sure how this would behave on autoland, and it turns out it compares the tgdiff to itself (looking at the code in hindsight, it's obvious this was not going to work).

Luckily we can also get the requisite information from json-automationrelevance, which we already download in files_changed.py. So the task can instead explicitly compare against the parent revision of the push. This does mean we'll need to use a transform, but it shouldn't be terribly hard to set up.

It was previously possible to do this via environment variable, but this seems
a little bit cleaner.

This file gets downloaded to compute the files changed in a push. Since we're
downloading (and memoizing) this anyway, let's put it in 'util/hg.py' so other
places can make use of it as well.

Depends on D125973

Since all commits on non-try branches are public, vcs.base_ref was returning
the current revision each time and the diff task was always diffing against the
same revision twice.

By using 'json-automationrelevance' to determine the parent push, we can be
sure we're always diffing against the proper revision.

Depends on D125974

Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/734195a6412a
[taskgraph] Implement ability to substitute context into 'run-task' commands, r=taskgraph-reviewers,bhearsum
https://hg.mozilla.org/integration/autoland/rev/71e49fbca9fc
[taskgraph] Move 'get_json_automationrelevance' to util/hg.py, r=taskgraph-reviewers,bhearsum
https://hg.mozilla.org/integration/autoland/rev/7195ac5cfe64
[taskgraph] Explicitly set base revision in tgdiff task, r=taskgraph-reviewers,bhearsum
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b361c8370c1
Follow-up fix for test_changed_files.py, r=releng-reviewers,jmaher,gbrown
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: