Migration Guide#
This page can help when migrating Taskgraph across major versions.
6.x -> 7.x#
Upgrade to Python 3.8 or higher
Ensure
root_dirnow points totaskclusterinstead oftaskcluster/ci. Typically this value is not passed in explicitly by consumers, but updates are likely required if you have custom code that uses any of the following objects: *taskgraph.config.GraphConfig*taskgraph.config.load_graph_config*taskgraph.generator.TaskGraphGenerator*taskgraph.generator.load_tasks_for_kinds* The-r/--rootflag on thetaskgraphbinaryRename the
run_job_usingdecorator torun_task_usingMove
config.ymlfromtaskcluster/citotaskclusterRename the
taskcluster/cidirectory totaskcluster/kindsReplace references to
taskgraph.transforms.jobwithtaskgraph.transforms.runReplace references to
taskgraph.transforms.release_notificationswithtaskgraph.transforms.notifyReplace references to
taskgraph.target_tasks._target_taskwithtaskgraph.target_tasks.register_target_taskStop using or inline
taskgraph.util.decision.make_decision_taskStop using the
decision-mobiledocker imageEnsure MacOS workers that need Mercurial have
hgon theirPATH
5.x -> 6.x#
Replace all uses of
command-context` with the more generalized ``task-context
4.x -> 5.x#
Upgrade to Python 3.7 or higher
3.x -> 4.x#
Remove all uses of the
disable-seccompkey in theworkersection of task definitions.
2.x -> 3.x#
Use a decision image at least as recent as this one.
Rename
config.kind_dependencies_taskstoconfig.kind_dependencies_tasks.values().Rename
vcs.head_reftovcs.head_rev.vcs.head_refstill exists but points to the actual reference instead of the revision.Rename
vcs.base_reftovcs.base_rev. Same rationale as above.
1.x -> 2.x#
For all kinds using the
transform loader, rename the following keys in both thekind.ymlfile and any files referenced injobs-from:jobs -> tasks jobs-from -> tasks-from job-defaults -> task-defaults
Rename
taskgraph.util.schema.WHITELISTED_SCHEMA_IDENTIFIERStotaskgraph.util.schema.EXCEPTED_SCHEMA_IDENTIFIERS.Rename any instances of
taskgraph.optimize.Eithertotaskgraph.optimize.Any.Add a
deadlineparameter as the third argument to any custom optimization strategies’should_replace_task()function. For migration purposes it doesn’t need to be used.Replace
taskgraph.util.taskcluster.status_taskwithtaskgraph.util.taskcluster.state_task.