actions / runner-images

GitHub Actions runner images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inconsistent-behaviour-with-robot-docker-compose-mockserver

general-kroll-4-life opened this issue · comments

Description

I have one step in a job that uses robot framework to start containers via docker-compose, as part of an automated test suite setup. Sometimes this step (jobs.dockerbuild['Run robot mocked functional tests']) runs successfully and other times it just hangs until timeout (without timeout just hangs indefinitely until manual cancellation):

There is a fair bit going on in the test suite, including java mockservers starting up, docker compose, host network issues. That being said, my oldish macbook has no issues running this suite. The lack of visible logs makes it quite difficult to ascertain a cause.

Platforms affected

  • Azure DevOps
  • GitHub Actions

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Version: 20220717.1 for both successful and failed runs.

Builds:

Is it regression?

No

Expected behavior

The step to either repeatedly succeed or repeatedly fail, preferably with some logs visible on failure.

Actual behavior

The step sometimes seucceeding and other times failing. On failure logs are sparse at best.

Repro steps

Run the action with same commit provided in description.

Hey @general-kroll-4-life.
We will take a look at it.

@general-kroll-4-life, I was able to reproduce the same issue on my local vm . The tests got stuck because a docker container had exited. The second attempt to rerun the tests was successful.

Failed case when containers did not properly start:

CONTAINER ID   IMAGE          COMMAND                  CREATED        STATUS    PORTS     NAMES
30249fb34c3b   1ac11fe7d0ee   "/bin/sh -c '#(nop) …"   1 second ago   Created             modest_goldberg
CONTAINER ID   IMAGE          COMMAND                  CREATED        STATUS                  PORTS     NAMES
ac31afc470f1   53158c8bfa36   "/bin/sh -c 'cd ${SR…"   2 minutes ago   Up 2 minutes             affectionate_wilson
CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS                      PORTS     NAMES
ac31afc470f1   53158c8bfa36   "/bin/sh -c 'cd ${SR…"   3 minutes ago   Exited (0) 13 seconds ago             affectionate_wilson
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS         PORTS     NAMES
0680caea36b9   6b707affb801   "/bin/sh -c 'apt-get…"   10 seconds ago   Up 9 seconds             competent_driscoll
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS                     PORTS     NAMES
0680caea36b9   6b707affb801   "/bin/sh -c 'apt-get…"   15 seconds ago   Exited (0) 3 seconds ago             competent_driscoll
CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS                     PORTS     NAMES
0680caea36b9   6b707affb801   "/bin/sh -c 'apt-get…"   6 minutes ago   Exited (0) 6 minutes ago             competent_driscoll

Successful attempt:

CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS          PORTS      NAMES
5b4873095007   e3c0472b1b62      "/bin/sh -c '#(nop) ???"   3 seconds ago    Created                    nostalgic_mendel
925bd9ea43df   597a83ce24b3      "/bin/sh -c 'cd ${SR???"   3 seconds ago    Up 1 second                pedantic_davinci
925bd9ea43df   597a83ce24b3      "/bin/sh -c 'cd ${SR???"   3 minutes ago   Up 3 minutes              pedantic_davinci
925bd9ea43df   597a83ce24b3      "/bin/sh -c 'cd ${SR???"   4 minutes ago   Exited (0) 17 seconds ago              pedantic_davinci
0b6e66458366   cbcd581ca9a7      "/bin/sh -c 'apt-get???"   3 seconds ago   Up 2 seconds              quizzical_merkle
0b6e66458366   cbcd581ca9a7      "/bin/sh -c 'apt-get???"   8 seconds ago   Up 7 seconds              quizzical_merkle
CONTAINER ID   IMAGE                            COMMAND                  CREATED         STATUS         PORTS      NAMES
aabf2d496913   stackql/stackqlsrvcertificates   "bash -c 'openssl re???"   3 seconds ago   Up 2 seconds              test_credentialsgen_run_771eb48c825d
9e4bbc8407fd   stackql/stackql   "bash -c 'stackql sr???"   5 seconds ago   Up 3 seconds   5477/tcp, 0.0.0.0:5476->5576/tcp, :::5476->5576/tcp   mtls_stackqlsrv_run_ac2f2e320de2

Add a second attempt as a workaround:

    - name: Second attempt 
      if: always()
      run: |
        robot --variable EXECUTION_PLATFORM:docker test/robot/functional
        cat ./output.xml

image

Ps. I am planning to close the issue because it is not related to an image runner and can be reproduced locally. I think you could ask a help in https://github.com/robotframework/robotframework how to debug suck kind of issues. Feel free to ping me if you need any logs.