Stop using deprecated oslo_utils.timeutils.isotime

Bug #1461251 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Critical
Brant Knudson
cloudkitty
Fix Released
Undecided
Tuan
ec2-api
Fix Released
Undecided
Chenghui Yu
gce-api
In Progress
Undecided
Chenghui Yu
oslo.utils
In Progress
Undecided
Chenghui Yu
python-keystoneclient
Fix Released
Undecided
Brant Knudson

Bug Description

oslo_utils.timeutils.isotime() is deprecated as of 1.6 so we need to stop using it.

This breaks unit tests in keystone since we've got a check for calling deprecated functions.

Brant Knudson (blk-u)
Changed in keystone:
assignee: nobody → Brant Knudson (blk-u)
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/187751

Changed in keystone:
status: New → In Progress
Revision history for this message
Dave Chen (wei-d-chen) wrote :

This bug currently break the Jenkins, let's fix it sooner than later.

Revision history for this message
Dolph Mathews (dolph) wrote :

Added oslo to this bug for unacceptably impacting at least keystone and heat, by not providing a viable alternative capable of maintaining backward compatibility with existing public APIs.

Keystone's solution is to stop using oslo.timeutils in this instance, and instead move the deprecated timeutils function into keystone's namespace:

  https://review.openstack.org/#/c/187751/1/keystone/common/utils.py,unified

That said, Heat found the introduction of a API backward incompatibility to be acceptable:

  https://review.openstack.org/#/c/187633/1/heat/tests/test_engine_api_utils.py,unified

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

Reviewed: https://review.openstack.org/187751
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=386054847e3434122a5070f2894908ff437d901e
Submitter: Jenkins
Branch: master

commit 386054847e3434122a5070f2894908ff437d901e
Author: Brant Knudson <email address hidden>
Date: Tue Jun 2 14:55:50 2015 -0500

    Switch from deprecated isotime

    oslo_utils.timeutils.isotime() is deprecated as of 1.6 so we need
    to stop using it.

    The deprecation message says to use datetime.datetime.isoformat()
    instead, but the format of the string generated by isoformat isn't
    the same as the format of the string generated by isotime. The string
    is used in tokens and other public APIs and we can't change it
    without potentially breaking clients.

    So the workaround is to copy the current implementation from
    oslo_utils.timeutils.isotime() to keystone.common.utils.isotime().

    Closes-Bug: 1461251

    Change-Id: Icf821be8cd4ee7f52c1a3d89bfed302488c080f2

Changed in keystone:
status: In Progress → Fix Committed
Brant Knudson (blk-u)
Changed in python-keystoneclient:
assignee: nobody → Brant Knudson (blk-u)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/189147

Changed in python-keystoneclient:
status: New → In Progress
Changed in keystone:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/189147
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=97c2c690d8983fd1d929a4eae3b0d62bbcb2cf6a
Submitter: Jenkins
Branch: master

commit 97c2c690d8983fd1d929a4eae3b0d62bbcb2cf6a
Author: Brant Knudson <email address hidden>
Date: Sun Jun 7 11:20:44 2015 -0500

    Switch from deprecated isotime

    oslo_utils.timeutils.isotime() is deprecated as of 1.6 so we need
    to stop using it.

    The deprecation message says to use datetime.datetime.isoformat()
    instead, but the format of the string generated by isoformat isn't
    the same as the format of the string generated by isotime. The string
    is used in tokens and other public APIs and we can't change it
    without potentially breaking clients.

    So the workaround is to copy the current implementation from
    oslo_utils.timeutils.isotime() to keystone.common.utils.isotime().

    Change-Id: I34b12b96de3ea21beaf935ed8a9f6bae2fe0d0bc
    Closes-Bug: 1461251

Changed in python-keystoneclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (feature/keystoneauth_integration)

Fix proposed to branch: feature/keystoneauth_integration
Review: https://review.openstack.org/207267

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (feature/keystoneauth_integration)
Download full text (22.7 KiB)

Reviewed: https://review.openstack.org/207267
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=4e498a54d0034b2ce5c87130f080ff580d241600
Submitter: Jenkins
Branch: feature/keystoneauth_integration

commit 51d9d123a8df79f6b84d196d41f1008f8d6033d4
Author: Brant Knudson <email address hidden>
Date: Wed Aug 5 12:28:30 2015 -0500

    Deprecate openstack.common.apiclient

    Deprecate the apiclient from oslo-incubator so we can get rid of
    it.

    bp deprecations

    Change-Id: I1c761933816da03b6c625f14d0aac43f206e88d7

commit 16e834dd4597314d79cf4fb0bb98449e6552f804
Author: Brant Knudson <email address hidden>
Date: Wed Aug 5 11:17:34 2015 -0500

    Move apiclient.base.Resource into keystoneclient

    keystoneclient is using apiclient.base and in order to properly
    deprecate and eventually get rid of apiclient we need to move the
    symbols that keystoneclient uses out of apiclient.

    This change moves apiclient.base.Resource into keystoneclient.base
    by merging apiclient.base.Resource into the existing
    keystoneclient.base.Resource. apiclient.base.Resource is now
    renaming keystoneclient.base.Resource for backwards-compatibility.

    Change-Id: Id479711b7c9437aaf171def6976aab8b303ec56d

