Test result failed to display when test_id longer than 64 bytes

Bug #1103907 reported by Yongqin Liu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Server
Confirmed
Low
Antonio Terceiro

Bug Description

http://validation.linaro.org/lava-server/dashboard/streams/private/team/linaro/android-daily/bundles/86c453acd7c79b92fdfb0cfbdf841ce6a950f9e0/
-----------------------------------------------------------
Cause

value too long for type character varying(64)
Deserialization failure traceback

Traceback (most recent call last):
File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/models.py", line 495, in deserializeself._do_deserialize(prefer_evolution)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/models.py", line 516, in _do_deserializehelper.deserialize(self,prefer_evolution)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 801, in deserializeimporter().import_document(s_bundle,doc)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 64, in import_documentself._import_document_with_transaction(s_bundle,doc)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/transaction.py", line 209, in innerreturnfunc(*args,**kwargs)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 106, in _import_document_with_transactionself._import_document(s_bundle,doc)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 110, in _import_documentself._import_test_run(c_test_run,s_bundle)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 709, in _import_test_runs_test_run=super(BundleFormatImporter_1_4,self)._import_test_run(c_test_run,s_bundle)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 693, in _import_test_runs_test_run=super(BundleFormatImporter_1_3,self)._import_test_run(c_test_run,s_bundle)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 135, in _import_test_runs_test=self._import_test(c_test_run)
  File "/srv/lava/.cache/eggs/lava_dashboard-0.29-py2.7.egg/dashboard_app/helpers.py", line 194, in _import_testtest_id=c_test_run["test_id"])# required by schema
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/manager.py", line 134, in get_or_createreturnself.get_query_set().get_or_create(**kwargs)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/query.py", line 452, in get_or_createobj.save(force_insert=True,using=self.db)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/base.py", line 463, in saveself.save_base(using=using,force_insert=force_insert,force_update=force_update)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/base.py", line 551, in save_baseresult=manager._insert([self],fields=fields,return_id=update_pk,using=using,raw=raw)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/manager.py", line 203, in _insertreturninsert_query(self.model,objs,fields,**kwargs)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/query.py", line 1593, in insert_queryreturnquery.get_compiler(using=using).execute_sql(return_id)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/models/sql/compiler.py", line 910, in execute_sqlcursor.execute(sql,params)
  File "/srv/lava/.cache/eggs/Django-1.4.2-py2.7.egg/django/db/backends/postgresql_psycopg2/base.py", line 52, in executereturnself.cursor.execute(query,args)DatabaseError: value too long for type character varying(64)

Yongqin Liu (liuyq0307)
Changed in lava-dashboard:
assignee: nobody → Michael Hudson-Doyle (mwhudson)
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

What was the test-id you were trying with? How big you want the test-id to be? 128 ?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: [Bug 1103907] Re: Test result failed to display when test_id longer than 64 bytes

Senthil Kumaran S <email address hidden> writes:

> What was the test-id you were trying with? How big you want the test-id
> to be? 128 ?

We only have limits because Django requires them and AIUI Django only
requires them because of how MySQL works and as we use postgres, we
should just lift the limit to something silly like 1024.

Unless there is a reason to impose a limit on test_id length? I'd
rather not, in general.

Cheers,
mwh

Revision history for this message
Antonio Terceiro (terceiro) wrote :

On Thu, Jan 24, 2013 at 07:41:02PM -0000, Michael Hudson-Doyle wrote:
> Senthil Kumaran S <email address hidden> writes:
>
> > What was the test-id you were trying with? How big you want the test-id
> > to be? 128 ?
>
> We only have limits because Django requires them and AIUI Django only
> requires them because of how MySQL works and as we use postgres, we
> should just lift the limit to something silly like 1024.
>
> Unless there is a reason to impose a limit on test_id length? I'd
> rather not, in general.

Very long test_id values, specially if they don't have spaces in
between, might cause weird problems with the UI. But I'd say let's
increase the limit and fix the UI if needed.

--
Antonio Terceiro
Software Engineer - Linaro
http://www.linaro.org

Changed in lava-dashboard:
assignee: Michael Hudson-Doyle (mwhudson) → Antonio Terceiro (terceiro)
importance: Undecided → Low
status: New → Confirmed
affects: lava-dashboard → lava-server
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.