charmed-kubernetes / pytest-operator

Apache License 2.0
7 stars 13 forks source link

Installation pulls in an older version of `charmcraft` #13

Closed jnsgruk closed 3 years ago

jnsgruk commented 3 years ago

Was doing some testing with pytest-operator and tox earlier today and noticed that it pulls in version 0.7.0 of charmcraft rather than the latest 1.0.0.

This is my tox env:

[testenv:integration]
deps =
    juju
    pytest
    pytest-operator 
    ipdb
commands = pytest -v --tb native --show-capture=no --log-cli-level=INFO -s {posargs:tests/integration}

And contents of venv:

ls .tox/integration/lib/python3.9/site-packages | grep charmcra
drwxrwxr-x    - jon jon 28 May 15:39 -- charmcraft
drwxrwxr-x    - jon jon 28 May 15:39 -- charmcraft-0.7.0.dist-info

Thanks! :)

johnsca commented 3 years ago

I don't know how this could have happened because the dependency isn't pinned and charmcraft on PyPI is 1.0.0. That said, I think we want to treat charmcraft the same way we do the Juju client and just use the snap. Thus, the dependency would be removed and shifted to charmed-kubernetes/actions-operator.

jnsgruk commented 3 years ago

Yeh, I agree, pretty weird!

johnsca commented 3 years ago

I confirmed that it tries to use 1.0.0 and below and for some reason will only accept 0.7.0. My best guess is a dependency version conflict between libjuju and charmcraft after 0.7.0, since libjuju has some more restrictive dependency specifications but I'm really not sure and couldn't find the actual conflict. Regardless, I think it's better to switch to the snap than keep trying to track this down.