Uploaded image for project: 'Coin'
  1. Coin
  2. COIN-1086

Task is forgotten in state "Running" but "completed_on" is not null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • master
    • Scheduler
    • None

    Description

      There are very old tasks returned in GET /tasks, being stuck in state "Running" forever. I work-around this by changing the state of a "Running" task after 30 days or more to "HUNG".

      However my assumptions (asserts) in my code presume that only finished tasks should have a "completed_on" timestamp. The following task as returned from GET /tasks appears finished but the state is running.

      {'branch': 'dev',
       'completed_on': '2023-08-14 08:49:56 +0000',
       'duration_s': 9.0,
       'final_sha': None,
       'id': 'web_rescheduled_qt_qt5_1692002984103',
       'is_public': True,
       'project': 'qt/qt5',
       'self_url': 'https://testresults.qt.io/coin/integration/qt/qt5/tasks/web_rescheduled_qt_qt5_1692002984103',
       'sha': '1a90bbfecf9ea850ad7baa2710edf55813db10a1',
       'started_on': '2023-08-14 08:49:47 +0000',
       'state': 'Running',
       'task_id': 'web_rescheduled_qt_qt5_1692002984103',
       'task_n': 55500,
       'task_state': 'Running',
       'task_type': 'StatusCheck',
       'tested_changes': [],
       'top_sha': '1a90bbfecf9ea850ad7baa2710edf55813db10a1',
       'type': 'StatusCheck',
       'verbose_status': None,
       'workitem_ids': []}
      

      Can we make sure that a task has "completed_on" set only if state is not "Running" or "Initializing", and vice-versa?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              tosaario Toni Saario
              jimis Dimitrios Apostolou
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes