include the WebappVersion.id in docker image tags
The docker images names are formatted as:
<Webapp.docker_name>:<WebappVersion.number>. This is the name of the docker image as it is stored in the registry and as it is presented to the user.
This proposal is to:
- keep the same name presented to the user (
- but store them internally as
<Webapp.docker_name>:<WebappVersion.number>-id<WebappVersion.id>(with the WebappVersion.id appended)
There are multiple reasons to do that:
- this will simplify the controller, because it will no longer be necessary to track the exact state of images (when pushing/pulling from the registry) when the user updates a version (because it will have a different tag in the registry)
- this will prevent reusing images from a removed webapp (eg: a user removes a webapp, another user creates a webapp with the same name, we had at least one occurrence of this case)
- this will make easy to implement image recovery: we can keep removed images in the registry for some time (eg: 1 month) before they are really deleted
This should be done in Q3, because if we do it later, the migration will be tricky.