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

fix docker-based installation tests on Github actions #215

Closed
ltalirz opened this issue Mar 18, 2022 · 4 comments · Fixed by #232
Closed

fix docker-based installation tests on Github actions #215

ltalirz opened this issue Mar 18, 2022 · 4 comments · Fixed by #232

Comments

@ltalirz
Copy link
Member

ltalirz commented Mar 18, 2022

see #210 (running them locally works fine)

Once this is fixed, the information gathered this way can be used for a more detailed "workflow registry page"

@ltalirz
Copy link
Member Author

ltalirz commented Mar 18, 2022

The error messages vary; sometimes github actions decides simply to "skip" the test - I also have seen

- aiida-QECpWorkChain
   - Starting container for aiida-QECpWorkChain
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/docker/api/client.py", line 268, in _raise_for_status
    response.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/requests/models.py", line [9](https://github.com/aiidateam/aiida-registry/runs/5599530712?check_suite_focus=true#step:8:9)60, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.41/containers/create

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.[12](https://github.com/aiidateam/aiida-registry/runs/5599530712?check_suite_focus=true#step:8:12)/x64/lib/python3.8/site-packages/docker/models/containers.py", line 8[19](https://github.com/aiidateam/aiida-registry/runs/5599530712?check_suite_focus=true#step:8:19), in run
    container = self.create(image=image, command=command,
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/docker/models/containers.py", line 878, in create
Error: No space left on device : '/home/runner/runners/2.288.1/_diag/pages/e824c49b-4d8d-45e8-8eba-c77886be4d86_685b72c3-607b-5549-a738-905b3d9de4d7_1.log'

@ltalirz ltalirz changed the title fix docker-based installation tests fix docker-based installation tests on Github actions Mar 18, 2022
@ltalirz
Copy link
Member Author

ltalirz commented Mar 18, 2022

perhaps look how molecule is doing things under the hood, since this (creating & destroying docker containers, installing stuff on them) is exactly what is happening when the various ansible roles are being tested

@ltalirz
Copy link
Member Author

ltalirz commented Mar 6, 2023

To provide some more contact with respect to my last comment:

molecule is a widely-used testing framework for ansible roles (e.g. we use it on GitHub actions for most of the roles in https://github.com/marvel-nccr).
It does pretty much what we're doing here: create a docker container on GitHub actions, then run tasks on it.

If they can do it, we should be able to as well.

Note: According to my notes in #210 (comment) it appears only the second container creation failed.
It is possible that molecule never creates more than one container at a time... still, it seems unlikely to me that Github actions would limit the number of containers you can run to 1.

@ltalirz
Copy link
Member Author

ltalirz commented Mar 29, 2023

Hm... maybe I missed the last line of the error message before?

Error: No space left on device : '/home/runner/runners/2.288.1/_diag/pages/e824c49b-4d8d-45e8-8eba-c77886be4d86_685b72c3-607b-5549-a738-905b3d9de4d7_1.log'

If the previous container is not deleted properly, I could certainly imagine that eventually github actions runs out of disk space

At least in principle I am trying to delete the container though here

finally:
container.remove(force=True)

@ltalirz ltalirz linked a pull request Mar 29, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant