radical-cybertools / radical.pilot

RADICAL-Pilot
http://radical-cybertools.github.io/radical-pilot/index.html
Other
54 stars 23 forks source link

fixed `Task._update` method (`description` attribute) #3105

Closed mtitov closed 9 months ago

mtitov commented 9 months ago

Race condition regarding having description attribute within task_dict

p.s., I couldn't spot from where specifically it comes, for most cases it is not the issue, but for some tasks it breaks the update process

Example of the error message

1702539334.001 : tmgr.0000            : 423200 : 140732555587952 : ERROR    : callback error
Traceback (most recent call last):
  File "/gpfs/alpine/csc449/world-shared/soma/summit/ve_workflow/lib/python3.8/site-packages/radical/utils/zmq/pubsub.py", line 304, in _listener
    cb(topic, msg)
  File "/gpfs/alpine/csc449/world-shared/soma/summit/ve_workflow/lib/python3.8/site-packages/radical/pilot/task_manager.py", line 358, in _state_sub_cb
    self._update_tasks(tasks)
  File "/gpfs/alpine/csc449/world-shared/soma/summit/ve_workflow/lib/python3.8/site-packages/radical/pilot/task_manager.py", line 402, in _update_tasks
    self._tasks[uid]._update(task_dict)
  File "/gpfs/alpine/csc449/world-shared/soma/summit/ve_workflow/lib/python3.8/site-packages/radical/pilot/task.py", line 181, in _update
    if task_dict['description'].get('metadata'):
KeyError: 'description'
codecov[bot] commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7862aec) 44.28% compared to head (52664a5) 44.28%.

Files Patch % Lines
src/radical/pilot/task.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #3105 +/- ## ======================================= Coverage 44.28% 44.28% ======================================= Files 96 96 Lines 10604 10604 ======================================= Hits 4696 4696 Misses 5908 5908 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.