[Notes] [Git][BuildStream/buildstream][Qinusty/retries-should-fail] 2 commits: job.py: Modify retry messages to be FAIL



Title: GitLab

Qinusty pushed to branch Qinusty/retries-should-fail at BuildStream / buildstream

Commits:

4 changed files:

Changes:

  • buildstream/_scheduler/jobs/job.py
    ... ... @@ -403,7 +403,7 @@ class Job():
    403 403
                     if self._retry_flag and (self._tries <= self._max_retries):
    
    404 404
                         self.message(MessageType.FAIL,
    
    405 405
                                      "Try #{} failed, retrying".format(self._tries),
    
    406
    -                                 elapsed=elapsed)
    
    406
    +                                 elapsed=elapsed, logfile=filename)
    
    407 407
                     else:
    
    408 408
                         self.message(MessageType.FAIL, str(e),
    
    409 409
                                      elapsed=elapsed, detail=e.detail,
    
    ... ... @@ -430,7 +430,8 @@ class Job():
    430 430
                     self.message(MessageType.BUG, self.action_name,
    
    431 431
                                  elapsed=elapsed, detail=detail,
    
    432 432
                                  logfile=filename)
    
    433
    -                self._child_shutdown(RC_FAIL)
    
    433
    +                # Unhandled exceptions should permenantly fail
    
    434
    +                self._child_shutdown(RC_PERM_FAIL)
    
    434 435
     
    
    435 436
                 else:
    
    436 437
                     # No exception occurred in the action
    
    ... ... @@ -509,11 +510,6 @@ class Job():
    509 510
             message.action_name = self.action_name
    
    510 511
             message.task_id = self._task_id
    
    511 512
     
    
    512
    -        if (message.message_type == MessageType.FAIL and
    
    513
    -                self._tries <= self._max_retries and self._retry_flag):
    
    514
    -            # Job will be retried, display failures as warnings in the frontend
    
    515
    -            message.message_type = MessageType.WARN
    
    516
    -
    
    517 513
             # Send to frontend if appropriate
    
    518 514
             if context.silent_messages() and (message.message_type not in unconditional_messages):
    
    519 515
                 return
    

  • tests/sources/deb.py
    ... ... @@ -56,7 +56,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles):
    56 56
         result = cli.run(project=project, args=[
    
    57 57
             'fetch', 'target.bst'
    
    58 58
         ])
    
    59
    -    assert "Try #" in result.stderr
    
    59
    +    assert "FAILURE Try #" in result.stderr
    
    60 60
         result.assert_main_error(ErrorDomain.STREAM, None)
    
    61 61
         result.assert_task_error(ErrorDomain.SOURCE, None)
    
    62 62
     
    

  • tests/sources/tar.py
    ... ... @@ -67,7 +67,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles):
    67 67
         result = cli.run(project=project, args=[
    
    68 68
             'fetch', 'target.bst'
    
    69 69
         ])
    
    70
    -    assert "Try #" in result.stderr
    
    70
    +    assert "FAILURE Try #" in result.stderr
    
    71 71
         result.assert_main_error(ErrorDomain.STREAM, None)
    
    72 72
         result.assert_task_error(ErrorDomain.SOURCE, None)
    
    73 73
     
    

  • tests/sources/zip.py
    ... ... @@ -53,7 +53,7 @@ def test_fetch_bad_url(cli, tmpdir, datafiles):
    53 53
         result = cli.run(project=project, args=[
    
    54 54
             'fetch', 'target.bst'
    
    55 55
         ])
    
    56
    -    assert "Try #" in result.stderr
    
    56
    +    assert "FAILURE Try #" in result.stderr
    
    57 57
         result.assert_main_error(ErrorDomain.STREAM, None)
    
    58 58
         result.assert_task_error(ErrorDomain.SOURCE, None)
    
    59 59
     
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]