Merge lp:~corey.bryant/charm-helpers/swift-2.12.0 into lp:charm-helpers

Proposed by Corey Bryant
Status: Merged
Merged at revision: 674
Proposed branch: lp:~corey.bryant/charm-helpers/swift-2.12.0
Merge into: lp:charm-helpers
Diff against target: 12 lines (+1/-1)
1 file modified
charmhelpers/contrib/openstack/utils.py (+1/-1)
To merge this branch: bzr merge lp:~corey.bryant/charm-helpers/swift-2.12.0
Reviewer Review Type Date Requested Status
David Ames (community) Approve
Review via email: mp+314369@code.launchpad.net
To post a comment you must log in.
Revision history for this message
David Ames (thedac) wrote :

I confirmed that the swift codename code can handle major.minor numbers. Let's take this opportunity to update the swift codenames to use major.minor numbers.

review: Needs Fixing
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks for the review. I assume you meant that swift codenames *can't* handle major.minor numbers. I'll take a look. I just want to get b2 out the door first then I'll revisit this.

Revision history for this message
David Ames (thedac) wrote :

Just to be clear they can. I ran a test where I manually changed to 12.11 and 12.12 and it worked. Thus they should all be updated.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I took a closer look at this and I think we need to leave the major.minor.point versioning. While much of the code that uses SWIFT_CODENAMES could get away with using just the major.minor versions, get_swift_codename() still needs to use major.minor.patch whenever possible. This is because from one openstack release to the next, the major.minor may be the same (see dict below). For example if we were to use just major.minor to get the openstack release codename, then get_swift_codename('2.2.1') has no way to differentiate between juno and kilo, so could end up using the wrong version of config templates. The fallback checks for major.minor were added to get_swift_codename() are just fallback in case someone is using an old version of the charm and a new package point release is released.

SWIFT_CODENAMES = OrderedDict([
    ('diablo',
        ['1.4.3']),
    ('essex',
        ['1.4.8']),
    ('folsom',
        ['1.7.4']),
    ('grizzly',
        ['1.7.6', '1.7.7', '1.8.0']),
    ('havana',
        ['1.9.0', '1.9.1', '1.10.0']),
    ('icehouse',
        ['1.11.0', '1.12.0', '1.13.0', '1.13.1']),
    ('juno',
        ['2.0.0', '2.1.0', '2.2.0']),
    ('kilo',
        ['2.2.1', '2.2.2']),
    ('liberty',
        ['2.3.0', '2.4.0', '2.5.0']),
    ('mitaka',
        ['2.5.0', '2.6.0', '2.7.0']),
    ('newton',
        ['2.8.0', '2.9.0', '2.10.0']),
    ('ocata',
        ['2.11.0', '2.12.0']),
])

Revision history for this message
David Ames (thedac) wrote :

You have convinced me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/openstack/utils.py'
2--- charmhelpers/contrib/openstack/utils.py 2016-12-14 17:48:32 +0000
3+++ charmhelpers/contrib/openstack/utils.py 2017-01-09 20:33:48 +0000
4@@ -153,7 +153,7 @@
5 ('newton',
6 ['2.8.0', '2.9.0', '2.10.0']),
7 ('ocata',
8- ['2.11.0']),
9+ ['2.11.0', '2.12.0']),
10 ])
11
12 # >= Liberty version->codename mapping

Subscribers

People subscribed via source and target branches