Project

General

Profile

Actions

Bug #8679

closed

Do not consider missed task as an error

Added by Ilja Zakharov almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Urgent
Category:
Bridge
Target version:
Start date:
01/19/2018
Due date:
01/19/2018
% Done:

100%

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

Description

During cancellation task solver can still trying send solution to the server and this is not an error. But Bridge always raise an exception:

==================================================
[19.Jan.2018 11:51:57] The task 21 was not found
Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/service/utils.py", line 564, in init
self.task = Task.objects.get(id=task_id)
File "/home/zakharov/.local/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/zakharov/.local/lib/python3.5/site-packages/django/db/models/query.py", line 385, in get
self.model._meta.object_name
service.models.DoesNotExist: Task matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/service/views.py", line 218, in upload_solution
service.utils.SaveSolution(request.POST['task id'], archive, request.POST['description'])
File "/work/zakharov/src/klever/bridge/service/utils.py", line 566, in init
raise ServiceError('The task %s was not found' % task_id)
service.utils.ServiceError: The task 21 was not found


Related issues 1 (0 open1 closed)

Related to Klever - Feature #8661: Do not consider bad zip archives as errorsClosedVladimir Gratinskiy01/14/201801/19/2018

Actions
Actions #1

Updated by Evgeny Novikov almost 7 years ago

  • Related to Feature #8661: Do not consider bad zip archives as errors added
Actions #2

Updated by Vladimir Gratinskiy almost 7 years ago

If I don't consider this as error, then even for solving jobs it will be OK to have missed tasks. Without task in this request I can't detect what job does this request need so I can't check if job is cancelling while solution uploading. Do you still want me to fix this?

Actions #3

Updated by Vladimir Gratinskiy almost 7 years ago

  • Due date set to 01/19/2018
  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Implemented in branch "fix_8679". This branch also includes some fixed of #8661.

Actions #4

Updated by Ilja Zakharov almost 7 years ago

  • Status changed from Resolved to Open

Bridge raises extra exceptions at jobs cancellation, so it would be nice to hide them also:

Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/service/views.py", line 61, in schedule_task
res = service.utils.ScheduleTask(request.session['job id'], request.POST['description'], archive)
File "/work/zakharov/src/klever/bridge/service/utils.py", line 65, in init
raise ServiceError('The job is not processing')
service.utils.ServiceError: The job is not processing
The task 95 was not found

Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/service/utils.py", line 556, in init
self.task = Task.objects.get(id=task_id)
File "/home/zakharov/.local/lib/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/zakharov/.local/lib/python3.5/site-packages/django/db/models/query.py", line 385, in get
self.model._meta.object_name
service.models.DoesNotExist: Task matching query does not exist.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/work/zakharov/src/klever/bridge/service/views.py", line 185, in download_task
res = service.utils.GetTaskData(request.POST['task id'])
File "/work/zakharov/src/klever/bridge/service/utils.py", line 558, in init
raise ServiceError('The task %s was not found' % task_id)
service.utils.ServiceError: The task 95 was not found

Actions #5

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Resolved

Fixed.

Actions #6

Updated by Ilja Zakharov almost 7 years ago

  • Status changed from Resolved to Verified
Actions #7

Updated by Ilja Zakharov almost 7 years ago

  • Status changed from Verified to Closed

Available since 94889a0a.

Actions #8

Updated by Evgeny Novikov almost 7 years ago

  • Status changed from Closed to Open
Actions #9

Updated by Alexey Polushkin almost 7 years ago

Sometimes bridge rises following exceptions when a job becomes corrupted or cancelled:

Internal Server Error: /service/schedule_task/
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/lib/python3.4/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/usr/lib/python3.4/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3.4/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/alexey/klever/klever/bridge/tools/profiling.py", line 133, in wait
res = f(*args, **kwargs)
File "/home/alexey/klever/klever/bridge/service/views.py", line 68, in schedule_task
return JsonResponse({'task id': res.task_id})
AttributeError: 'ScheduleTask' object has no attribute 'task_id'

Actions #10

Updated by Vladimir Gratinskiy almost 7 years ago

  • Status changed from Open to Resolved

Fixed.

Actions #11

Updated by Ilja Zakharov almost 7 years ago

  • Status changed from Resolved to Verified
Actions #12

Updated by Ilja Zakharov almost 7 years ago

  • Status changed from Verified to Closed
Actions

Also available in: Atom PDF