Skip to content

Prevent and warn about applying a template that has unavailable versions

backend#1408 (closed) will prevent applying a template that has unavailable versions. This can become a common issue as many templates have versions whose Docker images have been cleaned up automatically.

The template details view could include a is-warning notification stating that this template has unavailable versions, or each version could have a icon showing the problem. The template selection modal could disable its Apply button to prevent the user from applying such an invalid template.

The existing TemplateDetails component loads the WorkerVersions related to the template, so it does have access to their state and can detect the issue. The TemplateSelection component, which shows the template selection modal, uses the TemplateDetails component and therefore also can detect the issue without making any extra API requests.