#379 fix unexcepted build notification error by NoneValue of task.label
Closed 6 years ago by julian8628. Opened 7 years ago by julian8628.
julian8628/koji buildnoti  into  master

file modified
+1 -1
@@ -4633,7 +4633,7 @@ 

          data[task_id]['id'] = taskinfo['id']

          data[task_id]['method'] = taskinfo['method']

          data[task_id]['arch'] = taskinfo['arch']

-         data[task_id]['build_arch'] = taskinfo['label']

+         data[task_id]['build_arch'] = taskinfo['label'] or 'noarch'

          data[task_id]['host'] = hostinfo and hostinfo['name'] or None

          data[task_id]['state'] = koji.TASK_STATES[taskinfo['state']].lower()

          data[task_id]['result'] = result

no initial comment

Wouldn't it make sense to distinguish between real NULL/empty_string/"noarch"? There is a lot of tasks which have "noarch" set explicitly. Not sure if these three values are interesting to somebody, but it seems to me as unnecessary loss of some data.

I think using "label" for filepath generation is just a trick.
This fix is about to make BuildNotification succeed, but not to make sure filepath is right.
I think a refactor in BuildNotification for the taskinfo/buildinfo generating as web would better.

Or we may list all files under buildpath.
Does it make sense?

Using label here has always been incorrect. If we're going to touch this, we should fix the underlying issue.

Pull-Request has been closed by julian8628

6 years ago