Replace oslo_utils.timeutils because it is deprecated

Bug #1532120 reported by Craig Vyvial
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Low
Amrith Kumar

Bug Description

Replace trove.common.timeutils due to the deprecation in oslo_utils.timeutils.
https://review.openstack.org/#/c/182602/

Changed in trove:
assignee: nobody → Craig Vyvial (cp16net)
status: New → In Progress
Changed in trove:
milestone: mitaka-1 → mitaka-3
Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-3 → mitaka-rc1
Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-rc1 → mitaka-rc2
Revision history for this message
Craig Vyvial (cp16net) wrote :

This patch addresses this change.

https://review.openstack.org/#/c/257152/

Changed in trove:
assignee: Craig Vyvial (cp16net) → Zhihai Song (szhsong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Zhihai Song (<email address hidden>) on branch: master
Review: https://review.openstack.org/257152

Craig Vyvial (cp16net)
Changed in trove:
status: In Progress → Triaged
Amrith Kumar (amrith)
Changed in trove:
milestone: mitaka-rc2 → newton-1
Zhihai Song (szhsong)
Changed in trove:
assignee: Zhihai Song (szhsong) → nobody
Changed in trove:
assignee: nobody → Muzammil (muzammil-mueen)
Changed in trove:
assignee: Muzammil (muzammil-mueen) → Amrith (amrith)
status: Triaged → In Progress
Revision history for this message
Amrith Kumar (amrith) wrote :

Sorry, didn't realize there was a bug for this already.

Revision history for this message
Amrith Kumar (amrith) wrote :
Amrith Kumar (amrith)
Changed in trove:
milestone: newton-1 → ocata-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by amrith (<email address hidden>) on branch: master
Review: https://review.openstack.org/326655
Reason: "abandoned for inactivity, over 3 weeks old, has a negative review comment and is not currently marked as a WIP or WF-1. please restore the change if you wish to work on it. (project:openstack/trove-specs OR project:openstack/trove OR project:openstack/trove-dashboard OR project:openstack/python-troveclient OR project:openstack/trove-integration) status:open age:3w label:Code-Review=-1 (NOT label:Workflow<0)"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/326655
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=109ff949511c0185ab1dd0beffeb03a8a3332005
Submitter: Jenkins
Branch: master

commit 109ff949511c0185ab1dd0beffeb03a8a3332005
Author: Amrith Kumar <email address hidden>
Date: Tue Jun 7 08:15:24 2016 -0400

    Handle isotime deprecation in oslo_utils.timeutils

    oslo_utils.timeutils is deprecating isotime(). In reality they are
    deprecating some other things as well but Trove doesn't (currently)
    use any of those things.

    Much has been written on the subject of this deprecation. I think the
    proposal to merely replace isotime with datetime.datetime.isoformat()
    is a little simplistic. Well intentioned, but nonetheless I believe
    that it is simplistic.

    The primary issue I could find with oslo_utils.timeutils.isotime() was
    the fact that it was naive. I think it could well have been fixed in
    oslo_utils but for whatever reason(s) oslo decided not to want to go
    that route.

    The primary challenge from Trove's perspective is that I want to
    respect the existing API contract while at the same time get an
    implementation of time handling that is not identical in its flaws
    with oslo_utils.timeutils.isotime().

    This change set attempts to address that by making
    trove.common.timeutils.isotime() that is aware. It also implements a
    utcnow_aware() function that is aware.

    ISO 8601 allows for four representations of timezone and those are

    <time>Z
    <time>[+-]hh:mm
    <time>[+-]hhmm
    <time>[+-]hh

    Trove conventionally used the first one, even if the time wasn't
    really a UTC time. That's one of the things being fixed here.

    In review cp16net asked whether this change removes the 'Z' at the end
    of time strings generated by the isotime() function. The answer is
    NO. The new isotime() function performs identical to the old and now
    deprecated function in oslo_utils.timeutils for UTC (Z) times.

    There was a utcnow() function in trove.common.utils which just wrapped
    datetime.datetime.utcnow(). That has been moved now to
    trove.common.timeutils with the other new time related functions.

    There were a couple of places in Trove where code was using
    datetime.now() which was not ideal. Those have been corrected now as
    well.

    Unit tests have been proposed for the new routines.

    Closes-Bug: #1532120
    Change-Id: Ic5abf6669edd4f1a9fd62e61f437565aa887aebe

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/trove 8.0.0.0b3

This issue was fixed in the openstack/trove 8.0.0.0b3 development milestone.

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.