Skip to content

hydra client update breaks when hydra installed under sudo #14

@leewardbound

Description

@leewardbound

hydra client update works by replacing the running process with pip install git+... to upgrade itself, always installing into the users home folder.

However, since replacing the running process eliminates the side effects of prefixing hydra client update with sudo, if the package is installed under sudo, there's no way for it to update itself.

Anyone with hydra installed under sudo currently (who followed our getting started guide prior to v0.0.3b3) will therefore be unable to use the upgrade helper and must either:

  1. always use sudo pip3 install git+https://github.com/shipchain/hydra.git@master, which is longer and inconvenient but pretty much fine, but it needs to be documented somewhere...
    or
  2. run this one time right now to remove all the installed versions and just reinstall under your ~/.local directory, which will fix this problem for you forever:
    pip3 uninstall -y hydra ; sudo pip3 uninstall -y hydra ; pip3 install git+https://github.com/shipchain/hydra.git@master
    (and then log out and log in, and hydra -v should show at least version 0.0.3b3 on the first line)

Hydra could try to engineer around this by changing off of the os.execpv method, but (1) and (2) above would still be relevant (because if we introduced the fix in v0.0.3b4, you'd still have to manually sudo your upgrade to download it) and frankly I'm not sure how else we can safely make this package update itself while it's still running. I think since we've updated the Getting Started Guide to no longer default to sudo installs, this issue can dangle, we ask users to run (2) above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions