Uploaded image for project: 'Zapped: AcousticBrainz'
  1. Zapped: AcousticBrainz
  2. AB-383

AB Jenkins tests don't run with new docker-compose

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      New versions of docker and/or docker-compose name containers as project_service_containerid, whereas older versions just included an incrementing number instead of the containerid. This means that our script to copy test results from jenkins no longer works because it assumes that the container name just ends in a number:

      https://github.com/metabrainz/acousticbrainz-server/blob/master/docker/jenkins-test.sh#L12

      This results in an error such as: https://ci.metabrainz.org/job/acousticbrainz-server/364/console
      Error response from daemon: No such container: jenkinsbuildjenkinsacousticbrainzserver364_acousticbrainz_run_1
      Stopping jenkinsbuildjenkinsacousticbrainzserver364_redis_1 ...
      Stopping jenkinsbuildjenkinsacousticbrainzserver364_db_1 ...
      
      Stopping jenkinsbuildjenkinsacousticbrainzserver364_redis_1 ... done
      
      Stopping jenkinsbuildjenkinsacousticbrainzserver364_db_1 ... done
      Removing jenkinsbuildjenkinsacousticbrainzserver364_acousticbrainz_run_77ae4abb29ba ...

      Note that the expected container name for copying the test results is different to the actual container name.

      We should either:
      1. use docker-compose run --name to specify a specific expected container name when running the tests
      2. use docker-compose ps to automatically determine the name of the container when copying results
      3. bind mount a folder from the host into the container to save results instead of using docker cp

      This likely will affect other services which we test with jenkins too (MsB, CB), but we've not seen these failures yet.

            iliekcomputers Param Singh
            alastairp Alastair Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package