flag "truncated" in responses to list operations is not supported

Bug #1520244 reported by Boris Bobrov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Won't Fix
Medium
Unassigned

Bug Description

There is a flag that keystone returns to show that the list of entries is truncated: http://specs.openstack.org/openstack/keystone-specs/api/v3/identity-api-v3.html#optional-attributes . It is not supported in keystoneclient and there is no way to understand that the response was truncated.

Boris Bobrov (bbobrov)
description: updated
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/250473

Changed in python-keystoneclient:
assignee: nobody → Boris Bobrov (bbobrov)
status: New → In Progress
Changed in python-keystoneclient:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

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

commit c28d40814962b3a8ccb81e5e7d7f832c8f0a3c9a
Author: Boris Bobrov <email address hidden>
Date: Thu Nov 26 19:10:10 2015 +0300

    Support `truncated` flag returned by keystone

    Wrap a list of objects into custom class with additional attributes.

    This is wanted by Horizon, that wants to know that the list returned
    from keystone is not full and that more strict filters need to be
    applied.

    Change-Id: Icfabfd055aed1648dc4130b03ec3dbf9bad4e45a
    Closes-Bug: 1520244

Changed in python-keystoneclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-keystoneclient 2.1.0

This issue was fixed in the openstack/python-keystoneclient 2.1.0 release.

Revision history for this message
Steve Martinelli (stevemar) wrote :

I am re-opening this bug to the confirmed state, as it broke the keystone gate for stable/liberty.

It was failing these tests: https://github.com/openstack/keystone/blob/stable/liberty/keystone/tests/unit/test_v2_keystoneclient.py#L1187-L1202

2016-01-13 21:15:30.496 | keystone.tests.unit.test_v2_keystoneclient.ClientDrivenTestCase.test_ec2_credential_crud
2016-01-13 21:15:30.496 | ----------------------------------------------------------------------------------------
2016-01-13 21:15:30.496 |
2016-01-13 21:15:30.497 | Captured traceback:
2016-01-13 21:15:30.497 | ~~~~~~~~~~~~~~~~~~~
2016-01-13 21:15:30.497 | Traceback (most recent call last):
2016-01-13 21:15:30.497 | File "keystone/tests/unit/test_v2_keystoneclient.py", line 1189, in test_ec2_credential_crud
2016-01-13 21:15:30.497 | self.assertEqual([], creds)
2016-01-13 21:15:30.497 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
2016-01-13 21:15:30.497 | self.assertThat(observed, matcher, message)
2016-01-13 21:15:30.498 | File "/home/jenkins/workspace/gate-keystone-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
2016-01-13 21:15:30.498 | raise mismatch_error
2016-01-13 21:15:30.498 | testtools.matchers._impl.MismatchError: [] != <keystoneclient.base.KeystoneReturnedList object at 0x7f85eda8ff50>

Since it's very possible that other folks were also doing a similar check, we have decided to revert the change and release a new version of keystoneclient.

Changed in python-keystoneclient:
status: Fix Released → Confirmed
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/280162

Changed in python-keystoneclient:
status: Confirmed → In Progress
Changed in python-keystoneclient:
assignee: Boris Bobrov (bbobrov) → Steve Martinelli (stevemar)
Changed in python-keystoneclient:
assignee: Steve Martinelli (stevemar) → Boris Bobrov (bbobrov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-keystoneclient (master)

Reviewed: https://review.openstack.org/280162
Committed: https://git.openstack.org/cgit/openstack/python-keystoneclient/commit/?id=870be44c0ed5564101f9cf9d53e8085fb01680c8
Submitter: Jenkins
Branch: master

commit 870be44c0ed5564101f9cf9d53e8085fb01680c8
Author: Boris Bobrov <email address hidden>
Date: Mon Feb 15 14:14:49 2016 +0300

    Support `truncated` flag returned by identity service

    Create a custom list with flag `truncated` to support corresponding
    response from the identity service.

    This is wanted by Horizon, that wants to know that the list returned
    from keystone is not full and that more strict filters need to be
    applied.

    The previous attempt in commit c28d40814962b3a8ccb81e5e7d7f832c8f0a3c9a
    was reverted by d20b300589863bcf165945beb129ebcc3621a14f because it
    broke other code. This commit changes the way the flag is added and
    verifies that existing code will not break.

    Change-Id: Ia86cfd91110adae6d7ab86ff1f152a8f9be27837
    Closes-Bug: 1520244

Changed in python-keystoneclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-keystoneclient 2.3.0

This issue was fixed in the openstack/python-keystoneclient 2.3.0 release.

Revision history for this message
Boris Bobrov (bbobrov) wrote :
Changed in python-keystoneclient:
status: Fix Released → Confirmed
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/293048

Changed in python-keystoneclient:
status: Confirmed → In Progress
Revision history for this message
Steve Martinelli (stevemar) wrote :

Automatically unassigning due to inactivity.

Changed in python-keystoneclient:
assignee: Boris Bobrov (bbobrov) → nobody
status: In Progress → Triaged
Changed in python-keystoneclient:
assignee: nobody → Boris Bobrov (bbobrov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-keystoneclient (master)

Change abandoned by Boris Bobrov (<email address hidden>) on branch: master
Review: https://review.openstack.org/293048
Reason: i agree

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in python-keystoneclient:
assignee: Boris Bobrov (bbobrov) → nobody
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

We should move this work to SDK and not enhance keystoneclient. Marking as wont fix due to age.

Changed in python-keystoneclient:
status: Triaged → Won't Fix
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.