Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79867

Trivial changes in qt5 docker provisioning scripts, require synchronised changes in qtbase

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.13
    • Network
    • None
    • Linux/X11

    Description

      Trivial changes in qt5 provisioning scripts, require synchronised changes in qtbase, making the process painful and fragile.

      This happens because network tests in qtbase fail when the Dockerfile for the docker network test servers is changed in qt5 repository, because the docker build command during provisioning generates a different "tag" for the docker image, which is not found in the make check phase.

      Example

      I did this small change in provisioning:

      --- a/coin/provisioning/common/shared/testserver/apache2/Dockerfile
      +++ b/coin/provisioning/common/shared/testserver/apache2/Dockerfile
      @@ -4,4 +4,5 @@ RUN apt-get update && apt-get install -y $packages && dpkg -l $packages
       EXPOSE 80 443
       
       # install configurations and test data
      -RUN wget https://tools.ietf.org/rfc/rfc3252.txt
      +RUN  wget http://ci-files01-hki.intra.qt.io/input/docker/rfc3252.txt \
      +  || wget https://tools.ietf.org/rfc/rfc3252.txt
      

      I got this error during testing of qtbase:

      agent:2019/11/06 11:36:42 build.go:484: Executing instruction 686 of 1135 - RunQtUnitTest
      agent:2019/11/06 11:36:42 build.go:600: Running tests in directory /home/qt/work/qt/qtbase/tests/auto/network/access/qnetworkreply/test
      agent:2019/11/06 11:36:42 runner.go:72: Generating test results with TESTARGS=-o /home/qt/work/testresults/tests/auto/network/access/qnetworkreply/test005411699,xml -o -,txt
      agent:2019/11/06 11:36:42 build.go:329: [make check -j1] 900 900
      agent:2019/11/06 11:36:42 build.go:220: testserver: docker-compose version 1.24.1, build 4667896b
      agent:2019/11/06 11:36:43 build.go:220: env TEST_DOMAIN=test-net.qt.local docker-compose -f /home/qt/work/qt/qtbase/tests/testserver/docker-compose.yml up --detach --force-recreate --timeout 1 vsftpd apache2 ftp-proxy danted squid && make -f Makefile check_network && env TEST_DOMAIN=test-net.qt.local docker-compose -f /home/qt/work/qt/qtbase/tests/testserver/docker-compose.yml down --timeout 1
      agent:2019/11/06 11:36:44 build.go:220: Creating network "testserver_default" with the default driver
      agent:2019/11/06 11:36:44 build.go:220: Pulling apache2 (qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13)...
      agent:2019/11/06 11:36:45 build.go:220: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
      agent:2019/11/06 11:36:45 build.go:220: 
      agent:2019/11/06 11:36:45 build.go:220: Continue with the new image? [yN]pull access denied for qt-test-server-apache2, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
      agent:2019/11/06 11:36:46 build.go:220: Makefile:326: recipe for target 'check' failed
      agent:2019/11/06 11:36:46 build.go:220: make: *** [check] Error 1
      agent:2019/11/06 11:36:46 build.go:253: Process finished with error: exit status 2
      agent:2019/11/06 11:36:46 build.go:223: Error reading from stdout/err: exit status 2
      

      This happened because of the following lines in qtbase file /tests/testserver/docker-compose.yml:

      services:
          apache2:
              image: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13
      

      This SHA1 hash is called a tag, and changes every time we change the contents of the Dockerfile in provisioning.

      This happens only because we choose to calculate the tag, based on the contents. We could stabilise the tag name to "v1" or something. I'm open to other solutions that would ease changes in the Dockerfiles and the docker images, without needing cross-repo synchronisation.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jimis Dimitrios Apostolou
              jimis Dimitrios Apostolou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes