Skip to content

New endpoint to showcase a recommended worker version

Refs https://redmine.teklia.com/issues/9420

A new endpoint named RetrieveRecommendedWorkerVersion exposed as /api/v1/workers/:uuid/versions/recommended/ must serialize a single worker version using WorkerVersionCreateSerializer (same as WorkerVersionList).

To pick the recommended worker version, you'll need to make consecutive queries on the worker versions from the specified worker, to return by order of preference:

  1. most recent version with branch=master or branch=main
  2. query all worker versions with a tag and sort them by semantic versioning, returning the highest version (the endpoint return 0.3.4 rather than 0.1.0)

If no version is found, raise a 404