commit 26534dadb1d0be00b87b632a038839ab1c18cfe4
Author: Brant Knudson <email address hidden>
Date: Tue Aug 4 19:57:26 2015 -0500

    oslo-incubator apiclient.exceptions to keystoneclient.exceptions

    Applications are using exceptions out of
    keystoneclient.openstack.common.apiclient.exceptions so it's part
    of the public interface. But since it's from oslo-incubator it's
    not considered stable. Since keystoneclient is all stable this
    creates bad situation.

    With this change, all the symbols out of apiclient.exceptions are
    moved into keystoneclient.exceptions rather than the other way
    around (keystoneclient.exceptions used to re-export all of
    apiclient.exceptions). Now we're in control of the
    apiclient.exceptions and keystoneclient.exceptions that
    applications are using.

    Closes-Bug: 1481806
    Change-Id: Ib3afa86b9d276f6a45d1ecd6f9157ee02ec8570d

commit eaa7ddd7443ca166f6646e808dcad959811d158b
Author: Brant Knudson <email address hidden>
Date: Sun Jul 26 06:53:58 2015 -0500

    Proper deprecation for HTTPClient session and adapter properties

    HTTPClient's forwarded session and adapter properties weren't
    properly deprecated since the deprecations was only mentioned in
    the docstring. Proper deprecation requires use of warnings/
    debtcollector and documentation.

    bp deprecations

    Change-Id: Iea76d7bbc3bdeb13f7fdb097f13e007b4dd85c8d

commit 0c2fef51d2b90df088d30e9b6c5079caae7c6578
Author: Brant Knudson <email address hidden>
Date: Fri Jul 24 15:52:57 2015 -0500

    Proper deprecation for HTTPClient.request methods

    HTTPClient.request and related methods weren't properly
    deprecated since they were only mentioned in the docstrings.
    Proper deprecation requires use of warnings/debtcollector and
    documentation.

    Also, fixed places where the deprecated request m...

Changed in python-keystoneclient:
milestone: none → 1.7.0
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-1 → 8.0.0
Changed in cloudkitty:
assignee: nobody → Tuan (tuanla)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cloudkitty (master)

Reviewed: https://review.openstack.org/394226
Committed: https://git.openstack.org/cgit/openstack/cloudkitty/commit/?id=932b5feb7c489bda748c8bc50efa7fa9bbff21ba
Submitter: Jenkins
Branch: master

commit 932b5feb7c489bda748c8bc50efa7fa9bbff21ba
Author: Luong Anh Tuan <email address hidden>
Date: Mon Nov 7 09:01:58 2016 +0700

    Replace oslo_utils.timeutils.isotime

    Function 'oslo_utils.timeutils.isotime()' is deprecated in version '1.6'
    and will be removed in a future version. We cant't use
    datetime.datetime.isoformat() instead. Because the format of the string
    generated by isoformat isn't the same as the format of the string
    generated by isotime. The string is used in tokens and other public
    APIs and we can't change it without potentially breaking clients.

    So the workaround is to copy the current implementation from
    oslo_utils.timeutils.isotime() to utils.py

    For more informations:
    http://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutils.isotime

    Change-Id: Ib384ae8130dcc6cbd47a837d11ca171ce02ef29e
    Closes-Bug: #1461251

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

This issue was fixed in the openstack/cloudkitty 5.0.0 release.

Chenghui Yu (chenghuiyu)
Changed in oslo.utils:
assignee: nobody → Chenghui Yu (chenghuiyu)
status: New → In Progress
Chenghui Yu (chenghuiyu)
Changed in gce-api:
status: New → In Progress
assignee: nobody → Chenghui Yu (chenghuiyu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gce-api (master)

Fix proposed to branch: master
Review: https://review.openstack.org/502371

Chenghui Yu (chenghuiyu)
Changed in ec2-api:
assignee: nobody → Chenghui Yu (chenghuiyu)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ec2-api (master)

Fix proposed to branch: master
Review: https://review.openstack.org/502373

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ec2-api (master)

Change abandoned by Chenghui Yu (<email address hidden>) on branch: master
Review: https://review.openstack.org/502373

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

Reviewed: https://review.openstack.org/579145
Committed: https://git.openstack.org/cgit/openstack/ec2-api/commit/?id=c65cb663de5d1cfb239bbf32610f0f7a71c7e170
Submitter: Zuul
Branch: master

commit c65cb663de5d1cfb239bbf32610f0f7a71c7e170
Author: chenghuiyu <email address hidden>
Date: Mon Sep 11 10:48:48 2017 +0800

    Fix usage of isotime

    The commit I34b12b96de3ea21beaf935ed8a9f6bae2fe0d0bc and
    Ib384ae8130dcc6cbd47a837d11ca171ce02ef29e introduced the
    deprecated oslo_utils.timeutils.isotime() is deprecated
    as of 1.6.

    The deprecation message says to use the datetime.datetime.isoformat()
    instead, but the format of the string generated by isoformat isn't
    the same as the format of the string generated by isotime. The string
    is used in tokens and other public APIs and we can't change it
    without potentially breaking clients.

    So the workaround is to copy the current implementation from
    oslo_utils.timeutils.isotime() to ec2api.api.ec2utils.

    For more informations:
    https://docs.openstack.org/oslo.utils/latest/reference/timeutils.html

    Change-Id: Id62fb53264b04a7ea6ae3035a129353c5cfa040a
    Closes-Bug: #1461251

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

This issue was fixed in the openstack/ec2-api 7.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on oslo.utils (master)

Change abandoned by "Hervé Beraud <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/oslo.utils/+/816700

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.