Lava Android Test Runner

the test_id generated is longer than 64

Reported by Yongqin Liu on 2012-03-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Android Test
Medium
Yongqin Liu

Bug Description

cut the generated test_id for run-custom to 40, reserve the 24 chars for the prefix and other parts of the generated test_id

otherwise it will make the dashboard display the following error:
Cause

value too long for type character varying(64)

Deserialization failure traceback

Traceback (most recent call last):
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/models.py", line 489, in deserializeself._do_deserialize(prefer_evolution)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/models.py", line 510, in _do_deserializehelper.deserialize(self,prefer_evolution)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 757, in deserializeimporter().import_document(s_bundle,doc)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 64, in import_documentself._import_document_with_transaction(s_bundle,doc)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/transaction.py", line 217, in innerres=func(*args,**kwargs)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 106, in _import_document_with_transactionself._import_document(s_bundle,doc)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 110, in _import_documentself._import_test_run(c_test_run,s_bundle)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 135, in _import_test_runs_test=self._import_test(c_test_run)
  File "/srv/lava/instances/latest/src/lava-dashboard/dashboard_app/helpers.py", line 194, in _import_testtest_id=c_test_run["test_id"])# required by schema
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/manager.py", line 135, in get_or_createreturnself.get_query_set().get_or_create(**kwargs)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/query.py", line 385, in get_or_createobj.save(force_insert=True,using=self.db)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/base.py", line 460, in saveself.save_base(using=using,force_insert=force_insert,force_update=force_update)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/base.py", line 553, in save_baseresult=manager._insert(values,return_id=update_pk,using=using)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insertreturninsert_query(self.model,values,**kwargs)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/query.py", line 1436, in insert_queryreturnquery.get_compiler(using=using).execute_sql(return_id)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 791, in execute_sqlcursor=super(SQLInsertCompiler,self).execute_sql(None)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sqlcursor.execute(sql,params)
  File "/srv/lava/instances/latest/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in executereturnself.cursor.execute(query,args)DatabaseError: value too long for type character varying(64)

Related branches

Yongqin Liu (liuyq0307) on 2012-03-22
Changed in lava-android-test:
importance: Undecided → Medium
assignee: nobody → Yongqin Liu (liuyq0307)
milestone: none → 2012.03
Yongqin Liu (liuyq0307) on 2012-03-22
Changed in lava-android-test:
status: New → In Progress

Arararararagh, we should just remove all length limits from the
dispatcher models too.

Cheers,
mwh

Yongqin Liu (liuyq0307) on 2012-03-23
Changed in lava-android-test:
status: In Progress → Fix Committed
Fathi Boudra (fboudra) on 2012-03-26
Changed in lava-android-test:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers