inveniosoftware / inveniosoftware/invenio-cli

docker helper: version not being obtained

Open
#359 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
14
Forks
49
PR merge metrics
No merged PRs in 30d

Description

Package version (if known): 1.1.0

## Describe the bug

With docker 20.10 / docker-compose 1.25.0 (ubuntu 20.04) the docker helper is trying to run 'docker compose' but this command isn't available. It should still be docker-compose in this case.

This causes docker not to be able to start services etc when the helper fails here:
https://github.com/inveniosoftware/invenio-cli/blob/40573024e8ad81430afdda8fc8ceb2acbd55d7d2/invenio_cli/helpers/docker_helper.py#L41

## Steps to Reproduce
Bootstrap instance with Docker 20.10 (as packaged in Ubuntu 20.04), bootstrap an instance of ~12 and try to start services.

## Expected behavior

services should start

## Screenshots (if applicable)
```
(rdm12a) dan@id23:~/test2/rdm12a$ invenio-cli services setup
Traceback (most recent call last):
File "/home/dan/.venv/rdm12a/bin/invenio-cli", line 33, in
sys.exit(load_entry_point('invenio-cli', 'console_scripts', 'invenio-cli')())
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/dan/.venv/rdm12a/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/dan/test2/invenio-cli/invenio_cli/cli/services.py", line 65, in setup
commands = ServicesCommands(cli_config)
File "/home/dan/test2/invenio-cli/invenio_cli/commands/services.py", line 29, in __init__
self.docker_helper = docker_helper or DockerHelper(
File "/home/dan/test2/invenio-cli/invenio_cli/helpers/docker_helper.py", line 29, in __init__
self.container_prefix = self._normalize_name(project_shortname)
File "/home/dan/test2/invenio-cli/invenio_cli/helpers/docker_helper.py", line 41, in _normalize_name
dc_version = groups.group(0)
AttributeError: 'NoneType' object has no attribute 'group'
```

## Additional context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.