Hi,
I release new version of SQUAD plugins yesterday but I'm not rolling
them out yet. I think it makes sense to make a new SQUAD release on
Monday and roll out both at the same time. Any objections?
milosz
On Thu, 11 Oct 2018 at 14:36, Antonio Terceiro
<antonio.terceiro(a)linaro.org> wrote:
>
> On Thu, Oct 11, 2018 at 11:24:17AM +0100, Ryan Harkin wrote:
> > On Thu, 11 Oct 2018 at 10:35, Milosz Wasilewski <
> > milosz.wasilewski(a)linaro.org> wrote:
> >
> > > Hi,
> > >
> > > Antonio proposed a patch that sets default data retention policy to
> > > 180 days. It can be changed for each project in qa-reports separately
> > > (extended or shortened). We don't have an option to keep the data
> > > forever. IMHO this is a good idea, but I wanted to ask whether you
> > > have a need to keep your results forever.
> > >
> >
> > I don't need to keep my results forever. But what would be nice is to be
> > able to keep 180 days OR n sets of data.
> >
> > This way, release jobs, that only gets run once per month, for example,
> > could keep a history of the project over a longer period of time.
>
> Maybe we can disable the cleanup if the limit is set to 0. Then we can
> use 0 for these special cases when builds are not so frequent and we do
> need/want to keep results forever.
-1 so it's not confusing as 'delete immediately'?
milosz
Hi,
It turns out last release wasn't great. We're hitting the following error:
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: DETAIL: Key
(status_id)=(9919) already exists.
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: The above exception
was the direct cause of the following exception:
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: Traceback (most
recent call last):
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/celery/app/trace.py",
line 374, in trace_task
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: R = retval =
fun(*args, **kwargs)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/celery/app/trace.py",
line 629, in __protected_call__
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
self.run(*args, **kwargs)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/squad/core/tasks/notification.py",
line 49, in notification_timeout
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
send_status_notification(projectstatus)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/squad/core/notification.py",
line 194, in send_status_notification
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
send_admin_notification(status, project)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/squad/core/notification.py",
line 238, in send_admin_notification
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: if
NotificationDelivery.exists(status, subject, txt, html):
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/squad/core/models.py",
line 847, in exists
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: html=html_hash,
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/manager.py",
line 85, in manager_method
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
getattr(self.get_queryset(), name)(*args, **kwargs)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/query.py",
line 466, in get_or_create
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
self._create_object_from_params(lookup, params)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/query.py",
line 506, in _create_object_from_params
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: six.reraise(*exc_info)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/utils/six.py",
line 686, in reraise
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: raise value
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/query.py",
line 498, in _create_object_from_params
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: obj =
self.create(**params)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/query.py",
line 394, in create
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
obj.save(force_insert=True, using=self.db)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/base.py",
line 808, in save
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
force_update=force_update, update_fields=update_fields)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/base.py",
line 838, in save_base
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: updated =
self._save_table(raw, cls, force_insert, force_update, using,
update_fields)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/base.py",
line 924, in _save_table
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: result =
self._do_insert(cls._base_manager, using, fields, update_pk, raw)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/base.py",
line 963, in _do_insert
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: using=using, raw=raw)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/manager.py",
line 85, in manager_method
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
getattr(self.get_queryset(), name)(*args, **kwargs)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/query.py",
line 1076, in _insert
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
query.get_compiler(using=using).execute_sql(return_id)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/models/sql/compiler.py",
line 1113, in execute_sql
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
cursor.execute(sql, params)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/backends/utils.py",
line 64, in execute
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
self.cursor.execute(sql, params)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/utils.py",
line 94, in __exit__
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
six.reraise(dj_exc_type, dj_exc_value, traceback)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/utils/six.py",
line 685, in reraise
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: raise
value.with_traceback(tb)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: File
"/srv/qa-reports.linaro.org/lib/python3.5/site-packages/django/db/backends/utils.py",
line 64, in execute
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: return
self.cursor.execute(sql, params)
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]:
django.db.utils.IntegrityError: duplicate key value violates unique
constraint "core_notificationdelivery_status_id_key"
Oct 03 08:16:54 qa-reports-worker-1 celery[28075]: DETAIL: Key
(status_id)=(9919) already exists.
I'm trying to find a solution.
milosz