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 reinstall error with use_venv: false on bionic and earlier. #170

Merged
merged 3 commits into from
May 12, 2020

Conversation

johnsca
Copy link
Contributor

@johnsca johnsca commented May 12, 2020

The change in #167 to use --force-reinstall, while significantly safer overall does fail on bionic and earlier when using use_venv: false. This was missed in the existing functional tests, so this first adds tests to cover that and ensure that things like this will be caught going forward, then adds a fix to use --force-reinstall when possible but otherwise fall back to the previous --ignore-installed behavior.

Fixes #168

The change in #167 to use --force-reinstall, while significantly safer
overall does fail on bionic and earlier when using `use_venv: false`.
This was missed in the existing functional tests, so this adds tests to
cover that.
@johnsca johnsca marked this pull request as ready for review May 12, 2020 16:38
Copy link
Contributor

@kwmonroe kwmonroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@pengale pengale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pengale pengale merged commit 97b0efe into master May 12, 2020
johnsca added a commit to charmed-kubernetes/layer-basic that referenced this pull request Aug 4, 2020
adam-stokes pushed a commit to charmed-kubernetes/layer-basic that referenced this pull request Aug 4, 2020
* Remove allow_hosts workaround for Focal and after (canonical#169)

* Fix regression for offline deployments (canonical#172)

Add back the writing of ``/root/.pydistutils.cfg`` for all series
and drop the now removed ``allow_hosts`` keyword for Eoan and
onwards.

The ``find_links`` keyword with path to wheelhouse still needs to
be there for successful offline install of some Python packages.

Fixes canonical#171

* Pin netaddr (canonical#179)

netaddr 0.7.20 pulls in importlib-resources, which depends on a newer
version of setuptools_scm than we use.  It also pulls zipp, which
depends on a newer version of setuptools than we use.  Pinning to
0.7.19 avoids this.

* Stop pip3 AND easy_install from accessing network on install (canonical#184)

* Stop pip3 AND easy_install from accessing network on install

This change prevents the wheelhouse installation from accessing the
network at all.  This allows it to install quickly behind firewalls that
silently drop packets causing long delays in installing the packages if
a dependency is 'later' in the wheelhouse install, which is done in
directory order (usually alphabetically).

Closes launchpad bug: #1884449

* Add required snap install core line

* Remove Eoan from functional tests (canonical#186)

Eoan has been EOLed and no longer has images available, so it gets stuck
in pending and causes the functional tests to hang.

* Fix lint failures (from canonical#170)

* Use ``travis_wait`` to keep func test alive (canonical#162)

At present we have enabled excessive debug-logging to accompilsh
the same thing, but that makes it unpleasant to look at.

Change permissions on the LXD socket to give travis user access
instead of using the sudo back to ourself trick as it leads to
some unwanted complexity.

Add Python 3.8 target to test matrix.

Replace ``cryptography`` with ``psycopg2`` as it has not banned
Python 3.4 support.

Closes canonical#161

Co-authored-by: Frode Nordahl <frode.nordahl@canonical.com>
Co-authored-by: Paul Goins <paul.goins@canonical.com>
Co-authored-by: Alex Kavanagh <567675+ajkavanagh@users.noreply.github.com>
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.

Deployment fails when use_venv == false and series == bionic
3 participants