geerlingguy / docker-ubuntu2004-ansible

Ubuntu 20.04 LTS (Focal Fossa) Docker container for Ansible playbook and role testing.
https://hub.docker.com/r/geerlingguy/docker-ubuntu2004-ansible
MIT License
84 stars 49 forks source link

Missing pycairo #15

Open pedrohdz opened 3 years ago

pedrohdz commented 3 years ago

Trying to run the following:

ansible-test integration --requirements --docker geerlingguy/docker-ubuntu2004-ansible --python-interpreter /usr/bin/python3

Yields the following error:

ERROR: Command "/usr/bin/python3 /root/ansible/test/lib/ansible_test/_data/quiet_pip.py check --disable-pip-version-check" returned exit status 1.
>>> Standard Output
pygobject 3.36.0 requires pycairo, which is not installed.
geerlingguy commented 3 years ago

ansible-test seems to be a moving target... I'm not quite sure if there's a way I can follow along with all the varying requirements for it.

pedrohdz commented 3 years ago

Hope this helps.. 🤓

geerlingguy commented 3 years ago

@pedrohdz - The weird thing is, I don't see either pygobject or pycairo mentioned at all in any of the ansible-test documentation.

The --requirements option seems to indicate it might be trying to install other dependencies—and maybe one of those is causing this extra requirement?

I'd rather not add cairo to just this one Docker image at all, but would be willing to maybe add it everywhere if it's truly required to make the base ansible-test work on my test images with most collections.

pedrohdz commented 3 years ago

@geerlingguy, I'll take a look again on Monday. Maybe I'm doing something wrong, or unnecessary, on my end. Wouldn't be the first time.

If the change is needed, I would be happy to help out across the repos.

geerlingguy commented 3 years ago

Can you create a list of steps to reproduce the error, and test it against a collection like community.general or something else? I'm wondering if it might only be a problem in certain collections.

pedrohdz commented 3 years ago

Issue has been recreated in this GitHub Action:

I tried running it on my workstation without --requirements as follows and it is still complaining about pycairo as well:

ansible-test integration --docker geerlingguy/docker-ubuntu2004-ansible --python-interpreter /usr/bin/python3

What's somewhat odd is that it works just fine with geerlingguy/docker-debian10-ansible:latest.

Here are steps:

git clone git@github.com:Avinode/ansible-collection-devenv.git
cd ansible-collection-devenv
python3.9 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install ansible ansible-lint yamllint

# Optional..  Issue pops up with and without.
#cat galaxy.yml | ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json' \
#    | jq -r '.dependencies | keys | .[]' \
#    | xargs -i ansible-galaxy collection install -p . '{}'

cd ansible_collections/avinode/devenv/
ansible-test integration --docker geerlingguy/docker-ubuntu2004-ansible --python-interpreter /usr/bin/python3
geerlingguy commented 3 years ago

@pedrohdz - Are you able to reproduce the issue with a fresh new collection that has no or basic content, or with a collection like community.general? It looks like the failing test is on your own devenv collection.

pedrohdz commented 3 years ago

I’ll dig into it more on Monday. Thanks for taking a look!

pedrohdz commented 3 years ago

@geerlingguy Here's a stripped down Ansible collection: https://github.com/pedrohdz-scrap/ansible-pycairo-issue. The issue persists.

Note that dependencies have been removed:

https://github.com/pedrohdz-scrap/ansible-pycairo-issue/blob/bfae9089d6c0c45e010fca4200fbd63da66205f3/ansible_collections/reproduction/pycairoissue/galaxy.yml#L44-L45

Thank you!

geerlingguy commented 3 years ago

@pedrohdz - Thanks for the reproducer. I'll take a look.