Page MenuHomePhabricator

Duplicate image name in docker-images/production-images
Closed, ResolvedPublic

Description

Within a set of images fed to docker-pkg, duplicates in terms of image name are not allowed.

Sadly, at some point the production-images repository got such a duplicate:
we have images to build with strech and with buster that are both called "golang", and this causes docker-pkg to become unusable if we need to act on them:

  • build works because of a concurrency bug, and will build the images correctly; but if we have any image in the same repo that depends on one of the two, the build chain won't work.
  • the helper image_tag won't work, as {{ "golang" | image_tag}} wouldn't know which tag to pick
  • The other functions won't work correctly, because they don't share the same concurrency bug with build, for instance:
production-images (master=)$ docker-pkg -c config.yaml update --reason test "*golang*" images 
== Step 0: scanning /home/joe/Code/WMF/operations/docker-images/production-images/images
/home/joe/venv/docker-pkg/lib/python3.9/site-packages/python_debian-0.1.38-py3.9.egg/debian/changelog.py:496: UserWarning: Found eof where expected more change data or trailer
  warnings.warn(message)
Traceback (most recent call last):
  File "/home/joe/venv/docker-pkg/lib/python3.9/site-packages/docker_pkg-2.1.0-py3.9.egg/docker_pkg/builder.py", line 262, in _process_dockerfile_template
    return ImageFSM(root, self.client, self.config, self.nocache, self.pull)
  File "/home/joe/venv/docker-pkg/lib/python3.9/site-packages/docker_pkg-2.1.0-py3.9.egg/docker_pkg/builder.py", line 51, in __init__
    raise RuntimeError(
RuntimeError: Trying to reinstantiate the FSM for image golang

So we need to amend this situation. Solutions I see are:

  • sunset golang:1.11 completely
  • change its name to golang-stretch and modify anything that depends on it from now on.

Event Timeline

Joe triaged this task as Medium priority.

Change 655904 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[operations/docker-images/docker-pkg@master] Fix duplicate detection when running in parallel

https://gerrit.wikimedia.org/r/655904

Change 655904 merged by jenkins-bot:
[operations/docker-images/docker-pkg@master] Fix duplicate detection when running in parallel

https://gerrit.wikimedia.org/r/655904

Change 656137 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[blubber@master] Move blubber to use buster

https://gerrit.wikimedia.org/r/656137

Change 656135 had a related patch set uploaded (by Giuseppe Lavagetto; owner: Giuseppe Lavagetto):
[mediawiki/services/kask@master] Switch to use of buster, golang 1.13 as base images

https://gerrit.wikimedia.org/r/656135

Change 615683 had a related patch set uploaded (by Alexandros Kosiaris; owner: Giuseppe Lavagetto):
[operations/docker-images/production-images@master] Switch the base image to buster from stretch.

https://gerrit.wikimedia.org/r/615683

Change 656186 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[mediawiki/services/kask@master] Switch to buster

https://gerrit.wikimedia.org/r/656186

Change 656188 had a related patch set uploaded (by Alexandros Kosiaris; owner: Alexandros Kosiaris):
[blubber@master] Switch to buster and golang 1.13 for the build phase

https://gerrit.wikimedia.org/r/656188

Change 656135 merged by jenkins-bot:
[mediawiki/services/kask@master] Switch to use of buster, golang 1.13 as base images

https://gerrit.wikimedia.org/r/656135

Change 656188 merged by jenkins-bot:
[blubber@master] Switch to buster and golang 1.13 for the build phase

https://gerrit.wikimedia.org/r/656188

Change 656186 abandoned by Alexandros Kosiaris:
[mediawiki/services/kask@master] Switch to buster and golang 1.13 for the build phase

Reason:
Abandoning in favour of https://gerrit.wikimedia.org/r/c/mediawiki/services/kask/ /656135 which was already merged.

https://gerrit.wikimedia.org/r/656186

Change 656137 abandoned by Giuseppe Lavagetto:
[blubber@master] Move blubber to use buster

Reason:
the same patch written by alex was merged :)

https://gerrit.wikimedia.org/r/656137