forked from juju/python-libjuju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#1008 from cderici/target-ceiling-version
juju#1008 #### Description Currently 1. the “target” version is hardcoded, 2. we spam debug output for any use of pylibjuju where the target version != juju controller version. 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 ``` "This version was tested using ...... juju version ...... may have compatibility issues" ``` #### Notes & Discussion JUJU-5315
- Loading branch information
Showing
4 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# Copyright 2023 Canonical Ltd. | ||
# Licensed under the Apache V2, see LICENCE file for details. | ||
|
||
import pathlib | ||
import re | ||
|
||
LTS_RELEASES = ["jammy", "focal", "bionic", "xenial", "trusty", "precise"] | ||
|
||
DEFAULT_ARCHITECTURE = 'amd64' | ||
|
||
# Juju server version we target. Depending on this value, the Juju server | ||
# may stop the connecting considering us not compatible. | ||
TARGET_JUJU_VERSION = '3.2.0' | ||
|
||
# Used by connector to determine if we are compatible with the juju server | ||
SUPPORTED_MAJOR_VERSION = '3' | ||
|
||
SUPPORTED_MAJOR_MINOR_VERSION = '3.2' | ||
# CLIENT_VERSION (that's read from the VERSION file) is the highest Juju server | ||
# version that this client supports. | ||
# Note that this is a ceiling. CLIENT_VERSION <= juju-controller-version works. | ||
# For CLIENT_VERSION < juju-controller-version (strictly smaller), we emit a warning | ||
# to update the client to the latest. | ||
# However, for any CLIENT_VERSION > juju-controller-version, a "client incompatible | ||
# with server" will be returned by the juju controller. | ||
VERSION_FILE_PATH = pathlib.Path(__file__).parent.parent / 'VERSION' | ||
CLIENT_VERSION = re.search(r'\d+\.\d+\.\d+', open(VERSION_FILE_PATH).read().strip()).group() |