Page MenuHomePhabricator

"docker-compose build" fails in master at wdqs-frontend build step
Closed, ResolvedPublic5 Story Points

Description

Some time between July 2018 and November 2 2018, "docker-compose build" started to fail in step 8/14 (wdqs-frontend). Reproduced on Fedora Linux 29 and Windows 10 Pro; the latter with Docker CE.

Steps to reproduce (with "sudo" for the docker-compose step on Linux of course):

git clone https://github.com/wmde/wikibase-docker.git
cd wikibase-docker
docker-compose -f docker-compose-build.yml build

Looks like it's another overly specific dependency pinning error; here's the relevant snippet from the build log for current master:

Step 7/14 : WORKDIR /tmp/wikidata-query-gui-master
 ---> Running in 2d2c2e2fac6c
Removing intermediate container 2d2c2e2fac6c
 ---> b420aad6a509
Step 8/14 : RUN set -x ;     apk --no-cache add --virtual build-dependencies ca-certificates~=20171114-r0 git~=2.15.2-r0 nodejs~=8.9.3-r1 jq~=1.5-r5     && mv package.json package.json.orig     && jq 'delpaths([["devDependencies","karma-qunit"],["devDependencies","qunitjs"],["devDependencies","sinon"]])'         > package.json < package.json.orig     && npm install     && rm -rf /usr/share/nginx/html     && mv /tmp/wikidata-query-gui-master /usr/share/nginx/html     && rm -rf /tmp/*     && rm -rf ~/.npm     && apk del build-dependencies
 ---> Running in 878d99e1e588
+ apk --no-cache add --virtual build-dependencies ca-certificates~=20171114-r0 git~=2.15.2-r0 nodejs~=8.9.3-r1 jq~=1.5-r5
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  build-dependencies-0:
    masked in: cache
    satisfies: world[build-dependencies]
ERROR: Service 'wdqs-frontend' failed to build: The command '/bin/sh -c set -x ;     apk --no-cache add --virtual build-dependencies ca-certificates~=20171114-r0 git~=2.15.2-r0 nodejs~=8.9.3-r1 jq~=1.5-r5     && mv package.json package.json.orig     && jq 'delpaths([["devDependencies","karma-qunit"],["devDependencies","qunitjs"],["devDependencies","sinon"]])'         > package.json < package.json.orig     && npm install     && rm -rf /usr/share/nginx/html     && mv /tmp/wikidata-query-gui-master /usr/share/nginx/html     && rm -rf /tmp/*     && rm -rf ~/.npm     && apk del build-dependencies' returned a non-zero code: 2

Event Timeline

dbs created this task.Nov 4 2018, 4:11 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptNov 4 2018, 4:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
dbs updated the task description. (Show Details)Nov 4 2018, 4:14 PM

You should still be able to use the image that you can download from docker hub if you don't need to customize the Dockerfile. :)
We will try to pick this up soon!

Addshore triaged this task as Normal priority.Nov 4 2018, 4:30 PM
Addshore moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.
Addshore moved this task from incoming to consider for next sprint on the Wikidata board.
Addshore moved this task from Backlog to Bugs on the Wikibase-Containers board.
Addshore moved this task from Bugs to Misc on the Wikibase-Containers board.
dbs added a comment.Nov 4 2018, 4:37 PM

Thanks @Addshore but I'm trying to work on the 1.31 Wikibase images again, and as those aren't available on Docker hub yet, I need to build them myself. I'll poke at the dependencies to see if I can come up with a fix similar to how other dependencies were made a little more flexible in commit 517af99b9fbc5440

dbs added a comment.EditedNov 4 2018, 4:49 PM

git has been bumped in alpine:3.7 to git-2.15.3-r0, that's the source of the current problem. So it could be resolved by shifting to:

apk --no-cache add --virtual build-dependencies ca-certificates~=20171114-r0 git~=2.15.2-r0 nodejs~=8.9.3-r1 jq~=1.5-r5

but that's likely to be fragile and will break with the next upstream change. The following does work:

apk --no-cache add --virtual build-dependencies ca-certificates=\<20190101 git=\<2.16.0 nodejs=\<8.10.0 jq=\<1.6

I put this change into the commit at https://github.com/dbs/wikibase-docker/commit/d4473342e899f068d47a0edd1c23179666c68b96 if that's of any use.

dbs updated the task description. (Show Details)Nov 4 2018, 5:33 PM

Task breakdown discussion:

  • Figure out which version of the package disappeared and made the build break
  • Why can't we pin to a specific nginx image, instead of latest, as then this wouldn't break underneath us.

If we can pin to a specific nginx image:

  • pin to it... & pin the package versions

If we can't:

  • Just update the versions as in T208681#4718810 and expect this to break underneath us again
Restricted Application added a project: User-Addshore. · View Herald TranscriptNov 12 2018, 3:56 PM
Addshore moved this task from Misc to Review on the Wikibase-Containers board.Nov 12 2018, 5:39 PM

PR can be found @ https://github.com/wmde/wikibase-docker/pull/51

I ended up fixing a few / bunch of other stuff at the same time.

The commit for this ticket is actually https://github.com/wmde/wikibase-docker/pull/51/commits/1b5bdae0a27cadb059397221773ca77d5edb10f9