Closed Bug 1737853 Opened 4 years ago Closed 4 years ago

taskgraph --diff does not account for repo specific module names

Categories

(Firefox Build System :: Task Configuration, task)

task

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: ahal, Assigned: ahal)

Details

Attachments

(2 files)

When performing '--diff' we need to reload taskgraph modules in 'sys.path', otherwise changes made there across revisions won't get picked up. We do this here:
https://hg.mozilla.org/ci/taskgraph/file/tip/src/taskgraph/main.py#l395

However this neglects the consumer specific taskgraph repos which typically follow the format <project>_taskgraph as the module name. This means any changes to such modules get ignored by --diff as the module wasn't being reloaded.

As long as we can assume that the <project>_taskgraph convention holds true, we can simply change this check to mod.split(".")[0].endswith("taskgraph"). Though there's no real requirement that this convention is used. Solving this properly might involve officially registering module(s) that contain taskgraph related logic.

For now though, I think we should take the above change, as it is a clear improvement and will solve all of our current use cases.

Assignee: nobody → ahal

Previously we were only reloading the main taskgraph module. This meant that
changes to e.g, fenix_taskgraph or gecko_taskgraph were being ignored when
using --diff.

Though this still assumes that the '<project>_taskgraph' convention is used.

Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/ci/taskgraph/rev/c3b465290f7d Fix '--diff' to account for consumer specific module names, r=taskgraph-reviewers,jmaher

I forgot to update the module name in the new '--diff' feature when renaming
the module to 'gecko_taskgraph'.

This syncs the commit to standalone taskgraph here:
https://hg.mozilla.org/ci/taskgraph/rev/c3b465290f7dae51d603f29dff704f4ea17db766

Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/42358b28de12 [taskgraph] Fix '--diff' to account for new 'gecko_taskgraph' module name, r=taskgraph-reviewers,jmaher
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: