-
Notifications
You must be signed in to change notification settings - Fork 102
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
Target ceiling version #1008
Target ceiling version #1008
Conversation
rather then setting it to the TARGET_JUJU_VERSION
Currently we spam debug output for any use of pylibjuju where the "target" != juju controller version. It should be turned into a ceiling, as it’s pretty normal to use the latest pylibjuju (currently 3.3.0.0) against any 3.x controller (e.g. 3.1). The only time we emit a warning should be when we think the client should be upgraded to a more recent version (e.g. running pylibjuju 3.3.0.0 against juju controller 3.6).
In case this is run from somewhere else than the libjuju top directory (e.g. sphinx).
QA problem (potentially) I accidentally connected with a controller I had with version
|
I'm not entirely familiar with how we version python-libjuju to track juju, but the behaviour around patch releases seems a little odd i.e. if we have a 3.3.1 controller (3.3.1 is a candidate snap atm)
This would mean we would need to release a python-libjuju for every juju patch release? Idk if this is what we're currently doing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to just get rid of this completely. I'm not sure what it gives us.
We're actively removing these checks in juju 2.9+
yeah, right? This was itching me since yesterday, it is sort of useful when someone accidentally uses the tip against a 2.9 controller and vice versa, cause otherwise without this it'll fail in mysterious ways, at least this is a bit of a gatekeeper of that. And I can't wait to finish my work on merging 2.9/3.x so I can completely get rid of this. But as long as we have 2 tracks for 2.9 and 3.x, I don't have a good solution of warning users without this being in place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting errors running on 3.4-rc1
>>> await m.connect()
Traceback (most recent call last):
File "/home/jack/.pyenv/versions/3.10.11/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/home/jack/.pyenv/versions/3.10.11/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "<console>", line 1, in <module>
File "/home/jack/juju/python-libjuju/juju/model.py", line 667, in connect
model_uuid = await self._connector.connect_model(model_name, **kwargs)
File "/home/jack/juju/python-libjuju/juju/client/connector.py", line 186, in connect_model
await self.connect(**kwargs)
File "/home/jack/juju/python-libjuju/juju/client/connector.py", line 91, in connect
juju_server_version = version.parse(self._connection.info["server-version"])
File "/home/jack/.pyenv/versions/3.10.11/lib/python3.10/site-packages/packaging/version.py", line 54, in parse
return Version(version)
File "/home/jack/.pyenv/versions/3.10.11/lib/python3.10/site-packages/packaging/version.py", line 200, in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '3.4-rc1.1'
$ juju controllers
Use --refresh option with this command to see the latest information.
Controller Model User Access Cloud/Region Models Nodes HA Version
lxd - admin superuser localhost/localhost 1 1 none 3.4-rc1.1
This is a controller build from HEAD of 3.4 branch.
This seems to only be the case for controllers which were bootstrapped by uploading a local jujud binary, since these get the build version appended |
Yeah this would be due to the |
Adapted from juju#1008 on the 2.9 track
Adapted from juju#1008 on the 2.9 track
/merge |
Adapted from juju#1008 on the 2.9 track
#1024 ## What's Changed * Remove paramiko upper-bound by @gboutry in #1005 * Remove explicit passing of event_loop into tests by @cderici in #1006 * chore: remove the upper restrictions on the websockets dependency by @tonyandrewmeyer in #1007 * Target ceiling version by @cderici in #1008 * Make it easier to run tests using `make` by @cderici in #1012 * Avoid installing signal handlers to the event loop by @cderici in #1014 * feat: remove app block until done by @yanksyoon in #1017 * feat: remove app timeout by @yanksyoon in #1018 * Forward port latest changes from 2.9 onto 3.x by @cderici in #1022 #### Notes & Discussion JUJU-5414
Description
Currently
This reads the version from the
VERSION
file we keep at the toplevel. And removes the minor version sniffing.We still keep the major version sniffing because of the two tracks we have in pylibjuju (2.9 and 3.x).
QA Steps
No added functionality, so no QA is needed other than reading the code.
If you wanna be really pedantic, set the logging to DEBUG and run the line above, and you shouldn't see any messages like
Notes & Discussion
JUJU-5315