Refactor Job class to reduce internal state
Context
This is dependent on the work done in !190 (merged) to create DataStoreInterface
.
That MR already persists any state changes into some implementation of this interface. We should also work to simplify the Job
class to interact with the same data store rather than storing a copy in memory just to enable things like finding operations for the job.
Task Description
-
Refactor Job
to have less internal state, and interact with the configured data store for some operations- It might make sense to retain some things as internal state here for the sake of speed, since it doesn't impact being able to share state across multiple instances of BuildGrid
Acceptance Criteria
Complex stateful interactions, such as querying for related operations, in Job
are performed via the interface rather than on some instance-specific state.