Skip to content

Duplicate ID attributes for every related object on a WorkerRun

When working on !1841 (merged), I found that ListWorkerRun, CreateWorkerRun, RetrieveWorkerRun, UpdateWorkerRun and PartialUpdateWorkerRun all have the worker version ID, process ID, model version ID and worker configuration ID duplicated:

{
  "worker_version_id": "...",
  "worker_version": {
    "id": "...",
    // ...
  },
  "model_version_id": "...",
  "model_version": {
    "id": "...",
    // ...
  },
  "process_id": "...",
  "process": {
    "id": "...",
    // ...
  },
  "configuration_id": "...",
  "configuration": {
    "id": "...",
    // ...
  },
  // ...
}

This is visible in the API docs. This does not affect DB performance; it is just quite strange and probably means some write_only=True are missing.

It is almost certain that the frontend uses at least one of those attributes; this needs to be checked on other projects too.