truncate table size column cause the exception

Bug #1504397 reported by zhurong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Ivan Kolodyazhny

Bug Description

To reproduce:
1.edit openstack_dashboard/dashboards/project/images/images/tables.py
2.add 'truncate=40' to image size column
3.open the image page give the error

Error while rendering table rows.
Traceback (most recent call last):
  File "/home/openstack/horizon/horizon/tables/base.py", line 1774, in get_rows
    row = self._meta.row_class(self, datum)
  File "/home/openstack/horizon/horizon/tables/base.py", line 529, in __init__
    self.load_cells()
  File "/home/openstack/horizon/openstack_dashboard/dashboards/project/images/images/tables.py", line 268, in load_cells
    super(UpdateRow, self).load_cells(image)
  File "/home/openstack/horizon/horizon/tables/base.py", line 555, in load_cells
    cell = table._meta.cell_class(datum, column, self)
  File "/home/openstack/horizon/horizon/tables/base.py", line 657, in __init__
    if len(data) > column.truncate:
TypeError: object of type 'int' has no len()
Internal Server Error: /project/images/

zhurong (zhu-rong)
Changed in horizon:
assignee: nobody → zhu.rong (zhu-rong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/232910
Reason: Patch has multiple -1s and hasn't been updated for over 4 months.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Assignee removed due to inactivity.

Changed in horizon:
assignee: zhurong (zhu-rong) → nobody
milestone: none → ongoing
importance: Undecided → Low
status: In Progress → Confirmed
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

This is not reeeeally a bug. The truncate filter seems to just be trying to treat an integer as a string and failing. You'd need exceptionally weird units or an exceptionally large object for truncate=40 to ever be needed for a size field, so I'd say this is extremely low priority.

Changed in horizon:
milestone: ongoing → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: nobody → Rebecca Finn (rebeccax-finn)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rob Cresswell (<email address hidden>) on branch: master
Review: https://review.openstack.org/348543
Reason: Abandoned due to inactivity

Changed in horizon:
status: In Progress → Triaged
assignee: Rebecca Finn (rebeccax-finn) → nobody
tags: added: low-hanging-fruit
Ameed Ashour (ameeda)
Changed in horizon:
assignee: nobody → Ameed Ashour (ameeda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Triaged → In Progress
Changed in horizon:
assignee: Ameed Ashour (ameeda) → Ivan Kolodyazhny (e0ne)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Ivan Kolodyazhny (<email address hidden>) on branch: master
Review: https://review.openstack.org/546114
Reason: This review is > 4 months without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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

Reviewed: https://review.openstack.org/546114
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7f121363935be32b345ec80fd15d478bb8d9f23f
Submitter: Zuul
Branch: master

commit 7f121363935be32b345ec80fd15d478bb8d9f23f
Author: Ameed Ashour <email address hidden>
Date: Tue Feb 20 05:54:33 2018 -0500

    Truncate table size column cause the exception

    The truncate filter treat an integer as a string and failing.

    Co-Authored-By: Ivan Kolodyazhny <email address hidden>
    Change-Id: I1a66c3080544e0af8ba02c530351ab4b2d7f9bbd
    Closes-Bug: #1504397

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

This issue was fixed in the openstack/horizon 15.0.0.0b1 development milestone.

Akihiro Motoki (amotoki)
Changed in horizon:
milestone: next → none
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.