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

ci: use apt instead of pip to install tox #1151

Conversation

james-garner-canonical
Copy link
Contributor

Description

Github's rollout of 24.04 for ubuntu-latest has now reached python-libjuju, so pip install tox no longer works -- 24.04 prevents installing packages using pip.

This PR switches all our run: pip install tox lines in github actions to run: sudo apt install tox.

QA Steps

Tests no longer fail when trying to install tox, as they started doing in the last 12 hours.

Github's rollout of 24.04 for ubuntu-latest has now reached
python-libjuju, so `pip install tox` no longer works -- 24.04 prevents
installing packages using pip.
@james-garner-canonical
Copy link
Contributor Author

Oh looks like this is the wrong approach as the attempt to install tox happens in an earlier step anyway.
test.yaml

      - name: Setup operator environment
        uses: charmed-kubernetes/actions-operator@main
        with:
          provider: lxd
          juju-channel: 3.4/stable

Test output

Run charmed-kubernetes/actions-operator@main
Install core snap
Install LXD
Initialize LXD
Install tox
  /usr/bin/which tox
  /usr/bin/which pip
  /usr/bin/pip
  pip is available, install tox
  /usr/bin/pip install tox
  error: externally-managed-environment

So we can probably remove our manual installation of tox altogether. And the correct fix seems to be running our setup python step before running setup operator environment -- see here.

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 this pull request may close these issues.

1 participant