get_version_tuple adds epoch to major version

Bug #1896826 reported by Lee Trager
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Dougal Matthews

Bug Description

I noticed that get_version_tuple is adding the epoch number to the major value resulting in an incorrect tuple.

from provisioningserver.utils.version import get_maas_version, get_maas_version_tuple

In [30]: get_maas_version()
Out[30]: '1:2.9.0~beta3-8950-g.b5ea2ab1b-0ubuntu1'

In [31]: get_version_tuple(get_maas_version())
Out[31]: MAASVersion(major=12, minor=9, point=0, qualifier_type_version=-2, qualifier_version=3, revno=8950, git_rev='b5ea2ab1b', short_version='1:2.9.0~beta3', extended_info='8950-g.b5ea2ab1b', qualifier_type='beta', is_snap=False)

In [32]: get_version_tuple(get_maas_version()).major
Out[32]: 12

Related branches

Changed in maas:
status: Confirmed → Triaged
Lee Trager (ltrager)
Changed in maas:
milestone: 2.9.0b4 → 2.9.0b7
Changed in maas:
importance: Critical → High
Changed in maas:
status: Triaged → Fix Committed
Lee Trager (ltrager)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.