Django command to migrate worker versions towards generic one
Refs https://redmine.teklia.com/issues/3678
We'll create a new interactive django command to help instance administrators to migrate worker and their versions (for a given repository).
Steps:
- find generic worker:
- from CLI input
- find an existing worker in that repo with name generic
- ask user for UUID
- iterate over workers & their versions, excluding the generic worker
- find matching model by name
- find last model version available
- create a worker run for that model version + generic worker
- update all ML results to use that worker run + generic worker version
CLI input parameters:
-
repo_url
, required -
--generic-worker-id
, optional worker that is the target belonging to that repo