#703 cli: make return code of watch_task to always ignore sub-task failure
Merged 4 years ago by mikem. Opened 4 years ago by julian8628.
julian8628/koji exit-code  into  master

file modified
+2 -2
@@ -285,7 +285,7 @@ 

      try:

          tasks = {}

          for task_id in tasklist:

-             tasks[task_id] = TaskWatcher(task_id,session,quiet=quiet)

+             tasks[task_id] = TaskWatcher(task_id, session, quiet=quiet)

          while True:

              all_done = True

              for task_id, task in list(tasks.items()):
@@ -297,7 +297,7 @@ 

                          # task is done and state just changed

                          if not quiet:

                              display_tasklist_status(tasks)

-                     if not task.is_success():

+                     if task.level == 0 and not task.is_success():

                          rv = 1

                  for child in session.getTaskChildren(task_id):

                      child_id = child['id']

I'd rather not report incorrect data in is_success(). Perhaps this?

https://github.com/mikem23/koji-playground/commits/pagure/pr/703

yep, it's more straight and accurate
let me rebase it

1 new commit added

  • avoid reporting incorrect info in is_success()
4 years ago

Commit 5574ad7 fixes this pull-request

Pull-Request has been merged by mikem@redhat.com

4 years ago
Metadata