linode-cli Version Mismatch?
My linode-cli scripts are starting to produce the following error/warning:
The API responded with version 4.1.0, which is newer than the CLI's version of 4.0.8. Please update the CLI to get access to the newest features. You can update with a simple `pip install --upgrade linode-cli`
pip install --upgrade says I have the latest version (apparently 4.0.8). Is it safe to assume that the API endpoint was recently upgraded, but the latest version hasn't been pushed out to the pip repositories yet (and presumably will be soon)?
linode-cli version 2.5.0, which implements API version 4.1.0, was pushed to pypi about 15 minutes ago. Try rerunning
pip install --upgrade linode-cli until it updates (you may be getting a cached response).
Try rerunning pip install --upgrade linode-cli until it updates (you may be getting a cached response).
Just tested this myself – I was getting the same warning, but ran this command about a minute ago, and I was able to pull down the new version of
$ linode --version linode-cli 2.5.0 Built off spec version 4.1.0
If you're still having trouble, let us know!
Just ran it again and it looks like it finally found 2.5.0. Thanks.
EDIT: I take that back:
$ linode-cli --version linode-cli 2.5.0 Built off spec version 4.0.8
Needless to say, I'm still getting the warning message.
You could try uninstalling then reinstalling the CLI:
pip uninstall linode-cli
pip install linode-cli
If it doesn't work for you, let me know.
Thanks for the heads up. I just retested it on a brand new Linode and got version 4.0.8 myself. I'm going to look into this a bit from our end and get back to you soon.
I've found the same thing on a few other distros as well. I'm going to check in with the team here to see if we can get this fixed up.
We're still looking into it, but we have a workaround for now. If you use pip3 instead of pip it'll update the CLI to the latest version. If you don't have pip3 installed you can install it with:
apt install python3-pip pip3 install linode-cli
or, if you're using CentOS:
yum install epel-release yum makecache yum install python36-pip pip3 install linode-cli
I'm on Fedora, so it took a bit of digging to find the right package. (I'm also not a Python guy, so pip is a bit foreign to me.) However, it looks like switching over to the Python 3 version did the trick:
$ linode-cli --version linode-cli 2.5.0 Built off spec version 4.1.0
It also got the Python 2 version of pip to stop screaming at me "Stop using Python 2, you moron! Python 3 is so much better! Quit being such a Luddite!" (Those… may not be the exact words, but you still get the gist.)
Looks like it's at it again:
The API responded with version 4.3.0, which is newer than the CLI's version of 4.2.0. Please update the CLI to get access to the newest features. You can update with a simple `pip install --upgrade linode-cli` $ linode-cli --version linode-cli 2.6.0 Built off spec version 4.2.0
Already tried a
pip3 install --upgrade and even an uninstall/install pair and I still get the same version. My script seems to be working, but I'm still getting the same error. Box is running Fedora 30.
Looks like version 2.7.0 was pushed out sometime today, and that updating to that fixed the issue.
It's at it again:
The API responded with version 4.4.0, which is newer than the CLI's version of 4.3.1. Please update the CLI to get access to the newest features. You can update with a simple `pip install --upgrade linode-cli` $ linode-cli --version linode-cli 2.7.1 Built off spec version 4.3.1
The upgrade keeps giving me version 2.7.1.
I posted over to the relevant GitHub issue page, if that helps.
Thanks @jtdarlington. We also reached out to our team internally about this to let them know.
Got the 2.8.0 release, which seems to fix the warning, so everything is back to normal again.
Is there any sort of info I can provide to help here? For what it's worth, the box I run this on is not a Linode; it's a Fedora 30 box sitting under my desk that I use to automate a small handful of tasks. I'm sure there must be a delay between new versions getting pushed out and when they make it into the various repositories, but there seems to be a very consistent cycle of: (1) new version push causes API warnings, (2) I'm unable to get this version, (3) complain (Squeaky wheel gets the grease, right?), (4) new version goes out and fixes things. Could it be that the new version push isn't getting out the external repos right away? Or maybe it requires a manual push to get out that far?
I have an IFTTT bot watching the release RSS feed from GitHub, but I usually first find out about this when my script starts throwing warnings. I usually don't get a hit on the first version push (#1 above), but I do on #4. Might lead credence to the delay/manual repo push theory.
As stated above, I'm not a Python guy (not enough round tuits yet), but this doesn't feel like it's Python-specific.
For a temporary solution, in the meantime you can run
linode-cli with the
--suppress-warnings flag to avoid seeing this error message going forward.
This is definitely a stopgap solution while we work on implementing something automated along the lines of what you're suggesting. Thanks for your patience.
Hopping into this thread a bit late, but I'd also suggest building from source if
pip doesn't seem to be cutting it -- there have been instances in the past where an update for the API/CLI has been pushed out, but taken a while to reach PyPi. Keep in mind, though, that updating via
pip after building from source, but before PyPi has received the update will end up rolling the CLI back.