Closed Bug 1302215 Opened 8 years ago Closed 7 years ago

Better support for task serialization and un-serialization

Categories

(Firefox Build System :: Task Configuration, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: bstack)

References

Details

Tasks are serialized by building a JSON object out of some of their properties. They are un-serialized using a `from_json` class method, but that method often lacks the context it needs to completely restore the object. In particular, it is usually missing dependencies and context necessary for optimization. My thinking is: * make optimization a dispatch-driven process (with e.g., a "files_changed" function and a "indexed_docker_image" function) * make task enumeration a function call, rather than a class method -- this is the "meat" of most custom task implementations anyway * remove use of a class hierarhcy for tasks at all -- just use a single Task class that ties all of this together and knows how to JSON/un-JSON itself.
The class hierarchy I built is rooted in `taskcluster/taskgraph/task/base.py` with the subclasses in sibling files to that one. The most interesting one is in `transform.py`, but `docker_image.py` is cool too. These classes are referred to from `taskcluster/ci/*/kind.yml`.
Assignee: dustin → bstack
This has long since been fixed..
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.