Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Docker container error in Act logs #34

Open
ianlnf opened this issue Mar 29, 2023 · 0 comments
Open

Review Docker container error in Act logs #34

ianlnf opened this issue Mar 29, 2023 · 0 comments

Comments

@ianlnf
Copy link
Contributor

ianlnf commented Mar 29, 2023

  • Running the tests locally with Act logs enabled (npm test:log) or via CI with a test-log label produces the following error in each log:

Error: failed to create container: 'Error response from daemon: Conflict. The container name "/act-missing-tests-run-41bc940be36e9046f8a3ed6448ae3ac0c37028f6abdd9ac31aa6a5627057d413" is already in use by container "d65e7aa1df28f28f6fb8767d2ff3d19c6e15899042c72339ffa024b2f64fc214". You have to remove (or rename) that container to be able to reuse that name.'

Error: Error response from daemon: get act-label-run-97d76feb368efb012d87df280240108acf3ab06e83c8882e7b025663904f7d1c-env: no such volume

However, the tests do run locally, but occasionally fail in CI.

Similar errors also occur in the official sample at https://github.com/kiegroup/github-action-build-chain linked from the act-js readme at https://github.com/kiegroup/act-js. Steps to reproduce:

  • Clone the repo at https://github.com/kiegroup/github-action-build-chain
  • Run npm i
  • Enable Act logging - export ACT_LOG=true
  • Run npm run test:e2e, some tests may fail, but inspect the generated *.log files in the root, no errors reported
  • Run npm run test:e2e again, inspect logs, contain the following error:

Error: Error response from daemon: remove act-Single-PR-build-3ea99b0953d2b30d056d7b735e2094c436739407dcb921edf2d371074426038c-env: volume is in use - [e172365745f3e221035fcdfa2751c53d9a283ecafba6913360d4201cccc7013f]

It appears Act does not stop running Docker containers after each execution, it isn't clear if this is expected behaviour. One option may be to run the Docker CLI at the end of each test to remove running Act containers and wait until the operation is complete before executing the next test sequentially. However, part of this issue would be to determine why this should be required or the alternative options available. The Act tests could be removed, but they do run locally in the short term and this is an alternative to no automated tests or refactoring to a JS/TS action with unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant