axem-solutions / dem

Containerized Development Environment Manager for embedded development
Other
95 stars 15 forks source link

[BUG] During the installation of a Dev Env, the tool image can't be pulled, if the image's registry is not available #202

Closed janosmurai closed 1 month ago

janosmurai commented 3 months ago

Problem description

The user can’t install a Dev Env that requires a tool image located in a registry, which is not added to DEM. Meaning, for example, if someone would like to install a Dev Env from axem’s open catalog, they also must add the registries that are not yet added.

How to reproduce the issue

  1. Add the crops repository: dem add-reg crops https://registry.hub.docker.com

  2. Create a new Dev Env: dem create yocto

  1. Delete the crops repo: dem del-reg crops

  2. Install the Dev Env: dem install yocto

Now you should see the following error: Platform error: The crops/poky:ubuntu-22.04 image is not available.

Output of dem info yocto: image

When trying to modify the Dev Env (dem modify yocto):

The crops/poky:ubuntu-22.04 is not available anymore. By continuing, the missing tool images will be removed from the Development Environment. [y/N]:

Expectations

Make it possible to install the Dev Env without the catalogs

This is possible because Dev Env descriptors contain the registries where the images are stored.

This approach is problematic though, because if the user would like to modify the Dev Env, all the required images with repositories not added to DEM will report an error.

The solution for this problem: When the user tries to modify a Dev Env that requires images from unknown registries, DEM should ask the user if they want to add it or not. (This should be implemented in another issue.)

The user should be able to install the Dev Env even if a repo is not added. However, this should be noted as a warning.


For axem internal use only: Jira: https://axem.atlassian.net/browse/DEM-283