Project

General

Profile

Actions

Bug #8511

closed

Klever does not remove old jobs

Added by Pavel Andrianov about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Immediate
Category:
Bridge
Target version:
Start date:
10/19/2017
Due date:
10/20/2017
% Done:

100%

Estimated time:
Detected in build:
svn
Platform:
Published in build:

Description

The report was uploaded with "Upload report" successfully. When we try to remove or reupload, Bridge fails with

Deleting ReportRoot files took 0.004882335662841797 seconds.
The 'archive' attribute has no file associated with it.
Traceback (most recent call last):
  File "/home/ldvuser/work/klever/bridge/jobs/views.py", line 1111, in upload_reports
    UploadReportsWithoutDecision(job, request.user, reports_dir.name)
  File "/home/ldvuser/work/klever/bridge/jobs/Download.py", line 749, in __init__
    self.__prepare_job()
  File "/home/ldvuser/work/klever/bridge/jobs/Download.py", line 782, in __prepare_job
    StartJobDecision(self._user, self._job.id, configuration, fake=True)
  File "/home/ldvuser/work/klever/bridge/service/utils.py", line 785, in __init__
    ReportRoot.objects.get(job=self.job).delete()
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/db/models/base.py", line 972, in delete
    return collector.delete()
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/db/models/deletion.py", line 279, in delete
    sender=model, instance=obj, using=self.using
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 193, in send
    for receiver in self._live_receivers(sender)
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/dispatch/dispatcher.py", line 193, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/home/ldvuser/work/klever/bridge/reports/models.py", line 165, in coverage_archive_delete_signal
    arch.archive.storage.delete(arch.archive.path)
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/db/models/fields/files.py", line 65, in path
    self._require_file()
  File "/home/ldvuser/.local/lib/python3.5/site-packages/django/db/models/fields/files.py", line 47, in _require_file
    raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)
ValueError: The 'archive' attribute has no file associated with it.

The exception is thrown only for removing old jobs, which were created before updating Klever. All new reports are removed successfully. Now we have a set of jobs, which can not be modified, except renaming.

Actions

Also available in: Atom PDF