Project

General

Profile

Bug #8511

Klever does not remove old jobs

Added by Pavel Andrianov over 1 year ago. Updated over 1 year 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.

History

#1

Updated by Evgeny Novikov over 1 year ago

  • Assignee set to Vladimir Gratinskiy
  • Priority changed from Normal to Immediate

It looks like a regression bug. So, we need either its fix (it shouldn't require dropping databases, say, because of some old incorrect migrations since that has no sense) or at least some workaround (it isn't necessary to run it through the web interface).

#2

Updated by Evgeny Novikov over 1 year ago

  • Target version set to 1.0

If this will be possible, I would like to backport the bug fix to the stable branch for Klever 0.2.

#3

Updated by Vladimir Gratinskiy over 1 year ago

  • Due date set to 10/20/2017
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Fix in fix_8511 should solve the problem.

#4

Updated by Evgeny Novikov over 1 year ago

  • Status changed from Resolved to Closed

It turned out that good testing of this bug fix is hard. So, after some shallow testing I merged the branch to master in ddb22435.

Due to lack of good testing I won't backport it to Klever 0.2. Thus, one won't be able to remove some old jobs until update to the specified version or to Klever version:0.3.

Also available in: Atom PDF