Modal to import a worker version from YAML

Erwan Rouchet
2025-11-28T10:08:43Z

https://redmine.teklia.com/issues/12457

In the worker versions list, the Create button should be replaced with an Import button. The previous creation modal is relegated to a dropdown next to the import button, so that we don't end up with two confusing buttons.

Just like with the previous Create button, the Import button should be disabled when Worker.repository_url is set, because those imports should be controlled by a CI system or by running arkindex workers import manually from within a Git repo.

In the previous creation modal, a is-warning notification should explain that this method of creating a worker version is deprecated, and that the worker should be upgraded.

The Import button opens a new modal that allows users to import a worker version using ImportWorkerVersion. It should only include two required fields for docker_image_iid and yaml. A ❓ icon next to the YAML field's title should link to the config spec.

The modal should include its own Import button. Submitting the form or clicking this button should make an API call to ImportWorkerVersion through a new workerStore.importWorkerVersion action. This endpoint uses the new error format and field-specific errors should be shown in the form, so that YAML parsing errors in particular can be shown cleanly.