Skip to content

Worker update endpoints

Erwan Rouchet requested to merge worker-update into master

Requires !2189 (merged), closes #1644 (closed)

  • The serializers have been reorganized to let the special handling in CreateWorker be separate from the rest of the APIs and make the update endpoint easier to implement.

  • I added Worker.description to RetrieveWorker since it wasn't exposed anywhere yet.

  • Unlike with CreateWorker, [Partial]UpdateWorker does not automatically create a WorkerType if it does not exist, since that wasn't required anywhere in the original issues. We could have some generic code for both creation and updates that tries to handle this though.

  • The ListRepositories and RetrieveRepository endpoint include a list of workers, and they were using the WorkerSerializer for this, which included a redundant repository_id. I made them use the WorkerLightSerializer instead, which does not include the repository_id or the description. The only code using this workers list is the frontend, where only the ID and name are used, so it doesn't matter.

Merge request reports

Loading