Remove the intermediate objects used for WorkerRun and WorkerConfiguration components
The old d3-based graph used some computed properties that generated objects that had the following structure:
{
// Type of the worker of the version of the run. Can be accessed from a WorkerRun via run.worker.type
type: string,
// Name of the worker of the version of the run. Can be accessed from a WorkerRun via run.worker.name
name: string,
// UUID of the run. **Not a slug!** Can be accessed from a WorkerRun via run.id
slug: string,
// UUIDs of the runs that this run depends on. **Not slugs!** Can be accessed from a WorkerRun as run.parents, as an array of UUIDs instead of objects.
parents: { slug: string }[],
// UUID of the worker of the version of the run. Can be accessed from a WorkerRun via run.worker_id
workerId: string,
// UUID of the version of the run. Can be accessed from a WorkerRun via run.worker_version_id
workerVersionId: string,
// UUID of the WorkerConfiguration of the run. Can be accessed from a WorkerRun via run.configuration_id
configurationId: string,
// Not used by any component. Can be accessed from a WorkerRun via run.model_version_id
modelVersionId: string
}
The d3 graph was originally built for nothing but Ponos tasks, and not generic enough to handle other objects. It was added to the process configuration page and the template details without any changes made to it, and instead the nodes
computed property was created with lots of weird values in it.
The slug
values were used by the graph as unique IDs, and displayed only when a name
was not available. By always setting a name, the slug always stays hidden and we got away with having UUIDs as slugs.
The property got all the extra foreign keys that add nothing useful to the actual graph because it started to be used by other components, particularly WorkerRunWithParents
. The graph just ignored them, so everything was fine, right?
The new graph component uses a much more generic construction that just assumes it has to display nodes, and nothing any more specific, so we can remove this computed property entirely and have all the relevant components start using the store.
This will affect the following components:
-
Process/Workers/WorkerRunWithParents
— Usesslug
(the run ID),parents
andconfigurationId
-
Process/Configurations/List
— Usesname
,slug
andworkerId
, and causes a mess in !1333 (merged) -
Process/Configurations/Form
— UsesworkerId
andworkerVersionId
-
Process/Workers/WorkerTag
— Usesslug
,name
,type
andworkerVersionId